-
Notifications
You must be signed in to change notification settings - Fork 10.6k
fix(cli): refine 'Action Required' indicator and focus hints #16497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cli): refine 'Action Required' indicator and focus hints #16497
Conversation
- Refine 'Action Required' indicator logic to only trigger when interactive shell is enabled. - Ensure 'Action Required' resets upon receiving any Gemini activity (thought/content). - Remove redundant lastOutputTime > 0 check in usePhraseCycler to ensure focus hints can appear even if no output has been produced yet. - Increase vitest and hook timeouts to 60s in packages/cli and packages/core to accommodate complex inactivity tests and larger UI components. - Add comprehensive test cases in AppContainer and useGeminiStream to verify indicator behaviors and timer resets.
Summary of ChangesHello @NTaylorMullen, 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 an issue where the 'Action Required' indicator would incorrectly display during long-running shell commands that were still actively producing output. The core change involves refining the logic that determines when this indicator should be shown, by tracking the last output time from both shell and Gemini stream activities. This ensures the indicator accurately reflects true user interaction status, preventing unnecessary prompts and improving the user experience. The changes are thoroughly validated with new and updated test cases. Highlights
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.
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 refines the 'Action Required' indicator logic for long-running shell commands. The core change, which bases the inactivity timer on the lastOutputTime from various sources (Gemini, tools, shell) instead of just the shell's focus state, correctly prevents false positives when a command is actively streaming output. The inclusion of Gemini activity time is a thoughtful addition. The test suite has been enhanced with new cases that validate this improved behavior, and existing tests have been made more robust. The changes are well-implemented and I have no further recommendations.
|
Size Change: +247 B (0%) Total Size: 23 MB ℹ️ View Unchanged
|
Summary
Refines the 'Action Required' indicator logic and interactive focus hints to prevent false positives and ensure they correctly trigger during long-running shell commands without output.
Details
config.isInteractiveShellEnabled()inAppContainer.tsxto ensure the 'Action Required' title only appears when the shell can actually receive input.useGeminiStreamto tracklastGeminiActivityTimefrom Gemini thought and content events. This ensures that the inactivity timer resets whenever the model is active, preventing the indicator from appearing during long generation phases.lastOutputTime > 0guard inusePhraseCycler.ts. This allows the focus hint to appear even if a command has not yet produced any output (e.g., during slow initialization), fixing a bug where hints would never show for the first command in a session.testTimeoutandhookTimeoutto 60s inpackages/cliandpackages/coreto accommodate complex inactivity tests that use fake timers to simulate long durations.Related Issues
Related to internal focus indicator improvements.
How to Validate
npm run preflightto ensure all automated tests pass with the new timeouts.Pre-Merge Checklist