-
Notifications
You must be signed in to change notification settings - Fork 6.2k
feat(tui): Display keyboard shortcuts inline for approval options #5889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tui): Display keyboard shortcuts inline for approval options #5889
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
oh, interesting. it's a claude commit - so it doesn't pass the CLA. @codex - can you push the same commit, but under your email? |
|
Note To use Codex here, create an environment for this repo. |
|
@codex - try one more time |
|
Note To use Codex here, create an environment for this repo. |
Shows single-key shortcuts (y, a, n) next to approval options to make them more discoverable. Previously these shortcuts worked but were hidden, making the feature hard to discover. Changes: - "Yes, proceed" now shows "y" shortcut - "Yes, and don't ask again" now shows "a" shortcut - "No, and tell Codex..." continues to show "esc" shortcut This improves UX by surfacing the quick keyboard shortcuts that were already functional but undiscoverable in the UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
fddd1e0 to
d471b75
Compare
|
Awesome, it works now :D |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Format code according to project style guidelines.
|
@etraut-openai - fixed the |
Update test snapshots for approval modal to include the now-visible keyboard shortcuts (y, a) that were previously hidden. The shortcuts were always functional but are now displayed inline to improve discoverability. Updated snapshots: - approval_modal_exec: shows 'y' and 'a' shortcuts - approval_modal_exec_no_reason: shows 'y' and 'a' shortcuts - approval_modal_patch: shows 'y' shortcut - status_widget_and_approval_modal: shows 'y' and 'a' shortcuts Fixes 5 failing tests: - approval_modal_exec_snapshot - approval_modal_exec_without_reason_snapshot - approval_modal_patch_snapshot - exec_approval_emits_proposed_command_and_decision_history - status_widget_and_approval_modal_snapshot
Wrap keyboard shortcuts in parentheses to make them more visually distinct from option text and clearly indicate they are shortcut keys. Changes: - Modified selection_popup_common.rs to render shortcuts as " (key)" instead of " key" - Updated all approval modal snapshots to reflect the new format UI change: Before: "1. Yes, proceed y" After: "1. Yes, proceed (y)" This follows common UI patterns and improves visual clarity, making shortcuts more obvious and easier to scan.
|
@etraut-openai – thanks for your reviews! updated the code(fixed tests snapshots) + also added parentheses for better visual clarity on what's the text vs what's the shortcut
|
Update the snapshot for exec_approval_emits_proposed_command_and_decision_history test that was missed in the previous commit. This snapshot also needs to show keyboard shortcuts in parentheses.
|
BTW, I asked our designer to review this change, and he gave it the thumbs up. He's going to look at adding this pattern to more places in the TUI. |
- Changed selection styling to use Style::default() instead of additive styling to prevent dim modifier from keyboard hints being preserved - Updated exec_approval_modal_exec snapshot to reflect consistent bold styling across entire selected line including shortcuts - Fixed issue where "(y)" shortcut appeared non-bold while "Yes, proceed" was bold 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Hi @etraut-openai, Thanks for the feedback! I've addressed both issues:
All changes are in commit f3d1424. The CI should now pass - feel free to re-run it. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Thanks again for the contribution! It's merged, and this will be included in the next release. |


Shows single-key shortcuts (y, a, n) next to approval options to make them more discoverable. Previously these shortcuts worked but were hidden, making the feature hard to discover.
Changes:
This improves UX by surfacing the quick keyboard shortcuts that were already functional but undiscoverable in the UI.
Update:
added parentheses for better visual clarity
