claw-code/rust/crates/rusty-claude-cli
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
..
.claw/sessions feat(runtime): typed task packet format for structured claw dispatch 2026-04-04 00:40:20 +09:00
src fix(tui): buffer output during turns — no more full-width bleeding 2026-06-11 16:25:34 -05:00
tests fix: /config help returns structured section list (#344) 2026-06-05 07:09:48 +09:00
Cargo.toml feat: TUI split-pane layout with ratatui dashboard 2026-06-10 16:49:35 -05:00
build.rs fix: expose complete version provenance 2026-06-04 15:55:08 +09:00