feat(cli): Invert quota language to 'percent used'#20100
Conversation
Summary of ChangesHello @keithguerin, 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 refactors the display of quota information across the CLI to present usage as 'percent used' rather than 'percent remaining'. This change improves consistency with other developer tools and UX guidelines. It involves updating calculation logic, display text, and color-coding thresholds in various UI components, including the footer and Highlights
Changelog
Activity
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
|
|
Size Change: +5.18 kB (+0.02%) Total Size: 26 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the quota display logic to show 'percent used' instead of 'percent remaining', which is a clear UX improvement. The changes are consistently applied across UI components, tests, and snapshots. I have one point of feedback regarding an unrelated dependency change that should be addressed to keep the pull request focused.
0312bd2 to
9aa4880
Compare
|
Addressed the concern about the |
|
Great work on this PR! The inversion to "percent used" and the new visual progress bar look really solid. I also appreciate the thorough test updates. I have one minor piece of feedback regarding the layout on smaller terminals: Terminal Truncation Risk ( Suggestion: Consider using a more compact format for the reset time in this table view (e.g., |
| export const CACHE_EFFICIENCY_MEDIUM = 15; | ||
|
|
||
| export const QUOTA_THRESHOLD_HIGH = 20; | ||
| export const QUOTA_THRESHOLD_MEDIUM = 5; |
There was a problem hiding this comment.
I think these are no longer used? if so we could clean these up
sehoon38
left a comment
There was a problem hiding this comment.
I've addressed the feedback regarding verbosity and terminal width. The reset time is now more concise (e.g., '1h 5m') and the stats table is responsive to terminal width, shrinking or hiding elements as needed. Tests and snapshots have been updated and are passing.
| return text.replace(pattern, '').trim(); | ||
| } | ||
|
|
||
| export const formatResetTime = (resetTime: string): string => { |
There was a problem hiding this comment.
we should add some tests for this
| const emptySteps = totalSteps - filledSteps; | ||
| return ( | ||
| <Box flexDirection="row"> | ||
| <Text color={color}>{'▬'.repeat(filledSteps)}</Text> |
e94a27c to
b4ff845
Compare
b4ff845 to
481d1c7
Compare
4f18b1a to
a923fe9
Compare
46920fe to
85e305d
Compare
Co-authored-by: jacob314 <jacob314@gmail.com>



Summary
Invert the language around quotas from "percent left" to "percent used" and introduce a refined visual progress indicator in the
/statscommand output.Details
1. Quota Language Inversion
/stats, and pre-prompt alerts).2. Visual Progress Indicator
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬) to the/statstable.3. Resilient Rendering
formatResetTimeto handle missing or invalid reset dates.4. Technical Improvements
getUsedStatusColorhelper for "higher is worse" logic.QuotaDisplay,StatsDisplay,Footer).Related Issues
Closes #20098
How to Validate
npm test -w @google/gemini-cli -- src/ui/components/QuotaDisplay.test.tsx src/ui/components/StatsDisplay.test.tsx src/ui/components/Footer.test.tsxto verify UI logic./statsoutput.Pre-Merge Checklist