nit: ui on interruption (#9606)

This commit is contained in:
jif-oai
2026-01-21 14:09:15 +00:00
committed by GitHub
parent 2338f99f58
commit 338f2d634b
3 changed files with 39 additions and 0 deletions

View File

@@ -3393,6 +3393,38 @@ async fn interrupt_clears_unified_exec_processes() {
let _ = drain_insert_history(&mut rx);
}
#[tokio::test]
async fn interrupt_clears_unified_exec_wait_streak_snapshot() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(None).await;
chat.handle_codex_event(Event {
id: "turn-1".into(),
msg: EventMsg::TurnStarted(TurnStartedEvent {
model_context_window: None,
}),
});
let begin = begin_unified_exec_startup(&mut chat, "call-1", "process-1", "just fix");
terminal_interaction(&mut chat, "call-1a", "process-1", "");
chat.handle_codex_event(Event {
id: "turn-1".into(),
msg: EventMsg::TurnAborted(codex_core::protocol::TurnAbortedEvent {
reason: TurnAbortReason::Interrupted,
}),
});
end_exec(&mut chat, begin, "", "", 0);
let cells = drain_insert_history(&mut rx);
let combined = cells
.iter()
.map(|lines| lines_to_single_string(lines))
.collect::<Vec<_>>()
.join("\n");
let snapshot = format!("cells={}\n{combined}", cells.len());
assert_snapshot!("interrupt_clears_unified_exec_wait_streak", snapshot);
}
#[tokio::test]
async fn turn_complete_clears_unified_exec_processes() {
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(None).await;