Skip to content

fix(tui): clear completed safety buffering prompt#30490

Merged
fcoury-oai merged 1 commit into
mainfrom
codex/tui-safety-buffering-auto-hide
Jun 28, 2026
Merged

fix(tui): clear completed safety buffering prompt#30490
fcoury-oai merged 1 commit into
mainfrom
codex/tui-safety-buffering-auto-hide

Conversation

@fcoury-oai

@fcoury-oai fcoury-oai commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Why

The safety-buffering prompt is a modal TUI view, but the normal successful-turn path only hid the running status indicator. If the turn completed while the prompt was open, the stale modal remained over the composer until the user dismissed it or another turn started.

This aligns the TUI with the app behavior: keep the safety notice visible while the turn is active, then remove it when the turn becomes terminal. It also prevents the stale retry action from changing the model and reasoning effort for a future turn after the buffered turn has already completed.

New copy
CleanShot 2026-06-28 at 20 27 18

What changed

  • Clear the active safety-buffering view and retry state when a turn completes successfully.
  • Update the retry-capable message to say “Hang tight or retry with a faster model”.
  • Extend the safety-buffering regression coverage to verify that the prompt remains visible after assistant output starts and disappears when the turn completes.
  • Update the TUI snapshot for the revised copy.

This is a follow-up to #29919.

How to Test

  1. Start a TUI turn that receives model/safetyBuffering/updated with showBufferingUi: true and a fasterModel.
  2. Confirm the prompt says “Hang tight or retry with a faster model”.
  3. Let the turn continue and confirm the prompt remains visible while the turn is active.
  4. Let the turn finish successfully and confirm the prompt disappears and the composer is restored without requiring an extra keypress.
  5. Confirm a buffering update without a faster model still shows the shorter non-retry message.

Targeted automated coverage:

  • just test -p codex-tui safety_buffering — 4 passed.
  • just test -p codex-tui — 2,951 passed; two unrelated Guardian feature-flag tests failed identically on main in this environment.

The argument-comment lint was also audited manually. The workspace Bazel invocation was blocked by a missing external LLVM compiler-rt BUILD file, and the packaged per-crate fallback uses a nightly older than the current sqlx minimum Rust version.

@etraut-openai etraut-openai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Change looks good. Approved.

@fcoury-oai fcoury-oai merged commit 850da19 into main Jun 28, 2026
35 checks passed
@fcoury-oai fcoury-oai deleted the codex/tui-safety-buffering-auto-hide branch June 28, 2026 23:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 28, 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.

2 participants