Skip to content

style(ui): iterate on loading and error strings for precise conciseness#22087

Open
keithguerin wants to merge 6 commits intomainfrom
ux-string-iteration
Open

style(ui): iterate on loading and error strings for precise conciseness#22087
keithguerin wants to merge 6 commits intomainfrom
ux-string-iteration

Conversation

@keithguerin
Copy link
Copy Markdown
Contributor

@keithguerin keithguerin commented Mar 11, 2026

Fixes #

Summary

This PR refines user-facing strings across the Gemini CLI to prioritize Precise Conciseness and Telemetry over Etiquette. It focuses on improving the signal-to-noise ratio in loading states, retry logic, and error messages.

Strategic Shifts

  • Telemetry over Etiquette: Replaced polite filler (e.g., "Please wait", "Thank you") with direct status data (e.g., "Rate limit reached", "Retrying").
  • Precise Conciseness: Stripped unnecessary words to keep status and error messages concise, preventing "information snowblindness."
  • Noise Reduction: Omitted seconds from the loading duration once the task exceeds 1 minute (e.g., "8m 30s" -> "8m") to reduce visual flicker and focus on high-level telemetry.

Key Changes

1. Loading & Status

Component/File Before After
LoadingIndicator.tsx (esc to cancel, 8m 30s) (esc to cancel, 8m) (Seconds omitted after 1m)
useLoadingIndicator.ts This is taking a bit longer, we're still on it. System busy. Retrying...
useLoadingIndicator.ts Trying to reach ${model} (Attempt X/Y) Retrying ${model} (Attempt X/Y)

2. Error & System Messages

File Before After
DetailedMessagesDisplay.tsx Debug Console Debug console
useGeminiStream.ts This request failed. Press F12 for diagnostics... Request failed. Press F12 for diagnostics...
useGeminiStream.ts Some internal tool attempts failed... Previous tool attempts failed.
errorParsing.ts Please wait and try again later... Rate limit reached. Try again later...
errorParsing.ts Possible quota limitations in place... System busy or quota limit reached.
errorParsing.ts Switching to the ${fallbackModel} model Switching to ${fallbackModel}

How to Validate

  1. Tests: All relevant tests for LoadingIndicator, useGeminiStream, and errorParsing are passing:
npm test -w @google/gemini-cli -- src/ui/components/LoadingIndicator.test.tsx src/ui/hooks/useLoadingIndicator.test.tsx src/ui/hooks/useGeminiStream.test.tsx
npm test -w @google/gemini-cli-core -- src/utils/errorParsing.test.ts
  1. UI Inspection: Observe the loading states in a live terminal to confirm the refined duration formatting and concise status messages.

@keithguerin keithguerin requested review from a team as code owners March 11, 2026 22:49
@gemini-cli
Copy link
Copy Markdown
Contributor

gemini-cli bot commented Mar 11, 2026

Hi @keithguerin, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 refines the user-facing loading and error messages within the Gemini CLI. The changes are driven by a new design rationale emphasizing 'Precise Conciseness' and 'Telemetry over Etiquette,' aiming to provide users with clearer, more direct, and less verbose feedback during interactions. This update improves the overall user experience by making status and error reporting more informative and less ambiguous.

Highlights

  • Precise Conciseness: Loading and error strings in the Gemini CLI were refined to be under 5 words, preventing 'information snowblindness' and improving clarity.
  • Telemetry over Etiquette: Polite filler phrases like 'Please wait' were replaced with direct status data such as 'Retrying' to prioritize actionable information.
  • Deterministic Attribution: Delays and errors are now clearly attributed to either Gemini (generative analysis) or the System/API (infrastructure/quota).
  • Gemini Thinking Pattern: The standard 'Gemini is thinking...' status was implemented as the default loading state.
  • Skill Update: The keith_string-reviewer Skill was updated with a new 'Technical Status & Telemetry' section in its references to codify these new string principles.
Changelog
  • package-lock.json
    • Removed peer: true from multiple dependency entries.
  • packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
    • Lowercased 'Console' to 'console' in the debug message.
  • packages/cli/src/ui/components/LoadingIndicator.tsx
    • Adjusted loading phrase logic to default to 'Gemini is thinking...' and prevent 'Thinking...' duplication.
  • packages/cli/src/ui/hooks/useGeminiStream.test.tsx
    • Updated expected error messages in tests to reflect new concise strings.
  • packages/cli/src/ui/hooks/useGeminiStream.ts
    • Refactored SUPPRESSED_TOOL_ERRORS_NOTE and LOW_VERBOSITY_FAILURE_NOTE for conciseness.
  • packages/cli/src/ui/hooks/useLoadingIndicator.test.tsx
    • Updated expected loading and retry phrases in tests to align with new string rationale.
  • packages/cli/src/ui/hooks/useLoadingIndicator.ts
    • Modified retry loading phrases to be more concise, e.g., 'System busy. Retrying...' and 'Retrying [model]'.
  • packages/core/src/utils/errorParsing.test.ts
    • Updated expected error messages in tests for rate limit and quota increase suggestions.
  • packages/core/src/utils/errorParsing.ts
    • Revised rate limit error messages for Gemini and Vertex, and the default fallback model message, for conciseness.
  • pr_keith_thinking
    • Added a new subproject commit.
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
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 refines user-facing loading and error strings for better conciseness and clarity, which is a great improvement for the user experience. The changes are well-described and align with the stated goals. I've found one potential issue in the loading indicator logic that could lead to poorly formatted text when a thought.subject contains only whitespace. A code suggestion is provided to address this.

Comment on lines +55 to +57
: thought?.subject
? (thoughtLabel ?? thought.subject)
: currentLoadingPhrase;
? `Gemini is thinking about ${thoughtLabel ?? thought.subject}`
: (currentLoadingPhrase ?? 'Gemini is thinking...');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

There's a potential issue where thought.subject could be a string containing only whitespace. This would result in a message like Gemini is thinking about , which is not ideal. The hasThoughtIndicator constant correctly uses .trim() to check for this, but primaryText does not. To ensure consistent and clean UI output, the subject should be trimmed before being used in the display string.

Suggested change
: thought?.subject
? (thoughtLabel ?? thought.subject)
: currentLoadingPhrase;
? `Gemini is thinking about ${thoughtLabel ?? thought.subject}`
: (currentLoadingPhrase ?? 'Gemini is thinking...');
: thought?.subject?.trim()
? `Gemini is thinking about ${thoughtLabel ?? thought.subject.trim()}`
: (currentLoadingPhrase ?? 'Gemini is thinking...');

@keithguerin keithguerin force-pushed the ux-string-iteration branch from c3bd99c to a67939e Compare March 11, 2026 22:56
@gemini-cli gemini-cli bot added area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Mar 11, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 2026

Size Change: -241 B (0%)

Total Size: 26.3 MB

Filename Size Change
./bundle/chunk-7CY23PXA.js 0 B -14.6 MB (removed) 🏆
./bundle/chunk-JEQZMPFL.js 0 B -3.64 MB (removed) 🏆
./bundle/chunk-LHUFZIDA.js 0 B -3.4 kB (removed) 🏆
./bundle/core-7KOGVTQM.js 0 B -43.5 kB (removed) 🏆
./bundle/devtoolsService-UQUVC4FY.js 0 B -27.7 kB (removed) 🏆
./bundle/gemini-SVDTYWAZ.js 0 B -521 kB (removed) 🏆
./bundle/interactiveCli-UDSRAV5S.js 0 B -1.62 MB (removed) 🏆
./bundle/oauth2-provider-SQ7UW52C.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-4SVQF4OV.js 3.64 MB +3.64 MB (new file) 🆕
./bundle/chunk-6X63GQWB.js 3.4 kB +3.4 kB (new file) 🆕
./bundle/chunk-M7P73GKU.js 14.6 MB +14.6 MB (new file) 🆕
./bundle/core-O5HHGEOD.js 43.5 kB +43.5 kB (new file) 🆕
./bundle/devtoolsService-ZTSCKBNR.js 27.7 kB +27.7 kB (new file) 🆕
./bundle/gemini-V3KLSXF5.js 521 kB +521 kB (new file) 🆕
./bundle/interactiveCli-SL6YYF3S.js 1.62 MB +1.62 MB (new file) 🆕
./bundle/oauth2-provider-ESTHJDH3.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-GWQRIYMB.js 1.96 MB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/cleanup-QJIXHYES.js 0 B -856 B (removed) 🏆
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/gemini.js 2.06 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-GX6HE5X5.js 922 B 0 B
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 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-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/cleanup-YHB6VFCT.js 856 B +856 B (new file) 🆕

compressed-size-action

@keithguerin keithguerin force-pushed the ux-string-iteration branch from a67939e to 5953481 Compare March 12, 2026 16:32
@keithguerin keithguerin force-pushed the ux-string-iteration branch from 5953481 to 02962f5 Compare March 25, 2026 05:45
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Mar 25, 2026
@keithguerin keithguerin requested review from a team as code owners March 25, 2026 05:55
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

🧠 Model Steering Guidance

This PR modifies files that affect the model's behavior (prompts, tools, or instructions).

  • ⚠️ Consider adding Evals: No behavioral evaluations (evals/*.eval.ts) were added or updated in this PR. Consider adding a test case to verify the new behavior and prevent regressions.
  • 🚀 Maintainer Reminder: Please ensure that these changes do not regress results on benchmark evals before merging.

This is an automated guidance message triggered by steering logic signatures.

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 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. 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.

1 participant