Skip to content

🎨 Palette: [UX improvement] Add explicit prompt choices, shortcut hints, and Ctrl-C escape handling to TUI#95

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

🎨 Palette: [UX improvement] Add explicit prompt choices, shortcut hints, and Ctrl-C escape handling to TUI#95
haseeb-heaven wants to merge 1 commit into
mainfrom
palette-tui-ux-enhancements-17102559398992399184

Conversation

@haseeb-heaven

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

Copy link
Copy Markdown
Owner

💡 What: Mapped Ctrl-C (\x03) to escape in TUI raw mode, added explicit prompt choices to headless Prompt.ask, and added clear shortcut hints ('Esc/Ctrl-C to cancel') to all TUI selectors.
🎯 Why: Prevents keyboard traps, ensures headless mode options are visible, and makes the TUI more intuitive and accessible.
📸 Before/After: N/A
♿ Accessibility: Avoids keyboard traps by properly mapping standard interrupt bytes (\x03) to exit actions in raw mode.


PR created automatically by Jules for task 17102559398992399184 started by @haseeb-heaven

Summary by CodeRabbit

  • New Features

    • Ctrl-C now functions as an exit/cancel action alongside Escape in terminal UI
    • Enhanced selection prompts to display available options in non-interactive mode
    • Improved user hints showing "Esc/Ctrl-C to cancel" shortcuts
  • Documentation

    • Added terminal UI behavior guidance for shortcut hints and prompt formatting

@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.

@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 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cc3af79f-a5cf-46db-8b94-fe02f015ca0c

📥 Commits

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

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

📝 Walkthrough

Walkthrough

Terminal UI key interrupt handling is standardized to treat Ctrl-C the same as Escape across Windows and POSIX platforms. Selection prompts are updated with explicit "Esc/Ctrl-C to cancel" guidance. Non-interactive mode includes available choices in the prompt text. A documentation guide records these UX enhancements.

Changes

Terminal UX Interrupt and Feedback Enhancement

Layer / File(s) Summary
Ctrl-C interrupt key mapping
libs/terminal_ui.py
Ctrl-C is mapped to escape on Windows in the escape-key condition and on POSIX in raw-key handling to provide consistent interrupt behavior across platforms.
Selection interface text updates
libs/terminal_ui.py
Selector panel footer and help text in _select_boolean and select_model now explicitly show "Esc/Ctrl-C to cancel" instruction. Non-TTY mode prompts include available choices as a pipe-separated list in the prompt text.
Terminal UX enhancement documentation
.jules/palette.md
New documentation section records terminal UX enhancements including Ctrl-C interrupt mapping, explicit cancellation hints, and choice formatting for Rich prompt parsing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A Ctrl-C caught in a trap,
Now maps to escape with a snap,
Selections now say "Cancel right here!"
Both Windows and Unix, crystal clear,
UX enhanced, no more fear! 🎉

🚥 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 addresses the main changes: Ctrl-C escape handling, explicit prompt choices, and shortcut hints in the TUI—all core objectives of the PR.
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-enhancements-17102559398992399184

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.

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