Skip to content

feat(usage): optionally show meters as used - #382

Open
Seyamalam wants to merge 2 commits into
johannesjo:mainfrom
Seyamalam:feat/usage-meter-used-mode
Open

Seyamalam wants to merge 2 commits into
johannesjo:mainfrom
Seyamalam:feat/usage-meter-used-mode

Conversation

@Seyamalam

Copy link
Copy Markdown

Refs #353.

Some users read rate-limit meters as consumption rather than remaining budget. This adds an opt-in Appearance setting, Show usage as used, that fills the 5h/7d meters with the consumed percentage and labels them x% used.

The default remains the existing remaining-budget display, and the 80%-used warning threshold is unchanged.

Verification:

  • npm run check
  • npm run test:unit -- src/store/persistence.test.ts src/store/autosave.test.ts
  • npm run test:client -- src/components/UsageStatusBar.client.test.tsx
  • npm test via the pre-push hook (run with Node 22, matching CI)

@johannesjo

Copy link
Copy Markdown
Owner

🔍 Reviewed – no blocking issues found at 2c09dc7.

Thanks for the PR! This adds an opt-in Appearance setting that fills the 5h/7d meters with the used share and labels them x% used; the bar, label and aria-label stay in step in both modes, and the setting is persisted and tested like the neighbouring display toggles.

I've flagged a scoping question for the maintainer; you may want to wait for that before reworking the details.

Nits

  • src/components/settings/AppearanceSettings.tsx:154 – the new row sits between "Show progress section in sidebar" and "Show tips section in sidebar", splitting the two sidebar toggles. Moving it after the tips row (or to the end of the Display group) keeps the sidebar pair together.

Automated review pass (Claude Code). Anything unclear or wrong – say so and I'll take a look.

@johannesjo

Copy link
Copy Markdown
Owner

I'm happy to take this as an opt-in setting – it keeps the default as is and the bar and label stay in step in both modes. Please move the new row so it doesn't split the two sidebar toggles in Appearance (see the review nit), then I'll merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants