[codex-cli] Confirm reset credit redemption#31329
Conversation
There was a problem hiding this comment.
💡 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".
| self.chat_widget.show_rate_limit_reset_confirmation( | ||
| picker_request_id, | ||
| confirmation_gate, |
There was a problem hiding this comment.
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 👍 / 👎.
5527081 to
6a9c841
Compare
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.
› 2. No, go back
Test plan
just test -p codex-tui chatwidget::tests::usage(32 passed)just fix -p codex-tuijust fmtjust test -p codex-tui(2,956 passed; one unrelated plugin timeout passed on isolated retry, and two unrelated Guardian assertions still fail in isolation)