Skip to content

fix(dashboard): let All Usage bars reach the percentage - #1734

Closed
iqzap wants to merge 1 commit into
robinebers:mainfrom
iqzap:fix/all-usage-bar-width
Closed

iqzap wants to merge 1 commit into
robinebers:mainfrom
iqzap:fix/all-usage-bar-width

Conversation

@iqzap

@iqzap iqzap commented Nov 23, 2026

Copy link
Copy Markdown

TL;DR — On the All Usage tab, a limit's bar now runs from its label right up to its percentage instead of stopping early and leaving a blank gap. Fixes #1715.

What was happening

  • Each metric row gave the percentage a fixed 52pt column and the reset a fixed 56pt column (80pt for clock times), sized for the widest text that could ever show ($999.99, Wed 10:58 PM).
  • A short reading like 3% with 4d filled only a sliver of those columns, so a wide empty gap sat between the end of the bar and the percentage. The label column was a fixed 90pt too, adding a gap before short names like "Weekly".
  • At low usage the shortened bars were hard to read and the pace mark crowded the fill.

What this changes

  • New DashboardColumns: each card measures its widest label (still capped at 90pt, where long names truncate), figure and reset, and every row shares those widths. The bar takes the remaining space.
  • Figures and resets stay right-aligned with each other in both countdown and clock-time modes. A row without a reset keeps a blank reset column only when a neighbour has one, so a card's bars stay the same length.
  • Applied to the card, the unified-account per-account popover, and the metric/account drag previews; share images get it through the card.
  • The pace mark is unchanged: it sits at its share of the track's actual width, so it lands correctly on the longer bar.
  • Removed the now-unused DashboardRowModel.showsClockTimes and DashboardGrid.clockResetWidth.

Heads-up

  • Columns are measured per card, so bars in different cards may start and end at slightly different points, and a card's bars shorten a little when switching to clock times or when a wider reading appears. Sharing the widths across the whole list instead is a small follow-up if cross-card alignment matters more.

Tests

  • New DashboardBarWidthTests: with countdowns, clock times, and a row with no reset, each bar ends one column gap before its figure, covers most of the row, and lines up with the card's other bars; a pace mark at 0.5 lands at the track's centre. It fails on main (43.5pt gap, 70pt bar).
  • DashboardLabelFitTests keeps the clock-time fit check against a local 80pt budget.
  • script/test_quiet.sh: 881 tests, 3 failures, all in PanelContentHeightTests ("Timed out waiting"); they fail the same way on main without this change.

Screenshots

  • To be added: All Usage with Claude and ChatGPT cards, countdown and clock-time modes, Pace Marks on.

🤖 Generated with Claude Code

)

Metric rows sized the figure and reset columns for the widest text that
could ever show (52pt, and 56pt or 80pt for resets), so a short reading
like "3%" with "4d" left a wide blank gap between the bar and the
percentage. Each card now measures its widest label, figure and reset and
every row shares those widths: the bar takes the rest, figures and resets
stay aligned in both countdown and clock-time modes, and the pace mark
still sits at its share of the wider track.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@pullfrog

pullfrog Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

No configured credential can serve this run. Your ChatGPT subscription was rejected. Sign in again by running pullfrog auth codex in a terminal.

The providers' responses
CODEX_AUTH_JSON: refresh rejected at 2026-11-22T08:21:53.908Z

Pick another model →

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using gpt-6.2-astra

@github-actions github-actions Bot added the tests label Nov 23, 2026
@github-actions

Copy link
Copy Markdown

Thanks for your interest in contributing to OpenUsage!

External pull requests must reference an open issue that:

  1. Has been approved by a maintainer with the approved label.
  2. Is assigned to the pull request author (@iqzap).

Please discuss the change on an issue first, wait for a maintainer to approve and assign it to you, then reopen this pull request with Fixes #123 in its description.

Read the contribution guidelines.

@github-actions github-actions Bot closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All Usage: bars are drawn narrow at a fixed width, leaving empty space before the percentage

1 participant