Skip to content

feat(usage): consistent quota card grid + scannable reset tracking - #11

Merged
patrickrho-patty merged 1 commit into
pattyfrom
feat/quota-grid-consistency
Sep 25, 2026
Merged

patrickrho-patty merged 1 commit into
pattyfrom
feat/quota-grid-consistency

Conversation

@patrickrho-patty

Copy link
Copy Markdown
Collaborator

Problem (operator report, with screenshot)

  • Providers with one account stretched the card across the entire row; multi-account providers showed a narrow grid — the board was inconsistent and unusable for comparison.
  • Reset/expiration dates were tiny right-stranded strings — impossible to scan "when does each account expire" across the board.

Changes

  1. auto-fit → auto-fill in the per-group card grid. auto-fit collapses empty tracks, so a lone card expanded full-width. auto-fill gives every provider section the same card geometry (280px tracks) no matter the account count. (This is the one-word root-cause fix.)
  2. Header reset chip: each card shows its soonest future quota reset in the header — ⏱ 2h 14m — urgency-colored (<1h rose / <6h amber / muted) with the absolute time on hover. Scannable down a whole column of cards.
  3. Row countdowns: urgency colors + absolute-time tooltip; finite rows without a reset (idle windows, from fix(usage): opencode-go expiry/swap + kimi-coding stuck-at-100% quota display #10) render an aligned — so the right column stays rhythmic.

Guard tests

Verification

  • 31 quota-page tests green (incl. all pre-existing card/order/collapse guards).
  • eslint clean; dashboard typecheck unchanged (same 3 pre-existing merge-inherited errors in untouched files).
  • Visual check on omni.patty.io after deploy.

… limits page

Operator-reported: providers with one account stretched their card across
the full row while multi-account providers showed a narrow card grid, and
the reset dates were tiny gray strings stranded at the right edge — the
board was inconsistent and expiration was impossible to scan.

- Per-group grid: auto-fit → auto-fill. auto-fit collapses empty tracks,
  so a provider's lone card ate the whole row; auto-fill keeps every
  provider on the SAME card geometry regardless of account count.
- Header reset chip: every card now shows its soonest future quota reset
  (⏱ countdown) in the same spot — urgency-colored (<1h rose, <6h amber,
  else muted) with the absolute reset time in the tooltip, so expiration
  reads across a whole column of cards at a glance.
- Row countdowns: urgency colors + absolute-time tooltip; finite rows
  without a reset render an aligned em-dash so the right column keeps its
  rhythm on every row.
- Guard tests updated: diegosouzapw#7072 mobile guard and diegosouzapw#6815 density guard now pin
  auto-fill (their guarantees — single column on phones, multi-column on
  wide containers — are unchanged; auto-fit is rejected outright since it
  caused the stretch). New test pins the shared getSoonestResetInfo /
  resetUrgency helpers; hardened the sort-stability test against minute-
  boundary flake.

Dashboard typecheck: same 3 pre-existing merge-inherited errors
(EngineConfigPage/jsonView/useTimestampTitles), none in touched files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant