Files
codex/codex-rs/tui
Eric Traut b831057106 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
2026-09-09 02:26:50 +00:00
..