Skip to content

Dismiss the model switch prompt when account usage recovers - #60435

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9408f7cc7b49c52535f00d8a476f208fe4872bdf
Nov 9, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/9408f7cc7b49c52535f00d8a476f208fe4872bdf

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Dismiss the model switch prompt when account usage recovers

Why

The rate-limit model switch prompt can remain visible after account usage falls below the warning threshold.

What changed

Use fresh account usage reads to clear pending prompts when all reported usage windows fall below 90%. If the prompt is already visible, replace it with a recovery notice that counts down for five seconds before dismissing. Users can also dismiss the notice with Enter or Esc.

Ignore stale account reads when detecting recovery and preserve the recovery state when backend banners replace the prompt.

Testing

Add regression tests and a snapshot covering pending prompt cancellation, stale reads, the recovery notice countdown, automatic dismissal, and manual dismissal with Enter or Esc.

## Why

The rate-limit model switch prompt can remain visible after account usage falls below the warning threshold.

## What changed

Use fresh account usage reads to clear pending prompts when all reported usage windows fall below 90%. If the prompt is already visible, replace it with a recovery notice that counts down for five seconds before dismissing. Users can also dismiss the notice with Enter or Esc.

Ignore stale account reads when detecting recovery and preserve the recovery state when backend banners replace the prompt.

## Testing

Add regression tests and a snapshot covering pending prompt cancellation, stale reads, the recovery notice countdown, automatic dismissal, and manual dismissal with Enter or Esc.

GitOrigin-RevId: 9408f7cc7b49c52535f00d8a476f208fe4872bdf
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/9408f7cc7b49c52535f00d8a476f208fe4872bdf branch from 5c7c2e1 to 05cf8ee Compare November 9, 2026 19:37
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-09T19:37:35.676094Z 5c7c2e1 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 05cf8ee into main Nov 9, 2026
7 of 23 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/9408f7cc7b49c52535f00d8a476f208fe4872bdf branch November 9, 2026 19:37
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant