Skip to content

feat(tui): add rate-limit reset redemption to /usage#28118

Closed
jayp-oai wants to merge 1 commit into
openai:codex/rate-limit-reset-app-serverfrom
jayp-oai:jayp/usage-rate-limit-resets
Closed

feat(tui): add rate-limit reset redemption to /usage#28118
jayp-oai wants to merge 1 commit into
openai:codex/rate-limit-reset-app-serverfrom
jayp-oai:jayp/usage-rate-limit-resets

Conversation

@jayp-oai

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

Copy link
Copy Markdown
Collaborator

Why

Codex users can earn personal rate-limit reset credits, but the CLI does not currently provide a way to view or redeem them. The /usage command restored in #27925 is intended to be the entry point for usage-related actions, so reset redemption belongs there rather than in a separate dashed slash command.

Depends on #28143 for the app-server and backend-client reset-credit APIs.

What changed

  • Turn bare /usage into a menu with entries for token activity and earned rate-limit resets while preserving /usage daily, /usage weekly, and /usage cumulative.
  • Add loading, empty, confirmation, success, retry, and error states with stable redemption request IDs for idempotent retries.
  • Show an availability hint only for backend-classified rate-limit errors with credits available.
  • Hide the reset entry for workspace accounts.

Validation

  • just test -p codex-tui chatwidget::tests::usage - 14 passed.
  • Focused idempotency retry test - passed cleanly on rerun.
  • just fix -p codex-tui - passed.
  • cargo insta pending-snapshots from codex-rs/tui - no pending snapshots.

Examples

image image image

@github-actions

github-actions Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jayp-oai jayp-oai force-pushed the jayp/usage-rate-limit-resets branch from 0682909 to cf0b13a Compare June 13, 2026 21:56
@jayp-oai jayp-oai marked this pull request as ready for review June 13, 2026 22:01
@jayp-oai

Copy link
Copy Markdown
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jun 13, 2026
@jayp-oai

Copy link
Copy Markdown
Collaborator Author

recheck

@jayp-oai jayp-oai requested a review from etraut-openai June 13, 2026 22:10
@jayp-oai jayp-oai self-assigned this Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #28154, which carries the same TUI change from an upstream branch so CI runs in the normal repository context.

@jayp-oai jayp-oai closed this Jun 14, 2026
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