Skip to content

feat(codex): show and redeem ChatGPT reset cards - #528

Open
Longtianmu wants to merge 14 commits into
Menci:mainfrom
Longtianmu:codex/chatgpt-reset-cards
Open

Longtianmu wants to merge 14 commits into
Menci:mainfrom
Longtianmu:codex/chatgpt-reset-cards

Conversation

@Longtianmu

Copy link
Copy Markdown

Summary

  • Show Codex/ChatGPT rate-limit reset cards in a saved upstream account, including availability, expiry, empty, and failure states.
  • Confirm before redeeming a supported, unexpired card. Reuse one redemption request ID across ambiguous failures and retries, and prevent duplicate submissions.
  • After a successful reset, invalidate stale quota/credit UI and show fresh observations when they arrive. Preserve upstream open-string values and show load/redeem failures distinctly from empty results.

UX screenshots

Production Web build at da8d6d1d, with synthetic offline API responses. No real reset card was consumed.

Available card:

Available reset card

Confirmation:

Reset card confirmation

Success with stale quota and credits cleared:

Redemption success

All ten screenshots also cover pending redemption, empty and error states, expiry, dark theme, and 390px Simplified Chinese.

Verification

  • pnpm run verify passed on da8d6d1d: 570 Vitest files / 6,163 tests; installer harness 63 passed, 47 host-dependent skips; type generation, lint, workspace typechecks, repository invariant checks, and production Web build passed.
  • Browser flow with synthetic responses: cancellation made 0 consume requests; success made 1; three ambiguous-failure/reopen retry attempts shared one idempotency key. No page errors, unexpected requests, or mobile horizontal overflow.
  • git diff --check passed. The 19 changed files are confined to provider-codex, gateway control-plane, WebUI, and their tests; no CHANGELOG.md, manifest, or lockfile changes.

The endpoint and payload contract was compared with the official Codex backend client.

This continues #505. The requested screenshots have been attached there; GitHub rejected reopening that closed PR with HTTP 422, so this PR carries the current branch head for review. Review from @M1k0t0 is required before merging.

@Longtianmu

Copy link
Copy Markdown
Author

@Menci The requested UX screenshots are embedded above, with all ten states on the prior discussion. Could you approve the pending Verify workflow run and formally request review from @M1k0t0? The run is action_required with no jobs yet, and the reviewer-request API returns 404 for this fork author. The full local pnpm run verify passed on this exact head.

@Menci

Menci commented Sep 23, 2026

Copy link
Copy Markdown
Owner

I'd like to move the "Use this card" button to the position of "Available" / "Redeemed" labels. When available show "Use" and when unavailable show "Redeemed" with a disabled state.

Will redeemed cards disappear after refresh? I'd like to also request a screenshot of an empty card list.

image

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.

2 participants