[PR #94] [MERGED] fix(tui): require stdin to be terminal for TUI enablement #129

Closed
opened 2026-02-27 10:22:20 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/94
Author: @xobosox
Created: 1/22/2026
Status: Merged
Merged: 1/22/2026
Merged by: @mikeyobrien

Base: mainHead: fix/tui-stdin-terminal-check


📝 Commits (1)

  • 4595b86 fix(tui): require stdin to be terminal for TUI enablement

📊 Changes

1 file changed (+4 additions, -3 deletions)

View changed files

📝 crates/ralph-cli/src/main.rs (+4 -3)

📄 Description

Summary

  • Adds stdin().is_terminal() check to TUI enablement condition
  • TUI now requires both stdin AND stdout to be terminals
  • Prevents TUI from enabling when running through Claude Code (where stdin fd/0 is a socket)

Problem

When running ralph through Claude Code or similar tools that pipe stdin, the TUI would enable but crossterm's EventStream would fail to receive keyboard input, making the TUI unresponsive.

Solution

Check both stdin().is_terminal() and stdout().is_terminal() before enabling TUI. This defensive check ensures TUI only activates in truly interactive terminal contexts.

Test plan

  • cargo test --package ralph-tui - 29 tests pass
  • cargo build - compiles successfully
  • Verified logic: TUI auto-disables when stdin is not a TTY

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mikeyobrien/ralph-orchestrator/pull/94 **Author:** [@xobosox](https://github.com/xobosox) **Created:** 1/22/2026 **Status:** ✅ Merged **Merged:** 1/22/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `fix/tui-stdin-terminal-check` --- ### 📝 Commits (1) - [`4595b86`](https://github.com/mikeyobrien/ralph-orchestrator/commit/4595b86240f5b4532dbdf43a8a1151392a65dd76) fix(tui): require stdin to be terminal for TUI enablement ### 📊 Changes **1 file changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/ralph-cli/src/main.rs` (+4 -3) </details> ### 📄 Description ## Summary - Adds `stdin().is_terminal()` check to TUI enablement condition - TUI now requires both stdin AND stdout to be terminals - Prevents TUI from enabling when running through Claude Code (where stdin fd/0 is a socket) ## Problem When running ralph through Claude Code or similar tools that pipe stdin, the TUI would enable but crossterm's EventStream would fail to receive keyboard input, making the TUI unresponsive. ## Solution Check both `stdin().is_terminal()` and `stdout().is_terminal()` before enabling TUI. This defensive check ensures TUI only activates in truly interactive terminal contexts. ## Test plan - [x] `cargo test --package ralph-tui` - 29 tests pass - [x] `cargo build` - compiles successfully - [x] Verified logic: TUI auto-disables when stdin is not a TTY 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:22:20 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ralph-orchestrator#129
No description provided.