Skip to content

feat(providers): show shorter usage limits as their own bars - #1358

Merged
nixuuu merged 1 commit into
devfrom
fix/weekly-limit-sidebar-bars
Nov 27, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/weekly-limit-sidebar-bars

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 27, 2026

Copy link
Copy Markdown
Member

What

Provider usage popover (web and mobile)

  • A bar for every shorter general limit some account reports (e.g. 5-hour) now sits above the weekly bar.
  • Every account keeps the same column, at its weekly plan width, in each bar of a row. An account without a 5-hour limit (Claude Ultra, Codex Pro) leaves an empty gap in the 5-hour bar, so that bar appears only over the accounts it belongs to.
  • Each bar's caption now carries its own reset and % left. The header keeps the provider, account count and Low / Extra usage.

Sidebar indicator

  • The bar now fills to the weekly limit, matching the popover's weekly bar. Before, it filled to the tighter 5-hour limit, so Claude looked almost empty (3%) while the popover showed 74% weekly left.
  • A tighter shorter limit still sets the bar's colour, like the Low label.

Implementation

  • usage-summary.ts builds per-account columns. CapacitySegment now carries its proxy account, so accounts line up across bars and equal ids on two proxies stay apart.
  • A small shared UsageSummaryMeter renders one bar plus its caption on web and on mobile.
  • docs/proxies.md is updated.

Related: #763

Verification

Ran locally:

  • bun test packages/domain/src/sidebar-usage.test.ts packages/domain/src/proxy-capacity.test.ts. The summary test now checks the aligned 5-hour columns, the empty column for an account without that limit, and that the sidebar indicator follows the weekly window.
  • apps/web typecheck (svelte-check).
  • apps/mobile typecheck.
  • oxlint and oxfmt on the changed files.
  • Rendered the real web row components with fixture data in a browser, in dark and light themes.

Left to CI: the full gate. Not checked: mobile on a device.

Copy audit (docs/copy.md §8)

  1. Pass: no new strings. Captions reuse the existing formatters (5-hour · Resets in 3 h, 3% left, Weekly · …).
  2. Pass: no new terms.
  3. n/a: no buttons changed.
  4. n/a: no errors changed.
  5. n/a: no empty states changed.
  6. Pass: the weekly % left moved from the header to the weekly caption, so it is not shown twice. The binding-only 5-hour: 3% left line is replaced by the 5-hour bar's caption.
  7. n/a.
  8. n/a.
  9. Pass: checked with one and two accounts, with and without a 5-hour limit, and at 3%–75% left in the 21rem popover.
  10. Pass: low capacity keeps the Low word next to the colour. The accessible label lists each window as text, e.g. 5-hour: 3% left · Resets in 3 h.

🤖 Generated with Claude Code

The Provider usage popover gets a bar per shorter general window (e.g.
5-hour) above the weekly bar. Each account keeps the same column in every
bar, so an account without a five-hour limit leaves an empty gap there.
Every bar's caption carries its own reset and % left; the header keeps the
provider, account count and Low/Extra usage.

The sidebar indicator now fills to the weekly window like the popover bar
instead of the binding five-hour window; a binding shorter window still
sets its tone.

Related: #763

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nixuuu
nixuuu enabled auto-merge (squash) November 27, 2026 18:57
@nixuuu
nixuuu merged commit 2364cd2 into dev Nov 27, 2026
24 checks passed
@nixuuu
nixuuu deleted the fix/weekly-limit-sidebar-bars branch November 27, 2026 19:02
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.

1 participant