Skip to content

fix(web): usage limits keep a single account's label at wide sizes - #32534

Open
juliusmarminge wants to merge 2 commits into
mainfrom
fix/issue-32525
Open

juliusmarminge wants to merge 2 commits into
mainfrom
fix/issue-32525

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Problem

On the web Usage → Limits page, a pool with a single account shows the account's label in the compact layout (the legend row under the bar), but the wide layout hides it. Resizing the window makes the account identifier disappear. Reproduced on main (e455200) by rendering UsageLimitsPooled with one Codex account (email only): at a 500px viewport the legend row shows KE 60%; at 1280px the bar shows only the reset pill, with no account label. With two accounts the label shows at both widths.

Change

One flag, showAccountName (pool.columns.length > 1), gated both the account label and the repeated percentage in the wide bar. The wide bar now always renders AccountName. The flag is renamed showPercent and only keeps a single-account bar from repeating the headline percentage. Multi-account bars render as before.

Scope and approval

Fixes #32525

Small, focused fix of the triaged bug in that issue. Web only; desktop wraps the same component. Mobile renders this view with its own component, which this PR does not change.

Verification

  • New browser test UsageLimitsPooled pool bar > labels a single account's bar in the wide layout in apps/web/src/components/usage/UsageLimitsPooled.browser.test.tsx. It renders one email-only Codex account at a 1280px viewport with the app CSS and checks that the bar's reset pill (wide layout) and the KE account label are visible.
    • On main: fails with Cannot find element with locator: …getByRole('button', { name: /^KE: 60% left/ }).getByText('KE') (ARIA tree of the bar: button "KE: 60% left, resets in 3d 0h": ↻ 3d 0h).
    • On this branch: 2/2 tests in the file pass.
  • vp run check:changed: format, lint, knip, typecheck (2 packages), tests and React compiler pass.
  • Before/after captures (rendered through the web browser-test runner with synthetic providers, Chromium, DPR 1, 390×900 and 1280×900) were taken for: one email-only account at 390 and 1280 in light and dark, one account with a display name at 1280, one account with neither name nor email at 1280, and two accounts at 1280. Wide single-account bars gain the account label (KE chip, Work ChatGPT, Codex); the compact frames and the two-account control are pixel-identical before and after. The images are still to be attached to this PR.
  • Not checked: the full /usage route with a real limits-reporting account; the compact layout with a display name or with the provider-label fallback; mobile.

AI-assisted; verified with the tests and tools listed above.

juliusmarminge and others added 2 commits November 7, 2026 16:35
…bar (#32525)

Reproduces #32525: in the wide Usage → Limits layout, a pool with a single
account shows only the reset pill on its bar, so the account label is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wide pool bar hid the account label for single-account pools because one
flag gated both the label and the repeated percentage. Always render the label
and rename the flag to showPercent, which now gates only the percentage.

Fixes #32525

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 7, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 72b46d5

Macroscope's review found this PR approvable — Single-account usage bars now retain their account label at wide sizes while continuing to omit the redundant percentage. The change is limited to presentation and leaves usage calculations and account actions unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The wide pooled usage bar now always displays the account name. The percentage remains conditional on the number of pool columns. A browser test checks the single-account bar’s remaining percentage, reset countdown, and account initials.

Changes: Pooled usage bar

Layer / File(s) Summary
Wide bar account label and percentage
apps/web/src/components/usage/UsageLimitsPooled.tsx, apps/web/src/components/usage/UsageLimitsPooled.browser.test.tsx
The wide bar always renders the account name. It displays the percentage when the pool has multiple columns. The browser test checks a single-account bar at a wide viewport.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related PRs

Suggested labels: bugfix

Suggested reviewers: only21mil

Merge Risk: Minimal · up to 72b46

The account-label regression is covered by the new test, and no merge-blocking issue is established.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly describes the single-account label fix in the wide layout.
Linked Issues check Passed [#32525] The wide bar now always renders AccountName. The compact layout is unchanged. A browser test checks the single-account label and reset pill at a wide viewport. showPercent still prevents …
Out of Scope Changes check Passed [#32525] The component change and browser test support the account-label fix. The showPercent rename preserves the existing percentage behavior. No unrelated changes are evident.
Description check Passed The description is mostly complete and provides focused verification results. The required before-and-after screenshots are not attached. The AI model and harness are also not identified.
Full details: Linked Issues check

Explanation

[#32525] The wide bar now always renders AccountName. The compact layout is unchanged. A browser test checks the single-account label and reset pill at a wide viewport. showPercent still prevents a duplicate percentage for one account.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e455200 and 72b46d5.

Files selected for processing: 2

  • apps/web/src/components/usage/UsageLimitsPooled.browser.test.tsx
  • apps/web/src/components/usage/UsageLimitsPooled.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed labels Nov 7, 2026

This branch has not been deployed

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

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage limits hide the account label at wider sizes

1 participant