Skip to content

feat: custom loading phrase when interactive shell requires input#12535

Merged
jackwotherspoon merged 14 commits intomainfrom
interactive-shell-message
Nov 21, 2025
Merged

feat: custom loading phrase when interactive shell requires input#12535
jackwotherspoon merged 14 commits intomainfrom
interactive-shell-message

Conversation

@jackwotherspoon
Copy link
Copy Markdown
Collaborator

@jackwotherspoon jackwotherspoon commented Nov 4, 2025

Summary

Interactive shell hint (ctrl+f to focus) is displayed when interactive shell is requiring input... however loading phrases keep spinning... making it seem like Gemini is still thinking or doing work.

Example:

⠏ Mining for more Dilithium crystals... (esc to cancel, 12s)

Details

This experience is confusing to users as they may not notice the interactive shell is requiring their input.

int.shell.message.mp4

Instead, displaying a very clear loading phrase that interactive shell is awaiting input provides a better DX.

Related Issues

Fixes #11765

How to Validate

Enable shell mode using ! and run an interactive command like nvim.

After 5s of no output being displayed, both the hint and new loading phrase should appear.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jackwotherspoon, 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 addresses a user experience issue where the CLI's loading indicator would continue to spin with general witty phrases even when an interactive shell was paused, awaiting user input. The change introduces a clear, dedicated loading phrase that appears after a short delay, informing the user that the interactive shell requires their attention. This significantly improves clarity and reduces user confusion by providing a more accurate status of the application.

Highlights

  • Improved Interactive Shell Loading Phrase: Introduced a specific loading phrase, 'Interactive shell awaiting input... press Ctrl+f to focus shell', to clearly indicate when an interactive shell is waiting for user input.
  • Timed Display of Hint: The new interactive shell loading phrase will appear after 5 seconds of no output from the interactive shell, preventing premature display during active processing.
  • Output Time Tracking: Implemented tracking of the lastOutputTime for both shell commands and tool outputs to accurately determine when an interactive shell has been idle and is awaiting input.
  • Enhanced Loading Indicator Logic: Updated the useLoadingIndicator and usePhraseCycler hooks to incorporate the new logic for displaying the interactive shell waiting phrase, including resetting the timer if new output is received.
  • Comprehensive Testing: Added new test cases for useLoadingIndicator and usePhraseCycler to ensure the correct behavior of the interactive shell waiting phrase, including scenarios for timer resets and prioritization.
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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 4, 2025

Size Change: +3.59 kB (+0.02%)

Total Size: 21.1 MB

Filename Size Change
./bundle/gemini.js 21.1 MB +3.59 kB (+0.02%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@jackwotherspoon
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
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 pull request effectively addresses the confusing user experience when an interactive shell is awaiting input. The solution to display a clear loading phrase is well-implemented by tracking the last output time and using a timer to show the hint. The changes are logically sound and the addition of comprehensive tests is commendable. I have one suggestion to improve the maintainability of the useReactToolScheduler hook.

@jackwotherspoon jackwotherspoon force-pushed the interactive-shell-message branch from 4c8a10c to 687095e Compare November 20, 2025 02:22
@jackwotherspoon
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
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 pull request introduces a helpful user experience improvement by displaying a custom loading phrase when an interactive shell is awaiting input. This prevents confusion when the shell is waiting for the user but the loading spinner is still active. The implementation is well-structured, introducing a new useInactivityTimer hook and correctly plumbing the necessary state through the component tree. The changes are logical and include relevant test updates.

I have one piece of feedback regarding a bug in the implementation of the inactivity timer for the focus hint, which could prevent the hint from showing up in certain scenarios.

@jackwotherspoon jackwotherspoon added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit d351f07 Nov 21, 2025
22 checks passed
@jackwotherspoon jackwotherspoon deleted the interactive-shell-message branch November 21, 2025 17:30
thacio added a commit to thacio/auditaria that referenced this pull request Nov 23, 2025
@SandyTao520
Copy link
Copy Markdown
Contributor

/patch preview

@github-actions
Copy link
Copy Markdown

Patch workflow(s) dispatched successfully!

📋 Details:

  • Channels: preview
  • Commit: d351f07758523d8fd4ccdceade317e745e9583d9
  • Workflows Created: 1

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

🚀 Patch PR Created!

📋 Patch Details:

📝 Next Steps:

  1. Review and approve the hotfix PR: #13813
  2. Once merged, the patch release will automatically trigger
  3. You'll receive updates here when the release completes

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

🚀 Patch Release Started!

📋 Release Details:

  • Environment: prod
  • Channel: preview → publishing to npm tag preview
  • Version: v0.18.0-preview.1
  • Hotfix PR: Merged ✅
  • Release Branch: release/v0.18.0-preview.1-pr-12535

⏳ Status: The patch release is now running. You'll receive another update when it completes.

🔗 Track Progress:

@github-actions
Copy link
Copy Markdown

Patch Release Complete!

📦 Release Details:

🎉 Status: Your patch has been successfully released and published to npm!

📝 What's Available:

🔗 Links:

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

Labels

None yet

3 participants