Skip to content

fix(tui): let esc exit empty shell mode#19986

Merged
fcoury-oai merged 1 commit intomainfrom
fcoury/esc-exit-shell-mode
Apr 28, 2026
Merged

fix(tui): let esc exit empty shell mode#19986
fcoury-oai merged 1 commit intomainfrom
fcoury/esc-exit-shell-mode

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

Summary

  • exit shell mode when Esc is pressed while the absorbed ! is the only input
  • add direct regression coverage plus a composer snapshot for the restored normal prompt state

Root cause

Shell mode stores the leading ! outside the editable textarea. After typing only !, the textarea is empty but the composer is still in bash mode, so the existing empty-composer Esc handling never runs.

Validation

  • just fmt
  • cargo test -p codex-tui bottom_pane::chat_composer::tests::esc_exits_empty_shell_mode
  • cargo test -p codex-tui bottom_pane::chat_composer::tests::footer_mode_snapshots
  • cargo insta pending-snapshots

cargo test -p codex-tui still reports unrelated existing /status snapshot drift in this local environment because the rendered permissions text is workspace-write with network access instead of the older read-only fixture text.

@fcoury-oai fcoury-oai marked this pull request as ready for review April 28, 2026 14:09
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecb16c05c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/bottom_pane/chat_composer.rs Outdated
@fcoury-oai fcoury-oai force-pushed the fcoury/esc-exit-shell-mode branch from ecb16c0 to 4457581 Compare April 28, 2026 15:03
@fcoury-oai fcoury-oai merged commit a036584 into main Apr 28, 2026
25 checks passed
@fcoury-oai fcoury-oai deleted the fcoury/esc-exit-shell-mode branch April 28, 2026 17:35
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 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.

2 participants