Files
codex/codex-rs/tui
Eric Traut 05cf8eeb14 Dismiss the model switch prompt when account usage recovers (#60435)
## 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
2026-11-09 19:37:04 +00:00
..