Dismiss stale app-server requests after remote resolution#15134
Dismiss stale app-server requests after remote resolution#15134
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b33d70991
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1f56731e1
ℹ️ 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".
4274285 to
c10a4d3
Compare
b367eff to
8728d1d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ed4a5ba66
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b3a0788b8
ℹ️ 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".
58086f3 to
c7d2481
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7d2481260
ℹ️ 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".
c7d2481 to
de4622b
Compare
8a55de5 to
2d664a6
Compare
Handle remote app-server resolutions across the full modal stack and let AppLinkView dismiss matching MCP elicitation requests. Also preserve underlying stacked views when the active modal completes. Co-authored-by: Codex <noreply@openai.com>
Keep paste-driven completion aligned with the existing regression coverage by clearing the full modal stack before re-enabling composer input. Co-authored-by: Codex <noreply@openai.com>
Add argument-comment lint annotations to recently added overlay dismissal tests. Co-authored-by: Codex <noreply@openai.com>
Track app-server request_user_input prompts per turn so same-turn prompts resolve FIFO, and dismiss stale TUI prompts by call id rather than turn id. Co-authored-by: Codex <noreply@openai.com>
Remote app-server resolution now retires matching prompts from the deferred interrupt queue before they can materialize after streaming flushes. The queue only removes prompt-shaped events and keeps lifecycle events such as exec begin/end queued. Co-authored-by: Codex <noreply@openai.com>
Cover the case where an app-server approval request is buffered for active-thread delivery, then resolved by another surface before the TUI drains and displays it. Co-authored-by: Codex <noreply@openai.com>
Before materializing a buffered active-thread server request, verify that its app-server request id is still pending. This prevents prompts resolved by another surface from becoming actionable when the TUI drains already-queued events. Co-authored-by: Codex <noreply@openai.com>
2d664a6 to
b2ac16b
Compare
|
/merge |
Use the platform-aware test path helper instead of a hardcoded Unix path in the buffered approval regression test. Co-authored-by: Codex <noreply@openai.com>
Dismiss stale TUI app-server approvals after remote resolution
When an approval, user-input prompt, or elicitation request is resolved by another client, the TUI now dismisses the matching local UI instead of leaving stale prompts behind and emitting a misleading local cancellation.
This change teaches pending app-server request tracking to map
serverRequest/resolvednotifications back to the concrete request type and stable request key, then propagates that resolved request into TUI prompt state. Approval, request-user-input, and MCP elicitation overlays now drop the resolved current or queued request quietly, advance to the next queued request when present, and avoid emitting abort/cancel events for stale UI.The latest update also retires matching prompts while they are still deferred behind active streaming and suppresses buffered active-thread requests whose app-server request id has already been resolved before drain.
ChatWidgetremoves a resolved request from both the deferred interrupt queue and the materialized bottom-pane stack, while active-thread request handling verifies the app-server request is still pending before showing a prompt. Lifecycle events such as exec begin/end remain queued so approved work can still render normally.Tests cover resolved-request mapping, overlay dismissal behavior, deferred prompt pruning for same-turn user input, exec approval IDs, lifecycle-event retention, and the buffered active-thread ordering regression.
Validation:
just fmtgit diff --checkcargo test -p codex-tui resolved_buffered_approval_does_not_become_actionable_after_draincargo test -p codex-tui enqueue_primary_thread_session_replays_buffered_approval_after_attachcargo test -p codex-tui chatwidget::interruptsjust fix -p codex-tui