[PR #166] [MERGED] fix(tui): sanitize carriage returns in streamed output #174

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

📋 Pull Request Information

Original PR: https://github.com/mikeyobrien/ralph-orchestrator/pull/166
Author: @mikeyobrien
Created: 2/7/2026
Status: Merged
Merged: 2/8/2026
Merged by: @mikeyobrien

Base: mainHead: fix/164-tui-rendering-worktrees-submodules


📝 Commits (2)

  • 7770061 fix(tui): sanitize carriage returns in streamed output
  • c8860ec test(web): deflake port availability test

📊 Changes

2 files changed (+101 additions, -5 deletions)

View changed files

📝 crates/ralph-adapters/src/stream_handler.rs (+85 -4)
📝 crates/ralph-cli/src/web.rs (+16 -1)

📄 Description

Fixes TUI display corruption when streamed output contains carriage returns (\r), which is common for progress renderers (git submodule, cargo, etc.).\n\nChanges:\n- Sanitize block text before converting to ratatui Lines (normalize CRLF/CR, drop a few unsafe control chars)\n- Sanitize inline non-text strings (tool summaries/results/errors) to guarantee single-line rendering\n- Remove embedded newline from TuiStreamHandler error line\n\nRepro: custom backend emitting progress updates with "...\r" in a tmux session caused newline/rendering breakage.\n\nCloses #164.


🔄 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/166 **Author:** [@mikeyobrien](https://github.com/mikeyobrien) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/8/2026 **Merged by:** [@mikeyobrien](https://github.com/mikeyobrien) **Base:** `main` ← **Head:** `fix/164-tui-rendering-worktrees-submodules` --- ### 📝 Commits (2) - [`7770061`](https://github.com/mikeyobrien/ralph-orchestrator/commit/7770061ba2b20f79edcbd90297c36f19cc269313) fix(tui): sanitize carriage returns in streamed output - [`c8860ec`](https://github.com/mikeyobrien/ralph-orchestrator/commit/c8860ec6b4a4b1e2f9566ff8d2c8a15bb9ba593a) test(web): deflake port availability test ### 📊 Changes **2 files changed** (+101 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/ralph-adapters/src/stream_handler.rs` (+85 -4) 📝 `crates/ralph-cli/src/web.rs` (+16 -1) </details> ### 📄 Description Fixes TUI display corruption when streamed output contains carriage returns (\r), which is common for progress renderers (git submodule, cargo, etc.).\n\nChanges:\n- Sanitize block text before converting to ratatui Lines (normalize CRLF/CR, drop a few unsafe control chars)\n- Sanitize inline non-text strings (tool summaries/results/errors) to guarantee single-line rendering\n- Remove embedded newline from TuiStreamHandler error line\n\nRepro: custom backend emitting progress updates with \"...\r\" in a tmux session caused newline/rendering breakage.\n\nCloses #164. --- <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:31 +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#174
No description provided.