Repository navigation
fix(cli): display retry progress indicator during connection recovery (#28340) - #29468
Conversation
…google-gemini#28340) - Decouple actionable statusPhrase from cosmetic loading phrases in useLoadingIndicator - Expose statusPhrase in UIState and forward through StatusRow/StatusNode to LoadingIndicator - Prioritize statusPhrase over thought.subject in LoadingIndicator so connection retries are always visible - Add comprehensive unit tests in StatusRow, LoadingIndicator, and useLoadingIndicator
|
📊 PR Size: size/L
|
Summary of ChangesHello, 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 critical connection retry information was being suppressed by cosmetic UI elements in the Gemini CLI. By decoupling operational status telemetry from general loading phrases and updating the UI rendering logic to prioritize this status, the CLI now reliably displays retry progress during connection failures, rate limits, or server overloads. 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 the 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 counterproductive. 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. Footnotes
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new statusPhrase property to the UI state and components (LoadingIndicator, StatusRow, and AppContainer) to display active operational statuses, such as connection retries. It prioritizes statusPhrase over other loading text (like thoughts or tips) and includes comprehensive unit tests to validate this behavior across different scenarios. I have no feedback to provide as there are no review comments to address.
There was a problem hiding this comment.
Code Review
This pull request introduces a new "statusPhrase" field to the UI state and loading indicator components to display active operational status (such as connection retries) with higher priority than thoughts or other loading phrases. Corresponding unit tests have been added to verify this behavior. A review comment points out a potential issue where the "statusPhrase" might be hidden from the user if "showLoadingIndicator" is false, and suggests updating the rendering conditions in "StatusRow" and "StatusNode" to prevent this.
|
Addressed: Updated StatusNode early-bailout check and showRow1Minimal in StatusRow.tsx to account for statusPhrase. Added a unit test verifying statusPhrase displays even when showLoadingIndicator is false. /gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new statusPhrase property to the CLI's UI state and components, including LoadingIndicator, StatusRow, AppContainer, and the useLoadingIndicator hook. This property is used to track and display active operational statuses (such as connection retries) and is prioritized over thought subjects or cosmetic loading phrases. Comprehensive unit tests have been added to verify the correct prioritization and rendering behavior under various conditions. I have no feedback to provide.
Summary
Fixes an issue where the terminal loading indicator fails to display retry progress when connection failures, rate limits (429), or server overloads (503) occur with
ui.errorVerbosity = "full". The UI previously stayed perpetually stuck displaying"Thinking..."because the retry status phrase was dropped during status bar refactoring and suppressed by active thought subjects.Details
useLoadingIndicator.ts, separated actionable connection retry telemetry into a dedicatedstatusPhraseproperty distinct from cosmeticcurrentLoadingPhrase(tips and witty phrases).statusPhrasetoUIStateContext, surfaced it inAppContainer.tsx, and passed it down throughStatusRowProps,StatusRow, andStatusNodeto<LoadingIndicator>.LoadingIndicator.tsx, prioritizedstatusPhraseabovethought?.subject. This ensures critical operational recovery status (e.g.,Trying to reach gemini-2.5-flash (Attempt 2/5)) is always immediately visible to the user, while keeping cosmetic rotating tips and witty phrases properly subordinate to model thoughts.StatusRow.test.tsx: Verified rendering ofstatusPhrasefromuiState, prioritization over thoughts, direct prop passing, generic low-verbosity retry hints, active hooks, and narrow terminal handling.LoadingIndicator.test.tsx: VerifiedstatusPhrasepriority over boththought.subjectandcurrentLoadingPhrase.useLoadingIndicator.test.tsx: VerifiedstatusPhrasegeneration when responding with retries and cleanup when idle.Related Issues
Fixes #28340
Resolves b/561554757
How to Validate
npm test -w @google/gemini-cli -- src/ui/hooks/useLoadingIndicator.test.tsx src/ui/components/StatusRow.test.tsx src/ui/components/LoadingIndicator.test.tsxTrying to reach <model> (Attempt N/M)."Thinking...".ui.errorVerbosity: "low"; verify retry message is hidden until attempt threshold is met, then displays"This is taking a bit longer, we're still on it.".Pre-Merge Checklist