🎨 Palette: [UX improvement] Add keyboard trap exit, clear choices, and shortcut hints#122
🎨 Palette: [UX improvement] Add keyboard trap exit, clear choices, and shortcut hints#122haseeb-heaven wants to merge 1 commit into
Conversation
- Map \x03 to exit actions in raw mode - Expose choices in non-interactive prompts explicitly - Add cancel shortcut hints to UI footers
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughThis PR extends keyboard interrupt handling in the terminal UI to recognize Ctrl-C as an escape/cancel signal on both Windows and Unix platforms, updates UI footer text to communicate this capability, and formats non-TTY option prompts to display available choices inline. ChangesTUI Keyboard Handling and Presentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.jules/palette.md:
- Line 1: Update the changelog entry header in .jules/palette.md by changing the
date string "2024-06-11" to "2026-06-11" so the entry matches this PR's creation
date; edit the top header line that currently reads "## 2024-06-11 - TUI
Keyboard Trap & Options Clarity" to "## 2026-06-11 - TUI Keyboard Trap & Options
Clarity".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dc7c4ca0-42a9-4ac9-82d7-f10b352f6061
📒 Files selected for processing (2)
.jules/palette.mdlibs/terminal_ui.py
| @@ -0,0 +1,3 @@ | |||
| ## 2024-06-11 - TUI Keyboard Trap & Options Clarity | |||
There was a problem hiding this comment.
Correct the changelog date to match this PR timeline.
Line 1 uses 2024-06-11, but this PR was created on 2026-06-11; this will make the entry appear out of sequence in historical notes.
Suggested patch
-## 2024-06-11 - TUI Keyboard Trap & Options Clarity
+## 2026-06-11 - TUI Keyboard Trap & Options Clarity📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## 2024-06-11 - TUI Keyboard Trap & Options Clarity | |
| ## 2026-06-11 - TUI Keyboard Trap & Options Clarity |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.jules/palette.md at line 1, Update the changelog entry header in
.jules/palette.md by changing the date string "2024-06-11" to "2026-06-11" so
the entry matches this PR's creation date; edit the top header line that
currently reads "## 2024-06-11 - TUI Keyboard Trap & Options Clarity" to "##
2026-06-11 - TUI Keyboard Trap & Options Clarity".
💡 What: Mapped
\x03(Ctrl-C) to exit actions in raw mode, exposed choices in non-interactive prompts, and added cancel shortcut hints to the UI footer.🎯 Why: To prevent terminal keyboard traps, make available choices visible, and give users clear instructions on how to cancel TUI selections.
📸 Before/After: Visual update to prompts to include choice arrays and updated footer strings.
♿ Accessibility: Improved keyboard accessibility by explicitly providing an exit hatch for standard interrupts and making options immediately visible to screen readers using headless prompts.
PR created automatically by Jules for task 15196289772185900456 started by @haseeb-heaven
Summary by CodeRabbit