Skip to content

fix(usage): abbreviate large quota numbers in usage bars - #1804

Merged
realcodesiman merged 2 commits into
mainfrom
fix/usage-bars-compact-numbers
Nov 27, 2026
Merged

realcodesiman merged 2 commits into
mainfrom
fix/usage-bars-compact-numbers

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

  • Large quota values in the usage bars (e.g. 500,000,000) overflowed the narrow sidebar/account rail and broke the layout.
  • Values >= 10,000 are now abbreviated with compact notation (500M, 1.2K) via useFormatter, so they stay locale-aware.
  • The numbers no longer wrap or shrink (whitespace-nowrap shrink-0) and the label truncates instead; full values remain available in a title tooltip.

Test plan

  • pnpm ultracite fix and builder check-types pass (lefthook pre-commit)
  • Check the sidebar usage bars with large limits (e.g. 500,000,000) in en and a non-en locale
  • Check the account rail renders the same way

@github-actions github-actions Bot added the bug Something isn't working as expected label Nov 27, 2026
Extract formatCompactCount so UsageRing and UsageBars abbreviate numbers the same way, include workspaceUsed in the bars tooltip, and update the formatting tests.
@realcodesiman
realcodesiman merged commit c32c378 into main Nov 27, 2026
14 checks passed
@realcodesiman
realcodesiman deleted the fix/usage-bars-compact-numbers branch November 27, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant