mirror of
https://github.com/openai/codex.git
synced 2026-11-18 23:02:23 +00:00
Preserve TUI event ordering during active-thread draining (#39991)
## Why Draining every queued active-thread event in one foreground pass can overrun the frame budget. Buffered thread events can also race ahead of queued replay and startup app events, causing the TUI to switch views before the corresponding history and operations have been applied. ## What changed - Bound active-thread draining to one target frame interval and leave remaining notifications queued for a later frame. - Prioritize queued app events over active-thread events so replay state is applied before buffered closures or other thread notifications. - Block startup input only for pending requests, rather than ordinary queued notifications whose draining yielded at the frame deadline. - Leave selected side-thread closure handling to the foreground event loop. ## Testing Added tests covering deadline-limited notification draining and foreground handling of a selected side thread closing. GitOrigin-RevId: 41080d3df13ca308eec1ea0fbb0ba067a4640c4c
This commit is contained in:
1 parent
51ebf5b184
commit
f6519a355a
4 files changed
+140
-4
No files matched your search
@@ -561,7 +561,6 @@ impl App {
|
||||
};
|
||||
self.chat_widget.add_info_message(message, /*hint*/ None);
|
||||
}
|
||||
self.drain_active_thread_events(tui).await?;
|
||||
self.refresh_pending_thread_approvals().await;
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user