mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Clear stale transcript history when switching threads (#43994)
## Why History events queued by the previous thread can repopulate the transcript after a thread switch, mixing old content into the new thread's replay. ## What changed - Reset the transcript immediately and queue another reset before replaying the new thread, covering both snapshot switches and app-server thread replacement. - Leave the alternate screen when resetting, and pause terminal event handling until queued resets finish. - Process queued resets even when the transport is offline. ## Testing Add regression tests for both switch paths, including queued history, an open transcript overlay, and a disconnect before replay events are handled. Snapshot the replacement transcript to verify it contains only the new thread's content. GitOrigin-RevId: b68b07fb10ff35e908c2c184f80859dda637f977
This commit is contained in:
1 parent
721f46a07a
commit
b831057106
8 files changed
+185
-1
No files matched your search
@@ -45,6 +45,7 @@ pub(super) async fn make_test_app() -> App {
|
||||
has_emitted_history_lines: false,
|
||||
transcript_reflow: TranscriptReflowState::default(),
|
||||
initial_history_replay_buffer: None,
|
||||
pending_thread_switch_resets: 0,
|
||||
scrollback_has_older_history: false,
|
||||
enhanced_keys_supported: false,
|
||||
keymap: crate::keymap::RuntimeKeymap::defaults(),
|
||||
|
||||
Reference in new issue
Block a user