Files
codex/codex-rs/tui/tests
Eric Traut d5355e95ef Keep Codex visible during external editor handoff (#48211)
## Why

Opening a separate-window editor from the fullscreen TUI leaves the alternate screen, hiding the draft and the instruction to save and close the editor.

## What changed

Preserve and repaint the last Codex frame when handing the terminal to an external editor, while releasing keyboard and mouse input modes. Track whether the alternate screen's keyboard mode is active so cleanup does not pop it twice if the editor switches screens. Restore TUI modes and the alternate screen when the editor returns.

## Testing

Add terminal integration coverage for separate-window editors, terminal editors that switch or reuse screens, and inline mode. Verify the visible draft and handoff hint, disabled mouse reporting, edited draft recovery, and continued typing. Add a unit test for balanced keyboard stacks whether or not the editor leaves the alternate screen.

GitOrigin-RevId: c2ff1046a933f5f9e3168663e2c326999845c578
2026-09-25 20:46:05 +00:00
..