tui: return from side chat on Ctrl-D#20282
Merged
etraut-openai merged 1 commit intomainfrom Apr 30, 2026
Merged
Conversation
canvrno-oai
approved these changes
Apr 29, 2026
fcoury-oai
approved these changes
Apr 30, 2026
Contributor
fcoury-oai
left a comment
There was a problem hiding this comment.
Code looks good, ran a smoke test: started a main thread, ran /side and used Ctrl+D.
With latest alpha codex I got a complete exit and with this code I successfully exited back to the main thread.
Approved!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Fixes #20264.
Side conversations are an ephemeral layer on top of the main chat. Pressing
Ctrl+Dfrom an empty side-chat composer should unwind back to the parent thread, matching the existing side-return behavior, instead of falling through to the global quit shortcut and exiting Codex.What changed
The side-return shortcut matcher now treats
Ctrl+Dthe same way it already treatsEscandCtrl+C. Because app-level side-return handling runs before the chat widget's global quit handling, this returns from/sidewhile preserving normalCtrl+Dquit behavior outside side conversations.The existing shortcut coverage was updated to include lowercase and uppercase
Ctrl+Dkey events.Verification
cargo test -p codex-tui side_return_shortcuts_match_esc_ctrl_c_and_ctrl_dcargo test -p codex-tuistarts successfully and the new shortcut test passes, but the broader suite later aborts in the unrelated existing testapp::tests::attach_live_thread_for_selection_rejects_unmaterialized_fallback_threadswith a stack overflow.