Repository navigation
feat(admin): one reset model for Codex and Claude, with honest results - #175
Merged
Merged
Conversation
Each account's resets are usable now, usable once a limit is hit, or unavailable with a reason, shown on one line under the limits. Use only appears when a reset can be used now; Claude keeps early use with its warning, Codex has none. Every Codex and Claude result says what happened and whether anything was spent.
…ives After a real reset the account's limits dim, with 'Updating limits…', until /admin/accounts returns a newer limits read. After about 20s the latest data shows with a quiet 'couldn't confirm yet'. Cold loads now merge codexResets from the quotas response, and an unconfirmed Claude claim says so instead of reporting a reset used.
rexdotsh
force-pushed
the
feat/reset-states-ui
branch
from
October 22, 2026 13:32
489ff66 to
1a00944
Compare
… it on timeout The consume route returns respondedAt, and the wait starts right after the spend's answer, with both re-reads on timers that no reload can block. Limits read after respondedAt end it. The 20s timeout re-renders, so the spinner gives way to 'Couldn't confirm yet' even when every reload fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 3/4 · resets UX redo. Admin UI.
One reset model for both providers
Every account's resets are in one of three states. They show on one line under the limits (label, balance, state, what they refill) instead of a cramped sub-line under a window.
3 credits · refills 5h + 7d windowsuse_requires_limit: falseand no limit hit2 resets · usable early · refills 5h and 7d limitscodexResets.unavailable = requires_limitrequires_limit3 credits · usable once a limit is hit · …paused,cooling down after a recent reset,unavailable right now,can't confirm what it refills1 reset · cooling down after a recent reset · …waiting for sync,claude.ai only,not eligibleThe Use button, the row menu item and the
Ushortcut only appear when a reset is usable now. Codex confirmations never show an early-use warning.Results and toasts
resetnothing_to_resetno_creditalready_redeemedresetnot_limitedalready_usedcooldownineligibleunavailablereasonreset_unconfirmed/stamp_indeterminateUpdating limits after a real reset
Kleis never shows limits the upstream hasn't reported. After a real reset (Codex
reset/already_redeemed, or a confirmed Claudereset), the account's limits stay as they are, dimmed, with a small pulsing dot and Updating limits… in the row's Resets column (and phone line) and in the detail footer./admin/accounts(or/usage) can't delay it or its timers. The consume route now returnsrespondedAt(server time)./admin/accountsreturns a quota whosefetchedAtis newer thanrespondedAt. Codex's immediate reload is older than that, so the state waits for the confirming read. The page re-reads about 6s after the reset, after the server's confirming read from fix(resets): confirm a reset with one limits read a few seconds later #173 lands.nothing_to_reset,not_limited, unconfirmed claims, refusals or errors.Cold load:
codexResetsfrom/admin/accounts/quotasis now merged like the limits, so an account first loaded without a quota doesn't offer Use (or the menu item, orU) when the follow-up saysrequires_limit. I checked this in the preview: before the fix, Use showed; after it, there's none.Screenshots
Fake data from a local preview server with mocked upstreams.
Codex: usable once a limit is hit (the reported case: 6% / 12%, 3 credits)
Codex: usable now (5h at 100%)
Codex: limits unknown, so Use is offered and Codex answers nothing_to_reset
Claude: usable now
Updating limits… (Codex, right after a reset)
Updating limits… (Claude): row and detail, then the confirmed limits
Couldn't confirm yet (the confirming read got a 429)
Timeout when every reload fails
Checked in the preview: the 6s and 20s


/admin/accountsreloads are aborted. Before the fix it was still spinning at 23s; now it shows the latest data with the hint.Updating starts even while account usage hangs
Checked in the preview:


/admin/accounts/usageis held pending. Before the fix there was no updating state; now it shows at once.Unconfirmed Claude claim
Claude: usable once a limit is hit
Claude: usable early
Claude: unavailable (cooldown)
bun lint,bun typecheck,bun test(318 pass, 12 skip, 0 fail; also--randomize) andbun run buildpass. There are no UI tests, per AGENTS.md; the behavior that matters is covered on the server in #173/#174.