Repository navigation
fix(web,mobile): limit bars use each provider's chart color - #16936
charlielockyer-rice wants to merge 1 commit into
Conversation
Limit bars are meant to use the usage chart's series color for each provider so the two views read as one, but only Codex and Claude were mapped. On web, Cursor, Grok, OpenCode, and Antigravity bars on Usage → Limits and in the /usage-limits result fell back to the plain foreground color. On mobile, the same providers fell back to the foreground in limit rows and to Codex's color in pooled limits. Web now looks the driver up in PROVIDER_PRESENTATION, the table the chart uses. Mobile gains usageProviderKind for the same lookup against its chart colors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughMobile and web usage screens now select provider colors by matching drivers to provider kinds or presentations. Mobile screens use a shared helper, with a Codex fallback for pooled cards. The web screen retains its foreground-color fallback when no presentation matches. ChangesUsage provider colors
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change aligns usage-bar colors with provider identity; supported providers map correctly, while unmatched drivers keep their fallbacks. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
barColor(web) anduseBarColor(mobile) are documented to use each provider's usage-chart color, but they only map Codex and Claude. Cursor, Grok, OpenCode and Antigravity limit bars fall back to the plain foreground color, and mobile's pooled limits paint every non-Claude provider in Codex's color.Web now looks the driver up in
PROVIDER_PRESENTATION, the table the chart already uses. Mobile gets a smallusageProviderKindhelper for the same lookup. This is a small, obvious-bug fix: the code didn't match its own documented behavior, and nothing else about the bars changes.Before / after (Usage → Limits; Cursor, Grok and OpenCode data mocked through a local CLIProxyAPI-compatible hub):
Checked:
vp run --filter @t3tools/web typecheckandvp run --filter @t3tools/mobile typecheck: clean.vp linton the changed files: no warnings.vp test run apps/web/src/components/usage apps/web/src/components/chat apps/mobile/src/features/usage: 1079 passed.Mobile: checked on the iPad Pro simulator (iOS 27, dev client). Claude and Codex limits render unchanged, as expected, since they were already mapped. Cursor, Grok and OpenCode can't be reproduced on a device here because those providers aren't installed and a CLIProxyAPI hub only carries Codex and Claude accounts. Their mobile path is the same
usageProviderKindlookup, which typechecks against the chart's color table.Implementation: Claude Opus 5.5 (1M context), Claude Code harness in T3 Code.
🤖 Generated with Claude Code