Repository navigation
UI Consistency: 1 issue found
1 finding
apps/web/src/components/usage/usageProviders.ts(line 29): the newgrokpresentation entry uses a hardcoded neutral#8b8b8bfor its series/legend color. That value feeds the chartfill/strokeinUsageProviderChart.tsxand the legend swatchbackgroundColorinUsagePage.tsx, i.e. app chrome rather than a brand hue, but it does not follow light/dark, the custom--app-theme-*palettes, or the runtime contrast appearance tokens the way the adjacentcodexentry (var(--contrast-foreground)) does. Suggested smallest fix: use an existing neutral semantic token such asvar(--contrast-muted-foreground).
An inline comment with the suggested fix has been posted on the PR.
Details
Note
Your check run agent prompt is: .macroscope/check-run-agents/ui-consistency.md
More information about how Check Run Agents work can be found in our Help Center.
Scope reviewed
In-scope changed files (per check include patterns apps/web/src/**/*.{ts,tsx,css}):
apps/web/src/components/usage/usageProviders.ts— newgrokentry (label, color, mark)apps/web/src/components/usage/UsagePage.test.tsx— mock provider presentation gainsgrokapps/web/src/components/usage/UsageProviderChart.test.ts— fixtures extended with agrokband
Server, mobile, contracts, and docs changes were read only as context.
Checks performed
- Verified
GrokIconexists inapps/web/src/components/Icons.tsxand already carries theme-aware fills (fill-[#0F0F0F] dark:fill-[#F5F5F5]), merged viacnso call-site sizing (size-3,size-3.5) still applies. Icon usage is consistent with the existingOpenAI/ClaudeAImarks and withproviderDriverMeta.ts/providerIconUtils.ts. - Traced
PROVIDER_PRESENTATION.colorconsumers: SVGfill/strokeinUsageProviderChart.tsx(lines 389, 398) and inlinebackgroundColorswatch inUsagePage.tsx(line 225). The existingcodexentry provesvar(...)resolves correctly in these presentation attributes, so the suggested token is a drop-in. - Confirmed
--contrast-muted-foregroundis defined inapps/web/src/index.css(line 1914) and derives from--muted-foregroundplus the--appearance-contrast-*runtime adjustment, and that custom themes rebind--muted-foregroundvia--app-theme-muted-foreground(lines 1576, 1844). - Noted the mobile side of the same PR (
apps/mobile/src/features/usage/usageProviders.ts) selects#8b8b8bfor dark and#636366for light, confirming a single fixed gray is not adequate across schemes. - No new raw controls, primitive overrides, scroll/mask changes, global CSS edits, or environment-scoped renderer call sites were introduced by the in-scope diff;
PROVIDER_ORDERremains derived from the presentation map, so no ordering drift.
Verification gates considered
The web change is a data-table addition; typecheck and the touched usage tests are the relevant gates (both test files were updated in the PR to include the new provider). No emitted-CSS inspection is needed since no Tailwind selector or variant transformation was introduced.
🔍 Agent activity — 13 tool calls
💭 I'm looking at the relevant files—UsagePage.test.tsx, UsageProviderChart.test.ts, and usageProviders.ts—and checking whether usageProviders.ts's import of GrokIcon from the Icons module actually exists.
1. git_tools — GrokIcon
2. browse_code — apps/web/src/components/usage/usageProviders.ts
💭 I'm comparing the color implementations: codex uses a theme variable, Claude hardcodes its brand hex, while Grok and mobile use hardcoded grays that don't adapt across light/dark themes—which raises a contrast concern in light mode on web. Grok's brand is basically black/white, so it'd make more sense to use a semantic token like var(--muted-foreground) instead. I want to check how color is applied in the chart legend to gauge contrast there too.
3. git_tools — PROVIDER_PRESENTATION
4. browse_code — apps/web/src/components/Icons.tsx
💭 I need to check how the
markprop gets rendered in UsagePage.tsx around line 451 and the chart legend, and whether the icon receives a className that overrides fill color—since GrokIcon hardcodes fill classes with cn(), a caller's className could win. Let me compare how OpenAI and ClaudeAI icons handle this same pattern.
5. browse_code — apps/web/src/components/usage/UsagePage.tsx
6. browse_code — apps/web/src/components/usage/UsagePage.tsx
7. browse_code — apps/web/src/components/usage/UsagePage.tsx
8. browse_code — apps/web/src/components/usage/UsageProviderChart.tsx
💭 I'm noting that Grok's chosen gray (#8b8b8b) is hardcoded rather than theme-aware, unlike Codex's semantic contrast token, and doesn't match Grok's actual black/white brand icon colors. I also see the mobile app version of this PR uses scheme-dependent grays instead, darker in dark mode and lighter in light mode. Checking against the review rules, this looks like a real finding: chart contrast/accessibility should derive from semantic tokens rather than hardcoded values. On light backgrounds, #8b8b8b gives roughly a 3:1 contrast ratio for the chart line, which is passable but noticeably weaker than Codex's near-black contrast token, and it's used both for the SVG stroke/fill and the legend swatch background. I want to verify whether there's already an established convention for provider colors elsewhere in the web codebase, so I should look at providerDriverMeta to see if a grok color pattern is already defined there.
9. browse_code — apps/web/src/components/settings/providerDriverMeta.ts
10. git_tools — contrast-foreground
💭 I'm checking whether --contrast-foreground is a runtime-adjusted semantic token, which would confirm that Codex's color responds to the app's contrast/accessibility settings while Grok's hardcoded #8b8b8b gray doesn't adapt to theme or scheme changes like its mobile counterpart does. I also want to check whether custom theme palettes in index.css support dark/light backgrounds, since Grok's fixed gray wouldn't adjust either way. Given the web-scope changes are minimal, this color choice looks like the strongest finding — the mid gray gives weak contrast (~3:1) on light backgrounds compared to Codex's near-black and Claude's orange, and the fact that mobile darkens to #636366 for light mode suggests the authors already recognized a single gray wasn't sufficient. This points to a real cross-surface theming inconsistency where the hardcoded chrome color ignores contrast adjustment, unlike the semantic token used elsewhere in the module. I want to verify this by looking at index.css around lines 1900-1920 for the muted-foreground token values in both light and dark modes.
11. browse_code — apps/web/src/index.css
12. git_tools — --muted-foreground:
💭 Since custom app themes could introduce arbitrary background colors, a hardcoded mid-gray swatch risks clashing or vanishing against certain themes. This seems worth flagging: switching to a semantic token like
var(--contrast-muted-foreground)would let the swatch adapt properly across light/dark modes, custom themes, and contrast accessibility settings, matching the same pattern used elsewhere in the file and on mobile. I've checked the GrokIcon mark's hardcoded fill colors, contrast levels between grok gray and codex foreground in both themes, the legend swatch, and the test mocks — none of those raise concerns. The hardcoded color issue does feel like a real theming ownership problem rather than just an aesthetic nitpick, so I'll leave one inline comment pointing to the specific line in usageProviders.ts and fail the check. I'm now drafting a suggestion to swap the hardcoded hex for the--contrast-muted-foregroundCSS variable, verifying it exists in index.css. But I'm second-guessing whethervar()actually resolves properly when used inside an SVGfillpresentation attribute, since browser support for CSS variables in presentation attributes has historically been inconsistent. Actually, I recall that since presentation attributes get parsed as CSS declarations,var()should work fine in Chrome and Firefox, and I confirm this because the codebase already usesvar(--contrast-foreground)in the same fill/stroke attributes elsewhere -- so my suggestion follows an established, working pattern. I'll go ahead and submit the review with the inline comment through the github_pr_review tool.
13. modify_pr — One finding on the new Grok usage presentation entry: the series/swatch color is a hardcoded gray instead of a semantic token, so it does not follow theme or the contrast appearance setting.
Agent Credits: 67 credits