Skip to content

Comments

Add shortcuts hint and panel for discoverability#18035

Merged
jacob314 merged 36 commits intogoogle-gemini:mainfrom
LyalinDotCom:show_help_questionmark
Feb 6, 2026
Merged

Add shortcuts hint and panel for discoverability#18035
jacob314 merged 36 commits intogoogle-gemini:mainfrom
LyalinDotCom:show_help_questionmark

Conversation

@LyalinDotCom
Copy link
Collaborator

Summary
This PR adds an always-visible shortcuts hint and a toggleable shortcuts panel to improve command/key discoverability in the CLI input area.

Details

  • Shortcuts Hint: Adds a persistent "? for shortcuts" hint aligned left, with the context summary right-aligned for a cleaner layout.
  • Shortcuts Panel: Adds a compact shortcuts panel above the input with a solid header line and light background for scanability.
  • Keyboard Toggle UX: Pressing "?" toggles the panel; Esc/backspace/any other character closes it while maintaining normal input flow.
  • OS-aware Labels: Modifier labels adapt to macOS vs other platforms (Option vs Alt).
  • Test Stability: Composer indicator tests were relaxed to allow wrapped output without brittle line-length assumptions.

Related Issues
Related to #18034

How to Validate

  1. Start the CLI and confirm the hint appears: "? for shortcuts" on the left and context summary right-aligned.
  2. Press "?" with an empty prompt; expect the shortcuts panel to open without inserting a question mark.
  3. Press "?" again; expect the panel to close and a literal "?" to be inserted.
  4. Press Esc or Backspace while the panel is open; expect it to close without modifying input.
  5. Type any other character while the panel is open; expect it to close and the character to appear.
  6. Confirm modifier labels use Option on macOS and Alt elsewhere.

@LyalinDotCom LyalinDotCom requested a review from a team as a code owner February 1, 2026 00:39
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 enhances the user experience of the CLI by making its various commands and keybindings more accessible and discoverable. It introduces a persistent visual cue for shortcuts and a detailed, interactive panel that users can quickly summon and dismiss. This change aims to reduce the learning curve for new users and provide a convenient reference for experienced ones, ultimately streamlining interaction with the CLI.

Highlights

  • Enhanced Discoverability: Introduced an always-visible hint ("? for shortcuts") and a toggleable shortcuts panel in the CLI input area to improve command and keybinding discoverability.
  • Interactive Shortcuts Panel: The shortcuts panel can be opened by pressing "?" (when the prompt is empty) and closed by pressing "Esc", "Backspace", or any other character, ensuring a fluid user experience.
  • OS-Aware Key Labels: Modifier key labels within the shortcuts panel dynamically adapt to the operating system, displaying "Option" on macOS and "Alt" on other platforms.
  • Dedicated Shortcuts Command: A new built-in command "/shortcuts" (with aliases "/keys" and "?") has been added to programmatically toggle the shortcuts panel.
  • Improved Test Stability: Composer indicator tests were updated to use more flexible regex matching, accommodating wrapped output and reducing brittleness.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR introduces a helpful shortcut discovery feature with a persistent hint and a toggleable panel. No vulnerabilities were found in the provided code changes. However, there are a couple of high-severity issues related to the feature's trigger logic and layout robustness that need to be addressed to ensure a smooth user experience and maintain layout consistency.

@gemini-cli gemini-cli bot added the area/core Issues related to User Interface, OS Support, Core Functionality label Feb 1, 2026
@gemini-cli
Copy link
Contributor

gemini-cli bot commented Feb 1, 2026

Hi there! Thank you for your contribution to Gemini CLI. We really appreciate the time and effort you've put into this pull request.

To keep our backlog manageable and ensure we're focusing on current priorities, we are closing pull requests that haven't seen maintainer activity for 30 days. Currently, the team is prioritizing work associated with 🔒 maintainer only or help wanted issues.

If you believe this change is still critical, please feel free to comment with updated details. Otherwise, we encourage contributors to focus on open issues labeled as help wanted. Thank you for your understanding!

@gemini-cli gemini-cli bot closed this Feb 1, 2026
bdmorgan added a commit that referenced this pull request Feb 1, 2026
   This fixes a bug where PRs from maintainers (or any PR) could be
   immediately closed as stale even when just opened. The root causes:

   1. If team member fetch failed silently, maintainerLogins was empty
   2. lastActivity was initialized to epoch (1970), so any PR without
      detected maintainer activity appeared 50+ years old
   3. No minimum age check - PRs created today could be marked stale

   Changes:
   - Add explicit check to skip PRs created < 30 days ago from staleness
   - Initialize lastActivity to PR creation date instead of epoch
   - Improve logging for team fetch success/failure with details
   - Add error logging for reviews/comments fetch failures

   Fixes issue where PR #18035 from a maintainer was incorrectly closed.
@LyalinDotCom LyalinDotCom reopened this Feb 2, 2026
@LyalinDotCom LyalinDotCom requested a review from a team as a code owner February 2, 2026 00:21
@chrstnb
Copy link
Collaborator

chrstnb commented Feb 2, 2026

Build failed: Build process failed (no specific link errors found). Check logs for details.

2 similar comments
@chrstnb
Copy link
Collaborator

chrstnb commented Feb 2, 2026

Build failed: Build process failed (no specific link errors found). Check logs for details.

@chrstnb
Copy link
Collaborator

chrstnb commented Feb 2, 2026

Build failed: Build process failed (no specific link errors found). Check logs for details.

@chrstnb
Copy link
Collaborator

chrstnb commented Feb 2, 2026

Build failed: Build process failed (no specific link errors found). Check logs for details.

- Update LoadingIndicator tests to not pass currentLoadingPhrase when
  testing idle state, matching new component behavior that renders
  content when idle if there's a loading phrase or thought
- Fix Composer test mock to use StreamingState.Idle instead of null
- Add missing isConfigInitialized: true to Composer test mock
…taneously

Move the shortcuts panel escape handling before the streaming state check
so that pressing Escape when the panel is open only closes the panel.
A second Escape press is then needed to cancel the operation.
@keithguerin
Copy link
Contributor

Updated mock attached. Notes:

  • Remove background color
  • Put title below (instead of on) the top border. This is the new "drawer" style, and it provides separation from the status line without needing a full empty line. (The drawer design is subject to change, as we evolve the design system and make it work for other drawers such as background shells, todos, etc)
  • Put shortcut hint to the right of the status, since we need top left for "Mode". (I plan to make the status line persist, but its not right now. So for now we can either (a) have the hint only be visible when status is, or (b) jam it into the line mode/MCP/etc. I recommend (a).
shortcuts

@jacob314 jacob314 self-requested a review February 6, 2026 19:32
Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

I will follow up with some cleanup to remove text measurement logic that can be done in a more idiomatic way using ink.lgtm

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

Labels

area/core Issues related to User Interface, OS Support, Core Functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants