Skip to content

Conversation

@NTaylorMullen
Copy link
Collaborator

@NTaylorMullen NTaylorMullen commented Jan 13, 2026

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

  • Indicator Refinement: Added a check for config.isInteractiveShellEnabled() in AppContainer.tsx to ensure the 'Action Required' title only appears when the shell can actually receive input.
  • Activity Tracking: Updated useGeminiStream to track lastGeminiActivityTime from 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.
  • Focus Hint Improvement: Removed the lastOutputTime > 0 guard in usePhraseCycler.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.
  • Test Stability: Increased Vitest testTimeout and hookTimeout to 60s in packages/cli and packages/core to accommodate complex inactivity tests that use fake timers to simulate long durations.

Related Issues

Related to internal focus indicator improvements.

How to Validate

  1. Start Gemini CLI in a directory with interactive shell enabled.
  2. Run a command that takes a long time to start producing output.
  3. Observe that the loading phrase hint correctly appears after the inactivity delay.
  4. Run a shell command and do not focus it; verify '✋ Action Required' appears in the terminal title after 30s.
  5. Verify that any Gemini output (thought or text) resets the inactivity timer.
  6. Run npm run preflight to ensure all automated tests pass with the new timeouts.

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

- 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.
@NTaylorMullen NTaylorMullen requested a review from a team as a code owner January 13, 2026 09:04
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Refined 'Action Required' Indicator Logic: The logic for displaying the 'Action Required' indicator in the title has been updated to prevent false positives. It now accurately reflects shell interaction status by considering the lastOutputTime from various sources, ensuring the indicator only appears when there's actual inactivity, not just a long-running command that is still producing output.
  • Enhanced Inactivity Tracking: Introduced lastGeminiActivityTime to track the last time Gemini produced a thought or content event. This new timestamp is now incorporated into the overall lastOutputTime calculation, providing a more comprehensive measure of system activity.
  • Improved Test Coverage and Reliability: New test cases have been added to AppContainer.test.tsx to specifically verify the 'Action Required' indicator's behavior when the shell is streaming output, ensuring it does not falsely trigger. Additionally, test timeouts have been increased, and waitFor has been used for asynchronous assertions to improve test reliability.
  • Conditional Shell Focus Hint: The isShellAwaitingFocus condition now explicitly checks if config.isInteractiveShellEnabled() is true, ensuring the 'Action Required' indicator is only relevant when an interactive shell is active.
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.

@NTaylorMullen NTaylorMullen changed the title Fix 'Action Required' indicator for long-running shell commands fix(cli): refine 'Action Required' indicator and focus hints Jan 13, 2026
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 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.

@github-actions
Copy link

Size Change: +247 B (0%)

Total Size: 23 MB

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

compressed-size-action

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Jan 13, 2026
@NTaylorMullen NTaylorMullen added this pull request to the merge queue Jan 13, 2026
Merged via the queue into main with commit 304caa4 Jan 13, 2026
26 checks passed
@NTaylorMullen NTaylorMullen deleted the ntaylormullen/fix-action-required-indicator branch January 13, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants