Skip to content

Show account usage reset countdowns and banked resets - #756

Open
katulevskiy wants to merge 2 commits into
zeronsh:mainfrom
katulevskiy:codex/account-reset-times
Open

katulevskiy wants to merge 2 commits into
zeronsh:mainfrom
katulevskiy:codex/account-reset-times

Conversation

@katulevskiy

@katulevskiy katulevskiy commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

The composer account popover showed usage percentages without telling users when their allowance returns. Reset countdowns now fit directly in each meter label, such as Week (3d) or Session (2h), preserving the original 400px card and two-line account rows. The label uses the largest whole unit rounded down (days, hours, minutes; <1m below a minute). Hover shows the exact local reset date and time.

Codex accounts show banked resets as a small reset icon and count beside the plan and “In use,” with an explanatory tooltip. The optional count comes from the existing usage response and travels through the account RPC and persisted usage cache. Missing counts stay unknown; zero counts add no indicator. Claude gets separate session and weekly countdowns; its current usage parser does not report reset credits. Redemption is managed in provider usage settings.

Countdowns repaint locally every 30 seconds while the popover is open. Crossing a reset time requests fresh usage through the existing throttle/backoff. Expired or missing timestamps leave the meter label plain; expired timestamps show “reset pending” in the tooltip until fresh usage arrives.

Validation

  • 69 engine and 24 UI account tests passed. UI coverage includes the compact countdown rounding boundaries.
  • Tests cover whole-unit rounding boundaries and expired timestamps, positive/zero/unknown/malformed credit counts, older cache compatibility, RPC serialization, and banked counts surviving a restart with a single mocked usage request.
  • Built and visually inspected six native Windows captures: Codex credits, Claude dual countdowns, and expired/missing resets with a long email, in dark and light themes (synthetic accounts, 96 DPI).
  • Formatting checks for changed Rust files and git diff --check passed.

The reproducible offline fixture and refreshed captures are documented in docs/screenshots/account-usage/README.md. No live credentials are used by the fixture or tests.

Screenshots

Codex banked resets Claude session and weekly resets
Codex Claude

@katulevskiy

Copy link
Copy Markdown
Contributor Author

will redo design, my clanker messed it up

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