Skip to content

feat(cli): add animated progress bar to /compress command#26973

Open
rushikeshsakharleofficial wants to merge 15 commits into
google-gemini:mainfrom
rushikeshsakharleofficial:feat/compress-progress-bar
Open

feat(cli): add animated progress bar to /compress command#26973
rushikeshsakharleofficial wants to merge 15 commits into
google-gemini:mainfrom
rushikeshsakharleofficial:feat/compress-progress-bar

Conversation

@rushikeshsakharleofficial
Copy link
Copy Markdown

Summary

  • Adds an animated filling progress bar to the /compress (a.k.a. /summarize, /compact) command UI
  • Bar fills asymptotically toward ~90% while compression is pending, then snaps to 100% on completion
  • Reuses the existing ProgressBar component; no new dependencies

Changes

packages/cli/src/ui/components/messages/CompressionMessage.tsx

  • Import useState, useEffect from React and existing ProgressBar component
  • Add useEffect that drives a simulated progress value (150ms interval, easing toward 90%)
  • When isPending flips to false, progress snaps to 100%
  • Render progress bar + percentage below the spinner/status text row

Test plan

  • Run /compress in an active session and observe bar filling during compression
  • Confirm bar reaches 100% and stays visible after completion with token stats
  • Confirm no regression in spinner display or final compression status text

Add asymptotic filling progress bar to CompressionMessage that animates
toward 90% while compression is pending, then snaps to 100% on completion.
@rushikeshsakharleofficial rushikeshsakharleofficial requested a review from a team as a code owner May 13, 2026 09:15
@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 enhances the user experience of the /compress command by adding a visual progress indicator. By utilizing the existing ProgressBar component and a new effect hook, the UI now provides a clearer sense of progress during long-running compression tasks without introducing new dependencies.

Highlights

  • Animated Progress Bar: Introduced an animated progress bar to the /compress command UI to provide better visual feedback during the compression process.
  • Asymptotic Progress Logic: Implemented a React effect that simulates progress, filling the bar asymptotically toward 90% while pending and snapping to 100% upon completion.
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 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 .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 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

  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 introduces a progress bar to the CompressionMessage component in the CLI UI. It utilizes React's useState and useEffect hooks to simulate an incremental progress animation while compression is pending, which completes once the process finishes. The component's layout was also updated to a column-based structure to display the progress bar and percentage below the status message. I have no feedback to provide as there were no review comments.

@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label May 13, 2026
Three bugs prevented rate limit from appearing in /stats:
1. slashCommandProcessor dropped all quota fields when converting STATS message
2. HistoryItemDisplay never passed quotaStats/currentModel/creditBalance to StatsDisplay
3. StatsDisplay accepted quotaStats prop but never rendered it

Add Rate Limit row to Interaction Summary section showing remaining/limit and reset time.
- Show ↑input ↓output token counts in footer during chat
- Track lastOutputTokenCount in uiTelemetry per API response
- Tool execution uses ● indicator and Name(description) format
- Replace bordered output box with ⎿ connector layout
- Show Waiting… text while tool executing with no output yet
…ssing

Add StreamingState.Processing set before agent.send() so the spinner
appears during the 0.5-3s pre-request window (hook execution, compression
check, masking scan) instead of leaving the UI blank.
Adds length-based cache to ToolOutputMaskingService.mask(). On every turn
where no new tool outputs were added, the O(n) backward history scan is
skipped entirely. Cache invalidated on compression and history replacement.
code-outline-graph update completes in <2s normally. 30s was causing
up to 30s blocking delay after every write/edit tool call in agentic tasks.
Replace last-request prompt/output counts with session cumulative totals.
Input arrow now shows total tokens sent across all requests; output arrow
shows total candidate tokens received. Context % remains context-window based.
@rushikeshsakharleofficial rushikeshsakharleofficial requested a review from a team as a code owner May 13, 2026 11:49
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.

1 participant