feat(cli): polish cached token stats and simplify stats display when quota is present.#14961
feat(cli): polish cached token stats and simplify stats display when quota is present.#14961
Conversation
|
Size Change: +3.23 kB (+0.01%) Total Size: 21.6 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request polishes the statistics display by improving labels, colors, and layout. The changes in ModelStatsDisplay make the token breakdown clearer. However, the refactoring of StatsDisplay and its ModelUsageTable component has led to a significant regression: key statistical information, such as token usage columns and cache savings highlights, is now hidden when user quota information is displayed. This removes valuable context for the user. My review includes feedback to address this loss of information to ensure the stats display remains comprehensive.
111f7a1 to
c6b9699
Compare
c6b9699 to
69ddb85
Compare
This is a misunderstanding of what the pr is doing. |
| const usageLimitWidth = quotas ? 30 : 0; | ||
| const usageLimitWidth = showQuotaColumn ? 28 : 0; | ||
|
|
||
| const cacheEfficiencyColor = getStatusColor(cacheEfficiency, { |
There was a problem hiding this comment.
assume this was just missed before. Gemini added it back and I left it.
| width={requestsWidth} | ||
| flexDirection="column" | ||
| alignItems="flex-end" | ||
| flexShrink={0} |
There was a problem hiding this comment.
UX is broken if this shrinks. Same elsewhere
69ddb85 to
e0caae0
Compare
|
/patch preview |
|
/patch stable |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
|
✅ Patch workflow(s) dispatched successfully! 📋 Details:
🔗 Track Progress: |
…quota is present. (#14961) # Conflicts: # packages/cli/src/ui/components/StatsDisplay.test.tsx # packages/cli/src/ui/components/StatsDisplay.tsx # packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
…quota is present. (#14961) # Conflicts: # packages/cli/src/ui/components/StatsDisplay.test.tsx # packages/cli/src/ui/components/StatsDisplay.tsx # packages/cli/src/ui/components/__snapshots__/StatsDisplay.test.tsx.snap
|
🚀 Patch PR Created! 📋 Patch Details:
📝 Next Steps:
🔗 Track Progress: |
|
🚀 Patch Release Started! 📋 Release Details:
⏳ Status: The patch release is now running. You'll receive another update when it completes. 🔗 Track Progress: |
|
✅ Patch Release Complete! 📦 Release Details:
🎉 Status: Your patch has been successfully released and published to npm! 📝 What's Available:
🔗 Links: |
…mplify stats display when quota is present. (google-gemini#14961)
Summary
This commit refactors the CLI's statistics display (
/statsand/stats model) to provide a cleaner and more focused user experience.The primary change is to simplify the main
/statsview when user quota information is available. In this context, the display prioritizes the user's quota status, as that is the most actionable information. The detailed token breakdown, which can create a cluttered view, is hidden. Users who need to see the full token breakdown can use the more detailed/stats modelview.Specific changes include:
Simplified Main Stats View (
/stats):Input Tokens,Cache Reads,Output Tokens) and the "Savings Highlight" are now conditionally hidden in the presence of quota data to reduce information density.Improved Detailed View (
/stats model):Test snapshots have been updated to reflect these intentional UI improvements.
Details
/statswhen using OAuth/statswhen not using OAuth/stats modelexample:How to test
Run both signed in with an API key and OAuth. Verify that you don't see spurious messages about cost savings when using Oath and that the main
/statspage does not show token usage when using OAuth.Verify that when using API Key you do not see anything quota related when using
/statsand that you see Input Tokens, Output Tokens, and Cached Reads.