Repository navigation
UI Consistency: 1 issue found
apps/web/src/components/usage/ProviderQuotaLimits.tsx — providerQuotaNotice returns null when usageLimits.available === true but windows is empty, and ProviderUsageBars also renders null for that case, so QuotaEnvironmentGroup paints a tile containing only the provider icon and name over empty grid space. The state is decodable rather than hypothetical: ServerProviderUsageLimits.windows is a ForwardCompatibleArray, so windows this client cannot decode (unknown kind, out-of-range usedPercent) are dropped while available stays true — this PR's own contract tests assert that exact shape. Because configs spans remote environments, a newer server is enough to produce it. Suggested fix posted inline: treat "available but no renderable window" the same as the missing-usageLimits case.
No other in-scope violations found.
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.
Files examined (in scope)
apps/web/src/components/usage/ProviderQuotaLimits.tsxapps/web/src/components/usage/ProviderQuotaLimits.test.tsapps/web/src/components/usage/UsagePage.tsxapps/web/src/timestampFormat.ts
Server, mobile, and contracts files were read for context only.
Checks performed and cleared
- Shared primitives. No
Progressprimitive exists incomponents/ui; the hand-rolled meter matches the establishedcomponents/chat/ContextWindowMeter.tsxpattern character-for-character (h-1.5 w-full overflow-hidden rounded-full bg-muted,role="progressbar"witharia-valuenow/min/max,transition-[width,background-color] duration-500 ease-out motion-reduce:transition-none). Reduced-motion is honoured. - Theme tokens.
bg-destructive,bg-warning,bg-foreground,bg-muted,text-muted-foregroundare all semantic tokens defined inindex.css; no hard-codedrgba(255,255,255,…)or dark-only literals. - Icon surface ownership.
indicatorBackground="var(--background)"correctly matches the Usage page canvas (SidebarInset/WorkspacePageContainerarebg-background), rather than leaving the primitive'svar(--card)default. - Timestamp locale. Both branches of
formatUsageResetDatenow route throughtimestampFormat.ts(formatUtcDateTimestampuses the newutcDateWithYearFormatterbound to the sharedtimestampLocale;formatDateTimeTimestampreusesnumericDateWithYearFormatterplus the settings-driven clock), so two resets in the same list cannot render in different calendar orders. - Label/width consistency. Bar width and "% remaining" both derive from the same clamped, rounded value.
- Prop contracts.
ProviderInstanceIcon(driverKind,displayName,accentColor,showBadge,indicatorBackground,iconClassName,badgeClassName),usePrimarySettings(selector),getDriverOption, andenvironmentServerConfigsAtomall match their definitions.
Previously reported, not repeated
- The missing-
usageLimitsempty-tile path flagged on earlier commits is now handled (providerQuotaNoticereturns "Usage data unavailable"). - The duplicated micro-badge geometry in
badgeClassName(a third copy of the values inProviderInstanceCard.tsxandProviderModelPicker.tsx) is unchanged, but was already raised on two prior runs and is not re-posted.
🔍 Agent activity — 12 tool calls
💭 I want to check whether the previously flagged issues in ProviderQuotaLimits.tsx, at what were lines 87 and 188 in earlier commits, still exist now that the head is at 539ca15. I'm pulling up the current file content since it appears as a new file in this diff.
1. browse_code — apps/web/src/components/usage/ProviderQuotaLimits.tsx
2. github_api_read_only — repos/{owner}/{repo}/pulls/{pull_number}/comments?per_page=100&page=1
💭 I'm checking whether my earlier comments about the provider quota notice logic still apply, since the file now shows a check that returns "Usage data unavailable" when usageLimits is missing, which contradicts what I noted before about it returning null in that case. The badgeClassName duplication issue was already flagged twice, so no need to raise it again. Now I want to see what changed between the two later commits in the web files.
3. git_tools — 9200c38..539ca15
💭 I'm re-reviewing the current state of the in-scope files—ProviderQuotaLimits.tsx, its test, UsagePage.tsx, and timestampFormat.ts—since this looks rebased. The first prior finding seems addressed, and the badgeClassName issue is still there but already flagged, so I won't repeat it; now checking for anything new. I'm walking through ProviderUsageBars for hook ordering, verifying whether
bg-warningis a valid design token, confirming the date-only formatting fix usingtimestampLocalewas applied correctly, and checking that the indicator background now correctly references the surface variable. Mobile's UsageRouteScreen is out of scope. I want to grep for the existence ofbg-warning,bg-muted,text-foreground,getDriverOption,usePrimarySettings, andenvironmentServerConfigsAtomto make sure everything referenced actually exists.
4. git_tools — --color-warning|bg-warning
5. git_tools — export function getDriverOption|export const getDriverOption
💭 I want to check if there's already a shared usage-bar or Progress primitive in components/ui, since hand-rolling a progressbar div would be worth flagging if one exists. I should also check whether ProviderInstanceCard already has a duplicate usage bar implementation around line 125.
6. git_tools — usageLimits
7. browse_code — apps/web/src/components/ui/*.tsx
💭 There's no shared Progress primitive in the UI, so a hand-rolled bar is consistent with existing patterns like ContextWindowMeter. Let me check that component to see if ProviderUsageBars is duplicating a shared meter pattern it should reuse instead.
8. git_tools — progressbar|rounded-full
💭 The new bar's styling matches ContextWindowMeter's pattern closely, so that's consistent. Now I need to verify that
usePrimarySettingsis a valid hook accepting a selector, and check thatenvironmentServerConfigsAtomis properly exported from state/server and that the presentations atom shape aligns with expectations. I also want to double-checkProviderInstanceIcon's props—things likeindicatorBackground,iconClassName,badgeClassName,showBadge,accentColor,displayName, anddriverKind—to make sure they're all correctly supported.
9. git_tools — indicatorBackground|badgeClassName|iconClassName|showBadge|accentColor
10. git_tools — export function usePrimarySettings|export const usePrimarySettings
💭 I'm checking whether ProviderUsageBars could render an empty tile when usageLimits.available is true but windows is empty—tracing whether that state is actually reachable given that the server's makeUsageLimitsSnapshot marks availability false when windows are empty. Actually the contracts test confirms it is reachable: the forward-compatible array can drop windows with unrecognized kinds while keeping available:true, leaving windows:[] — which means notice returns null and the tile renders with just the provider name and nothing else. That's a genuine empty-state gap distinct from the earlier one I flagged (which was about the missing usageLimits case and is already fixed), so I'm weighing whether this residual UI inconsistency is worth calling out. Confirmed:
configsmaps environment IDs to ServerConfig for multi-environment remote connections, so version skew between web and server is genuinely possible—this is exactly why ForwardCompatibleArray exists. I'll flag the issue with a suggested fix to treat empty windows as "Usage data unavailable" inproviderQuotaNotice. Checking a few other things:getUsageWindowKeyincludes resetsAt which changes on window reset, causing remounts, but that's minor and not worth flagging. The default timestamp format param looks fine, andsharedUsageResetAtcorrectly returns undefined only when there are multiple kinds, which works for Cursor's matching weekly windows. I also noticeProviderUsageBarshas anenabledprop nobody passes—likely dead code, but too minor to fail on. Now I want to check whether the<h2>heading used here is consistent with other section headings on the UsagePage, so I'm going to look around line 212 of that file.
11. browse_code — apps/web/src/components/usage/UsagePage.tsx
💭 I'm confirming the grid gap comes from the container component, then deciding to post just one inline comment on the empty-tile path since the more common issue was already fixed and this is narrower. I want to double-check how
ForwardCompatibleArrayhandles invalid windows—whether they get dropped individually or invalidate the whole structure—before finalizing. Checking the PR's own tests confirmsavailable: true, windows: []is a reachable, asserted state, so I have concrete grounds to flag the empty-state gap where the UI would render just a provider name with blank space. I'm now drafting the inline suggestion targeting theproviderQuotaNoticefunction, which currently returns null when usage limits are marked available without checking if the windows array is actually empty. My proposed fix updates the availability check so that when windows is empty despite being marked available, it falls back to the "Usage data unavailable" message instead of returning null. I'll post this as a single-line inline comment via github_pr_review, confirming line 89 falls within the diff since the whole file is new. Given there's one concrete finding, the check should resolve to failure rather than "All clear" -- I need to make sure my final response still conforms to the required JSON schema despite that instruction about an all-clear shortcut.
12. modify_pr — One finding in the in-scope web files: an empty provider tile can render when a usage snapshot decodes as available with zero windows. Everything else (bar geometry/role="progressbar"/motion-reduce matching ContextWindowMeter, locale-consistent reset formatting via timestampFormat.ts, indicatorBackground matching the page surface) is consistent with the existing system.
Agent Credits: 340 credits
Token usage: 18 uncached input · 2,219,102 cache-read input · 307,934 cache-write input · 7,969 output
Agent Credits may also include non-token charges from external tools such as web research.
Note: This PR predates Macroscope's transition from seat-based to usage-based billing. Your per-PR and per-review limits will only account for activity after April 27th, 2026. Activity prior to this date will not count towards usage-based billing.