Repository navigation
fix(web): usage limits keep a single account's label at wide sizes - #32534
juliusmarminge wants to merge 2 commits into
Conversation
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>
ApprovabilityVerdict: Approved at 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. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
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
UsageLimitsPooledwith one Codex account (email only): at a 500px viewport the legend row showsKE 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 rendersAccountName. The flag is renamedshowPercentand 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
UsageLimitsPooled pool bar > labels a single account's bar in the wide layoutinapps/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 theKEaccount label are visible.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).vp run check:changed: format, lint, knip, typecheck (2 packages), tests and React compiler pass.KEchip,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.AI-assisted; verified with the tests and tools listed above.