Skip to content

feat(admin): surface reset credit expiry and redemption results - #31

Merged
rexdotsh merged 1 commit into
mainfrom
feat/reset-credit-context
Aug 22, 2026
Merged

feat(admin): surface reset credit expiry and redemption results#31
rexdotsh merged 1 commit into
mainfrom
feat/reset-credit-context

Conversation

@rexdotsh

Copy link
Copy Markdown
Owner

What

Adds more context around Codex reset credits in the admin UI. Verified against OpenAI's Codex CLI source that we already decode every field the API exposes - this just surfaces what was being thrown away at display time.

  • Sort available reset credits by soonest expiry (matches Codex TUI behavior) and show a reset credit expires in Xd chip in the limits footer
  • Include the credit description and expiry in the restore button tooltip
  • Decode redemption result codes into human-readable toasts:
    • reset -> "Limits restored (N windows reset)" (success)
    • no_credit -> error toast
    • nothing_to_reset / already_redeemed -> neutral toasts with window count when present

Notes

A reset is instantaneous (windows are zeroed on consume), so there is no "reset duration" to track - the credit's own expires_at is the only lifetime involved, and it is now visible.

@rexdotsh
rexdotsh merged commit 1bd3917 into main Aug 22, 2026
2 checks passed
@rexdotsh
rexdotsh deleted the feat/reset-credit-context branch August 22, 2026 14:43
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