From 3e1b0ae02f4bc2e5cc941ca1c850d4a82d8d2cdb Mon Sep 17 00:00:00 2001 From: CodeWhale Bot Date: Tue, 1 Sep 2026 11:21:36 -0700 Subject: [PATCH] fix(tui): every slash submit echoes a user row A command that clears the composer must leave what the user typed in the thread: bare left-bar error lines with no user row read as a void (commercial-bar finding 1/4). Message submits already echo in dispatch_user_message_with_recovery; this covers the slash branch of both the launch and session submit tails. Test to follow on the headless-terminal seam (AppTerminal is Stdout-bound, so the existing dispatchers are not directly callable from tests). --- crates/tui/src/tui/ui/event_loop.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/tui/src/tui/ui/event_loop.rs b/crates/tui/src/tui/ui/event_loop.rs index 50fd70ade..44b55166a 100644 --- a/crates/tui/src/tui/ui/event_loop.rs +++ b/crates/tui/src/tui/ui/event_loop.rs @@ -859,6 +859,10 @@ async fn dispatch_launch_composer_submit( return Ok(false); } if looks_like_slash_command_input(&input) { + // Every submit echoes (see submit_decided_composer_input). + app.add_message(HistoryCell::User { + content: input.clone(), + }); if execute_command_input( terminal, app, @@ -966,6 +970,12 @@ async fn submit_decided_composer_input( return Ok(false); } if looks_like_slash_command_input(&input) { + // Every submit echoes: a command that clears the composer must leave + // what the user typed in the thread, not just its receipt — bare + // error lines with no user row read as a void. + app.add_message(HistoryCell::User { + content: input.clone(), + }); if execute_command_input( terminal, app,