🎨 Palette: [UX improvement] Add explicit cancellation hint and option visibility in TUI prompts#133
🎨 Palette: [UX improvement] Add explicit cancellation hint and option visibility in TUI prompts#133haseeb-heaven wants to merge 1 commit into
Conversation
|
👋 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
📝 WalkthroughWalkthroughTwo lines in ChangesTUI Prompt Hint Improvements
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ 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 `@libs/terminal_ui.py`:
- Line 70: The footer assignment at line 70 uses a simple or operator that
causes the "Esc to cancel" hint to be completely dropped when custom help_text
is provided. Modify the logic to ensure that whenever a footer is displayed, it
always includes the cancellation hint. Either append the "Esc to cancel" text to
any provided help_text, or construct the footer by combining the help_text with
the cancellation information so that users always know they can press Esc to
cancel, regardless of whether custom help text is supplied.
🪄 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: f2447c88-1284-47f5-a64b-b05647c6f51b
📒 Files selected for processing (2)
.jules/palette.mdlibs/terminal_ui.py
| table.add_row(marker, label, style=style) | ||
|
|
||
| footer = help_text or 'Use Up/Down arrows and Enter to select.' | ||
| footer = help_text or 'Use Up/Down arrows and Enter to select. Esc to cancel.' |
There was a problem hiding this comment.
Esc hint is dropped whenever custom help text is provided.
The current fallback logic keeps "Esc to cancel" only when help_text is empty. For prompts that pass custom help text, cancellation discoverability is still missing.
Suggested fix
- footer = help_text or 'Use Up/Down arrows and Enter to select. Esc to cancel.'
+ base_help = help_text or 'Use Up/Down arrows and Enter to select.'
+ footer = base_help if 'esc' in base_help.lower() else f'{base_help} Esc to cancel.'🤖 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 `@libs/terminal_ui.py` at line 70, The footer assignment at line 70 uses a
simple or operator that causes the "Esc to cancel" hint to be completely dropped
when custom help_text is provided. Modify the logic to ensure that whenever a
footer is displayed, it always includes the cancellation hint. Either append the
"Esc to cancel" text to any provided help_text, or construct the footer by
combining the help_text with the cancellation information so that users always
know they can press Esc to cancel, regardless of whether custom help text is
supplied.
💡 What: Updated the TUI selector help text to explicitly mention 'Esc to cancel' and added inline options to non-interactive Prompts.
🎯 Why: Improves keyboard accessibility and discoverability in terminal environments by making available options and cancellation shortcuts explicit.
📸 Before/After: Help text changed from '...Enter to select.' to '...Enter to select. Esc to cancel.'
♿ Accessibility: Enhances cognitive accessibility by not relying on implicit knowledge of terminal conventions.
PR created automatically by Jules for task 1429867759782654953 started by @haseeb-heaven
Summary by CodeRabbit
New Features
Documentation