claw-code/rust/crates/rusty-claude-cli/src
TheArchitectit 58e095a0c0 fix(tui): buffer output during turns — no more full-width bleeding
Architecture C from expert panel review: add run_turn_to<W: Write>
that writes all output (spinners, markdown, compaction logs) to a
custom writer instead of hardcoding stdout.

In the TUI path, we pass a Vec<u8> buffer. Zero bytes hit the real
terminal during a turn, so nothing bleeds past the conversation pane
boundary into the dashboard. After the turn, the buffer contents are
stripped of ANSI codes and pushed into the conversation pane where
wrap_line() constrains them to the pane width.

Key changes:
- run_turn() is now a thin wrapper: run_turn_to(input, stdout, true)
- run_turn_to<W: Write>(input, out, emit_output) is the real impl
- All println! → writeln!(out, ...), &mut stdout → out
- emit_output=false in TUI mode prevents runtime tool-stream output
- Add strip_ansi() helper for cleaning captured buffer text
- Remove Clear(ClearType::All) from redraw_after_turn (no debris to wipe)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 16:25:34 -05:00
..
init.rs fix: scaffold safe init settings 2026-06-04 15:34:15 +09:00
input.rs feat: agent teams with task claiming, context management, and team monitoring 2026-06-10 16:49:34 -05:00
main.rs fix(tui): buffer output during turns — no more full-width bleeding 2026-06-11 16:25:34 -05:00
render.rs Remove the deprecated Claude subscription login path and restore a green Rust workspace 2026-04-11 17:24:44 +00:00
setup_wizard.rs fix: resolve rebase conflicts, clean TUI alignment, and sync with upstream 2026-06-11 10:03:16 -05:00
tui.rs fix(tui): buffer output during turns — no more full-width bleeding 2026-06-11 16:25:34 -05:00