🎨 Palette: Improve terminal UX accessibility with visible prompts and explicit cancel hints#183
🎨 Palette: Improve terminal UX accessibility with visible prompts and explicit cancel hints#183haseeb-heaven wants to merge 1 commit into
Conversation
Added explicit keyboard cancel hints (`Ctrl-C to cancel`), gracefully handled `\x03` keystrokes to prevent keyboard traps, and surfaced available choices explicitly in headless inputs.
|
👋 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 trial has ended. Reactivate Greptile to resume code reviews.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds Ctrl-C detection to the terminal UI's key-reading logic on Windows and POSIX, raising KeyboardInterrupt when detected. Updates the selector footer to always show a cancel hint and modifies the non-TTY prompt to list available options. Adds a documentation note in the palette file. ChangesTerminal UI Ctrl-C Handling
Estimated code review effort: 1 (Trivial) | ~5 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant TerminalUI
participant OS as "OS Input (msvcrt/stdin)"
User->>TerminalUI: Trigger key read (_read_key)
TerminalUI->>OS: Read single key
OS-->>TerminalUI: Return key
alt Key is Ctrl-C ('\x03')
TerminalUI-->>User: Raise KeyboardInterrupt
else Other key
TerminalUI-->>User: Return key normally
end
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
💡 What: Added explicit keyboard cancel hints (
Ctrl-C to cancel), gracefully handled\x03keystrokes to prevent keyboard traps, and surfaced available choices explicitly in headless inputs.🎯 Why: To prevent terminal hangs from missing
EscANSI sequences, give users explicit visual affordances for prompts, and provide a clear, reliable path to exit.📸 Before/After: Before, non-interactive prompts didn't list options, and
Esccaused hangs. After, choices are explicitly visible[code|chat|...]andCtrl-Cis properly handled.♿ Accessibility: Improved terminal-equivalent accessibility by surfacing explicit keyboard shortcuts, avoiding keyboard traps, and clearly displaying available input choices.
PR created automatically by Jules for task 3787583290221606918 started by @haseeb-heaven
Summary by CodeRabbit
New Features
Bug Fixes