Skip to content

Keep Codex visible during external editor handoff - #48211

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c2ff1046a933f5f9e3168663e2c326999845c578
Sep 25, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c2ff1046a933f5f9e3168663e2c326999845c578

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Keep Codex visible during external editor handoff

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.

## 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
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c2ff1046a933f5f9e3168663e2c326999845c578 branch from db31b25 to d5355e9 Compare September 25, 2026 20:46
@copyberry
copyberry Bot merged commit d5355e9 into main Sep 25, 2026
14 of 18 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c2ff1046a933f5f9e3168663e2c326999845c578 branch September 25, 2026 20:46
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 25, 2026

This branch was successfully deployed

1 active deployment
issue-triage — d5355e95 Deployed Sep 25, 2026 by jsyzyvc6cn-tech via Identify potential duplicates (all issues) #48388
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants