Skip to content

feat: official quota thresholds and a tidier usage credits tooltip row - #90

Merged
Carl723000 merged 3 commits into
ClaudeCodeUsage:mainfrom
zeyutang:feat/official-quota-thresholds
Aug 20, 2026
Merged

Carl723000 merged 3 commits into
ClaudeCodeUsage:mainfrom
zeyutang:feat/official-quota-thresholds

Conversation

@zeyutang

Copy link
Copy Markdown
Contributor

Summary

Aligns the quota indicator's warning points with the official Claude app: bars and the status-bar background now turn amber at 75% and red at 90%, so both surfaces call the same window amber or red at the same moment (the context-window indicator deliberately keeps its 80/95 steps). Also tidies the usage-credits tooltip row introduced in #86: it shows only the spent amount, and the amount spans the bar and share columns so the percentage column no longer stretches away from the bars when the credits row appears.

Linked issues

Relates to #86 (follow-up to the weekly quota windows and credits row added there).

Type of change

  • New feature (non-breaking) → feature (minor)

How was this tested?

  • npm test: 262 tests, 261 pass, 1 pre-existing skip. New tests pin the quota/context threshold pairs and which indicator uses which (statusBarThresholds.test.ts, quotaFormat.test.ts).
  • Extension Development Host (F5) against live Anthropic /usage data: with the credits row visible, the percentages stay snug against their bars and the amount starts at the bars' left edge.
  • When Usage credits not enabled or not used, the "Usage credits" row will not occur. Example view below
example

Checklist

  • npm run compile is clean
  • User-facing strings go through I18n (no new strings; the row reuses quotaCredits from feat: weekly usage limit including Weekly (All) and model-specific quota (e.g., Fable) #86)
  • Behaviour/documentation changes update all seven README editions together (n/a: thresholds and tooltip layout are not documented in the READMEs)
  • CHANGELOG.md updated (user-visible changes)
  • README.md updated if behaviour/settings changed (n/a, see above)
  • New settings default to existing behaviour (n/a: no new settings)
  • No new runtime dependencies

* quota bars and status-bar background turn amber at 75%, red at 90%
* extract fill thresholds into named constants with a shared level helper
* keep the context-window indicator on its earlier 80/95 steps
* add wiring test pinning which indicator uses which pair
* span the credits amount across the bar and share cells, left-aligned
* share column stays at percent width, so bars keep their gap to percents
* drop the credits row bar; its percent stays derived but undisplayed
* drop the "/ $cap" suffix, since the cap is user-adjustable and may be unlimited
* reword the unreleased changelog entry to match
@github-actions github-actions Bot added the feature Minor bump — new feature label Aug 18, 2026
@github-actions

Copy link
Copy Markdown

🤖 Automated first-pass review

The configured analysis model did not return a usable analysis for this pull request. The item has still been received and remains available for maintainer review.

To help with review, please ensure the change summary, tests, and any user-facing documentation or localization updates are included.


🤖 Posted automatically by CCU Bot — not a maintainer decision.

@Carl723000 Carl723000 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I reviewed the threshold split and the credits-row layout.

  • Quota bars and the quota status-bar background now share the official 75% / 90% thresholds.
  • The context-window indicator explicitly keeps its separate 80% / 95% thresholds.
  • The tests cover the inclusive boundaries and verify that each indicator is wired to the correct threshold pair.
  • The credits amount spans the bar and percentage cells, and the supplied narrow-width check shows that it no longer stretches the percentage column.
  • The current checks are passing.

I found no blocking issue. This is ready to squash-merge with the existing feature label.


🤖 Generated with OpenAI Codex

@Carl723000
Carl723000 merged commit d3b4b71 into ClaudeCodeUsage:main Aug 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Minor bump — new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants