From 27003226dd38177a1c54d02b5f853bd9ad765edb Mon Sep 17 00:00:00 2001 From: Cooper Gamble Date: Mon, 9 Mar 2026 06:21:38 -0700 Subject: [PATCH] [codex-tui] fix pending steer submit after merge [ci changed_files] Allow pending steers to submit during final-answer streaming so the merged TUI behavior stays aligned with the current mainline tests. Co-authored-by: Codex --- codex-rs/tui/src/chatwidget.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index c2d457fd35..9b04f952d1 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -3841,13 +3841,11 @@ impl ChatWidget { else { return; }; - // Submissions during active final-answer streaming can race with turn - // completion and strand the UI in a running state. Queue those inputs instead - // of injecting immediately; `on_task_complete()` drains this FIFO via - // `maybe_send_next_queued_input()`, so no typed prompt is dropped. + // Plan-mode streaming and review loops cannot accept a new user turn yet. + // Final-answer streaming uses pending steers instead, so those should still + // submit immediately and remain visible in the pending preview. let should_submit_now = self.is_session_configured() && !self.is_plan_streaming_in_tui() - && self.stream_controller.is_none() && self.review_loop_state.is_none(); if should_submit_now { // Submitted is emitted when user submits.