Skip to content

[tui] Show reset details in redemption picker#30488

Draft
jayp-oai wants to merge 1 commit into
codex/reset-credit-detailsfrom
codex/reset-credit-picker
Draft

[tui] Show reset details in redemption picker#30488
jayp-oai wants to merge 1 commit into
codex/reset-credit-detailsfrom
codex/reset-credit-picker

Conversation

@jayp-oai

@jayp-oai jayp-oai commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Why

Users can see that reset credits are available, but not which credits they have, when each one expires, or which credit will be consumed.

What changed

  • load reset-credit details only when the user opens Redeem usage limit reset
  • show every returned available credit, sorted by expiry, with its reset scope and expiration time
  • consume the exact selected credit and preserve its idempotency key across retries
  • fall back to a generic Use any reset option when the backend reports more credits than its capped detail response
  • keep the picker usable when either the detail request or the existing rate-limit request fails
  • handle a selected credit becoming unavailable without incorrectly caching the user's total count as zero
  • leave passive startup and status refreshes on the existing count-only path

TUI preview

Rendered from the final standard-width and narrow insta snapshots in this PR.

pr30488-reset-picker-preview

Validation

  • just test -p codex-tui chatwidget::tests::usage (32 passed)
  • just test -p codex-tui app::background_requests::tests::reset_credit_results (1 passed)
  • just test -p codex-tui (2,955 passed; 2 pre-existing Guardian feature-flag tests failed and reproduce without this change)
  • just fix -p codex-tui
  • just fmt
  • no pending snapshots
  • Autoreview: clean

Depends on #30395.

Fixes #29618.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant