Repository navigation
fix(usage): pooled Limits bars show each account's mark instead of a position number - #40029
juliusmarminge wants to merge 3 commits into
Conversation
…position number Fixes #11880 AI-assisted; verified with the tests and tools listed above.
AI-assisted; verified with the tests and tools listed above.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Keep main's translated pooled-bar accessibility labels and the branch's account avatars; drop the web "Segment" catalog entry the legend no longer uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The automated pipeline stopped on this pull request and will not merge it: the fix is written and reviewed, but proving it needs something no worker has:
It stays open for a person to finish or close. |
All three review items were correct. AccountAvatar (web and mobile) chose the provider glyph whenever account.redeem was set (every native account, and hub accounts with a nextCreditId), while the new web AccountLabel hid the name for email && !displayName accounts. So redeemable accounts with an email and no display name lost the email chip that told them apart on main and showed identical unbadged glyphs on the strip, the legend and the wide segment. On mobile the wide inline label was affected the same way; the mobile legend kept its name text. Fix, one condition on each client: AccountAvatar now renders AccountChip whenever account.email && !account.displayName, whatever redeem is, and otherwise the ProviderInstanceIcon (badged when there is a display name). On web this matches AccountLabel's suppression condition, so the chip is always drawn exactly once. The segment popover uses the same AccountAvatar, so for these accounts it now shows the email chip instead of a bare glyph, consistent with the bar. Checked with a throwaway browser test of the reviewer's case (two hub Codex accounts alice@/bob@example.com with redeemable reset credits, at 420px and 900px): the strip, the wide segments and the legend rows each carry a distinct 'Account AE' / 'Account BE' chip. Mobile was read and typechecked, not run on a device. No new regex or parser.
Fixes #11880
Reproduction on main
Commit origin/main b68aedf. Ran
vp i, then a throwaway browser test (vp test run --project browser, Chromium) that renders UsageLimitsPooled with one environment holding four synthetic Claude provider instances (Claude Work/Personal/Team/Side, each with a Session window), at 420px and 900px wide. Read back the DOM: at both widths each bar segment button's text starts with a bare position number ('1'..'4') and every legend row reads 'Segment N '. None of those buttons contains an svg or img (icons=0), so the account's ProviderInstanceIcon or initials chip is drawn nowhere on the bar or legend. Screenshots were unstyled, so the DOM readout is the evidence. The full app was not run, because live Claude usage limits need first-party Claude OAuth, which this VM lacks. Mobile (apps/mobile/src/features/usage/UsageLimitsPooled.tsx rendersindex + 1in both the strip and the legend) was read, not run on a device.Evidence
Being captured: before and after in the real app. This section is filled in before the pull request can merge.
Tests
Throwaway browser test with
vp test run --project browser(hub Codex accounts with emails and reset credits, 420/900px, DOM readout; deleted before commit): 2 passed, distinct AE/BE chips on every segment and legend row.vp run check:changed: format, lint, knip, typecheck (3 packages), test (1 file) and react compiler (2 files) all pass.Not in this change
Who did the work
Run by the t3code factory in T3 Code.