Repository navigation
Conversation
The share-bar section switched to two columns at lg, so on wide windows "Cost by type" sat alone in the left half and its legend wrapped, while narrow windows showed it full width on one line. Stack the bars at full width at every size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Usage token and cost bars now occupy full-width rows instead of a two-column layout on large screens. The change affects presentation only, leaving usage calculations and billing behavior unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Note Written by Verified in a real dev environmentverified unchanged head created a project pointing to the real repository through the app. completed standard and fast
main, cost rows: pr, matching cost rows: main, tokens: pr, matching tokens: at this small spend, the colored cost segments remain shorter than their tracks on both commits. that existing segment-sizing behavior is separate from this pr’s grid layout. Not verifiednative ios/android clients and the electron shell were not run on this linux vm. remote/relay connections and other providers were not exercised. codex produced input/cache-read/output usage, so the exact four-item legend wrap involving cache-write usage was not reproduced; the half-width layout itself was reproduced and its correction measured with real usage. no code changes or pushes were needed. |






Problem
On a normal or wide window, the Usage page's "Cost by type" legend wraps, and "Output" drops to a second line. On a narrow window it fits on one line. Making the window bigger makes it look worse.
The section holding the share bars switches to two columns at
lg(lg:grid-cols-2). That second column is only for "Cost by speed", which only appears for users with fast or ultrafast spend. Everyone else gets "Cost by type" alone in the left half of an empty grid, about 464px wide, and the four-item legend wraps. Belowlg, the grid is one column and the bar gets the full width. When "Cost by speed" does show, both bars are half width and the "Cost by type" legend still wraps.Change
Drop the
lgtwo-column layout so the share bars always stack at full width, the same layout narrow windows already use. That's a one-line class change inUsagePage.tsx. The "Tokens by type" bar on the Tokens tab had the same half-width issue and is fixed too.Scope and approval
No prior issue: this is a very small, focused fix of an obvious bug, so it falls under the small-fix exemption. The legend wraps more on wider windows than on narrower ones, and the fix is a single class change. No behavior, data, or settings change.
I searched issues and PRs for this and found no duplicate. #31392 moves this block to the bottom of the overview without changing its classes, so whichever lands second needs a trivial rebase.
Verification
Web dev server (
vp run dev) on a seeded copy of real usage data, 1400×1050 viewport, dark theme, headless Chromium at 2× scale. Section widths were measured in the page.vp run check:changedpasses (format, lint, knip, typecheck, react compiler).Past 24h (no fast-mode spend). Before: the bar is 464px wide and the legend wraps. After: 976px wide, one line.
30 days (with "Cost by speed"). Before: both bars are half width and "Cost by type" wraps. After: both are full width and stacked, each on one line.
Not checked: the desktop Electron shell (it renders the same web component) and mobile, which has its own native Usage screen and isn't affected.
Created with Claude Opus 5.5 in Claude Code (running in T3 Code).
🤖 Generated with Claude Code