Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codex-rs/tui/src/chatwidget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,7 @@ impl ChatWidget {

pub(crate) fn handle_exec_begin_now(&mut self, ev: ExecCommandBeginEvent) {
// Ensure the status indicator is visible while the command runs.
self.bottom_pane.ensure_status_indicator();
self.running_commands.insert(
ev.call_id.clone(),
RunningCommand {
Expand Down
19 changes: 19 additions & 0 deletions codex-rs/tui/src/chatwidget/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,25 @@ async fn streaming_final_answer_keeps_task_running_state() {
assert!(!chat.bottom_pane.quit_shortcut_hint_visible());
}

#[tokio::test]
async fn exec_begin_restores_status_indicator_after_preamble() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(None).await;

chat.on_task_started();
assert_eq!(chat.bottom_pane.status_indicator_visible(), true);

chat.on_agent_message_delta("Preamble line\n".to_string());
chat.on_commit_tick();
drain_insert_history(&mut rx);

assert_eq!(chat.bottom_pane.status_indicator_visible(), false);
assert_eq!(chat.bottom_pane.is_task_running(), true);

begin_exec(&mut chat, "call-1", "echo hi");

assert_eq!(chat.bottom_pane.status_indicator_visible(), true);
}

#[tokio::test]
async fn ctrl_c_shutdown_works_with_caps_lock() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(None).await;
Expand Down
Loading