Skip to content

tui: return from side chat on Ctrl-D#20282

Merged
etraut-openai merged 1 commit intomainfrom
etraut/side-ctrl-d
Apr 30, 2026
Merged

tui: return from side chat on Ctrl-D#20282
etraut-openai merged 1 commit intomainfrom
etraut/side-ctrl-d

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

Why

Fixes #20264.

Side conversations are an ephemeral layer on top of the main chat. Pressing Ctrl+D from 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+D the same way it already treats Esc and Ctrl+C. Because app-level side-return handling runs before the chat widget's global quit handling, this returns from /side while preserving normal Ctrl+D quit behavior outside side conversations.

The existing shortcut coverage was updated to include lowercase and uppercase Ctrl+D key events.

Verification

  • cargo test -p codex-tui side_return_shortcuts_match_esc_ctrl_c_and_ctrl_d
  • cargo test -p codex-tui starts successfully and the new shortcut test passes, but the broader suite later aborts in the unrelated existing test app::tests::attach_live_thread_for_selection_rejects_unmaterialized_fallback_threads with a stack overflow.

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@etraut-openai etraut-openai merged commit 515aa9a into main Apr 30, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/side-ctrl-d branch April 30, 2026 00:26
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 30, 2026
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.

ctrl+d in /side should exit the side chat, not exit codex

3 participants