Files
codex/codex-rs
Benjamin Carlsson ab95cd4dd9 Preserve voice caption order when replaying TUI history (#44749)
## Why

Retained voice captions were appended after replayed history, placing earlier speech after later typed turns when switching back to a thread.

## What changed

Anchor completed captions to the next live turn and restore them before that turn during replay. Handle buffered item, delta, and completion events even when the turn-start event has been evicted. Restore remaining captions at the end of replay.

## Testing

Extend regression coverage to verify caption order and avoid duplicates across repeated thread switches. Add coverage for inactive-thread captions replayed before a later buffered turn without its start event, with and without a message delta.

GitOrigin-RevId: 6860a649bdcdda4937afb3ab4bbd75cf4ea5b4e6
2026-09-11 06:56:37 +00:00
..