Delay approval prompts while typing#19513
Merged
etraut-openai merged 5 commits intomainfrom Apr 27, 2026
Merged
Conversation
fcoury-oai
approved these changes
Apr 27, 2026
Contributor
fcoury-oai
left a comment
There was a problem hiding this comment.
Just curious: were you able to replicate this problem by hand? I tried by couldn't.
Codex found an edge case that is very simple to fix. I am proactively approving it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Fixes #7744. Approval modals can currently appear while the user is typing ahead in the TUI composer, which lets plain letters like
yoraget consumed as approval shortcuts instead of staying in the draft input.What changed
bottom_pane/mod.rs.Verification
Added unit coverage for immediate approvals, delayed approvals, idle deadline reset, typed shortcut letters staying in the composer, shortcut handling after the delay, and resolved delayed-request pruning.
Focused
codex-tuitest groups pass locally. The fullcargo test -p codex-tuirun currently aborts inapp::tests::attach_live_thread_for_selection_rejects_unmaterialized_fallback_threads; that same test also fails when run alone with the same stack overflow.Manual reviewer check:
Start the TUI from the repo root:
Submit this prompt:
While the agent is preparing the approval request, immediately type text such as
ya this should stay in the composer.Confirm the typed-ahead
y/aremains in the composer instead of approving the request.Stop typing for about 1 second; the approval modal should then appear.
Once the modal is visible, press
yand confirm the approval shortcut works normally.