Skip to content

[codex-cli] Confirm reset credit redemption#31329

Open
jayp-oai wants to merge 7 commits into
mainfrom
codex/reset-credit-confirmation
Open

[codex-cli] Confirm reset credit redemption#31329
jayp-oai wants to merge 7 commits into
mainfrom
codex/reset-credit-confirmation

Conversation

@jayp-oai

@jayp-oai jayp-oai commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a safe-default confirmation before consuming a selected usage-limit reset

  • display backend-provided reset titles and descriptions, with generic fallbacks

  • reject stale or duplicate confirmation and consume events across key repeat and account changes

    Use this reset?
    Full reset · Does not expire.
    This will reset your current usage limits.

    1. Yes, use reset
      › 2. No, go back

Test plan

  • just test -p codex-tui chatwidget::tests::usage (32 passed)
  • just fix -p codex-tui
  • just fmt
  • just test -p codex-tui (2,956 passed; one unrelated plugin timeout passed on isolated retry, and two unrelated Guardian assertions still fail in isolation)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0a3d00712

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +947 to +949
self.chat_widget.show_rate_limit_reset_confirmation(
picker_request_id,
confirmation_gate,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Reset stale gates when confirmation is not shown

When two different reset rows are accepted before the first OpenRateLimitResetConfirmation is handled, the first event opens the confirmation and the second reaches this call while the active view is no longer the picker, so show_rate_limit_reset_confirmation returns false. Because that return value is ignored, the second row's AtomicBool remains false; after backing out of the first confirmation, selecting that second row no longer sends another event until the picker is rebuilt.

Useful? React with 👍 / 👎.

@jayp-oai jayp-oai force-pushed the codex/reset-credit-picker branch from 5527081 to 6a9c841 Compare July 7, 2026 04:09
Base automatically changed from codex/reset-credit-picker to main July 7, 2026 04:19
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