mirror of
https://github.com/mikeyobrien/ralph-orchestrator.git
synced 2026-04-25 07:05:57 +03:00
[PR #100] [MERGED] fix(tui): move signal handler registration after TUI initialization #131
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ralph-orchestrator#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/100
Author: @memyselfandm
Created: 1/23/2026
Status: ✅ Merged
Merged: 1/23/2026
Merged by: @mikeyobrien
Base:
main← Head:fix/tui-signal-handler-deadlock📝 Commits (1)
a768f1dfix(tui): move signal handler registration after TUI initialization📊 Changes
1 file changed (+41 additions, -37 deletions)
View changed files
📝
crates/ralph-cli/src/loop_runner.rs(+41 -37)📄 Description
Summary
Fixes #99 - Resolves TUI hang on startup caused by deadlock between tokio signal handlers and crossterm initialization on macOS.
Problem
Ralph v2.2.1 hung silently on startup when TUI was enabled (default behavior), but worked correctly with
--no-tuiflag. This was a regression introduced by the refactor in commitf0af5d6(PR #97).Root Cause
Deadlock between tokio signal handlers and crossterm TUI initialization:
enable_raw_mode()and createsEventStreamSolution
Move signal handler registration to after TUI initialization completes (after the 100ms sleep at line 253).
Before:
After:
This ensures TUI enters raw mode and creates EventStream before signal handlers are registered, preventing the deadlock.
Testing
Validation Steps
Tested on macOS (Darwin 25.1.0) with iTerm2:
TUI renders immediately with header, iteration info, and proceeds with orchestration.
Impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.