fix(cli): dismiss '?' shortcuts help on hotkeys and active states - #18583
Conversation
Summary of ChangesHello @LyalinDotCom, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refines the user experience of the CLI's shortcuts help panel. Previously, the panel could remain visible during active operations or when other critical UI elements required attention. The changes ensure that the shortcuts help automatically dismisses when a user presses a registered hotkey or when the application transitions into an active state like streaming responses or displaying confirmation dialogs. This makes the help panel less intrusive and more context-aware, improving overall usability without altering its core activation or manual dismissal methods. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively improves the user experience by ensuring the shortcuts help panel is dismissed during active workflows and when hotkeys are pressed. The changes are well-structured, with new logic encapsulated in a dedicated utility function and new behavior covered by tests. The identified instance of duplicated logic for determining the hasPendingActionRequired state should be refactored to maintain a single source of truth.
|
Size Change: +2.03 kB (+0.01%) Total Size: 24.3 MB
ℹ️ View Unchanged
|
…com/google-gemini/gemini-cli into fix-shortcuts-menu-visibility-18546
…ogle-gemini#18583) Co-authored-by: jacob314 <jacob314@gmail.com>
…ogle-gemini#18583) Co-authored-by: jacob314 <jacob314@gmail.com>
…8583) Co-authored-by: jacob314 <jacob314@gmail.com>
…ogle-gemini#18583) Co-authored-by: jacob314 <jacob314@gmail.com>

Summary
Improve
?Quick Shortcuts Help visibility so it dismisses during active workflows and on registered hotkeys.Details
packages/cli/src/ui/utils/shortcutsHelp.ts.?behavior,Escprecedence, and existing input semantics intact.InputPrompt,Composer, andAppContainertests.Related Issues
Fixes #18546
Related to #18532
How to Validate
npm run test --workspace @google/gemini-cli -- src/ui/components/InputPrompt.test.tsx src/ui/components/Composer.test.tsx src/ui/AppContainer.test.tsxnpm run lint --workspace @google/gemini-clinpm run typecheck --workspace @google/gemini-clinpm run build --workspace @google/gemini-cli?on empty prompt.Ctrl+R,Ctrl+X,F12) and verify shortcuts help closes.Pre-Merge Checklist