Skip to content

🎨 Palette: [UX improvement] Add explicit cancellation hint and option visibility in TUI prompts#133

Open
haseeb-heaven wants to merge 1 commit into
mainfrom
palette-tui-ux-1429867759782654953
Open

🎨 Palette: [UX improvement] Add explicit cancellation hint and option visibility in TUI prompts#133
haseeb-heaven wants to merge 1 commit into
mainfrom
palette-tui-ux-1429867759782654953

Conversation

@haseeb-heaven

@haseeb-heaven haseeb-heaven commented Jun 15, 2026

Copy link
Copy Markdown
Owner

💡 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

    • Selection prompts in terminal UI now display "Esc to cancel" hints for improved navigation
    • Option prompts now show allowed options inline in non-interactive mode
  • Documentation

    • Updated terminal UI guidelines to include explicit shortcut and cancellation hints

@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Two lines in TerminalUI are updated: the selector footer now appends "Esc to cancel" when help_text is provided, and the non-TTY Prompt.ask message embeds the allowed options as a pipe-separated inline list. A dated entry in .jules/palette.md records this as an established convention.

Changes

TUI Prompt Hint Improvements

Layer / File(s) Summary
Selector footer and non-TTY prompt hints
libs/terminal_ui.py, .jules/palette.md
Footer text uses help_text with "Esc to cancel" appended; non-TTY Prompt.ask message now includes [opt1|opt2|...] inline. The palette file records the convention with a 2025-06-15 dated entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Hop, hop! The terminal speaks,
"Esc to cancel," it now leaks!
Options listed, clear as dawn,
No more guessing, rabbit's gone.
🌿 Press a key and carry on!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main changes: adding explicit cancellation hints ('Esc to cancel') and improving option visibility in TUI prompts, which aligns with the PR's core objective of enhancing accessibility.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-tui-ux-1429867759782654953

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2a47494 and eb80e99.

📒 Files selected for processing (2)
  • .jules/palette.md
  • libs/terminal_ui.py

Comment thread libs/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.'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant