🤖 fix: preserve queued follow-ups during dispatch handoff - #3924
🤖 fix: preserve queued follow-ups during dispatch handoff#3924ammar-agent wants to merge 4 commits into
Conversation
Keep a dequeued user follow-up visible until its durable transcript row is emitted, and consolidate no-stream queue cleanup. Add a regression test that verifies the queue card-to-transcript event ordering. --- _Generated with `xum` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$25.07`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=25.07 -->
|
@codex review Please review the queued-message visibility handoff and failure-path cleanup. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d570a81b9
ℹ️ 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".
Retain the in-flight user entry in the server queue projection through durable acceptance, include it in reconnect and mutation snapshots, and disable stale queue actions during the handoff. --- _Generated with `xum` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$64.30`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=64.30 -->
fa060e3 to
0baeab9
Compare
|
@codex review The in-flight entry is now part of the authoritative server projection through durable acceptance, including reconnect and queue-mutation snapshots, with stale actions disabled during PREPARING. Please take another look. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0baeab9ec3
ℹ️ 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".
Update the disposal-race assertion to verify synthetic attribution remains intact while allowing the queue handoff to add its durable-acceptance callback. --- _Generated with `xum` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$64.30`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=64.30 -->
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This comment has been minimized.
This comment has been minimized.
Expose dispatching state from the authoritative queue projection instead of general stream startup, and omit an in-flight card from reconnect snapshots once its user row is already durable in replayed history. --- _Generated with `xum` • Model: `openai:gpt-5.6-sol` • Thinking: `xhigh` • Cost: `$64.30`_ <!-- mux-attribution: model=openai:gpt-5.6-sol thinking=xhigh costs=64.30 -->
This comment has been minimized.
This comment has been minimized.
|
@codex review Addressed both findings in |
This comment has been minimized.
This comment has been minimized.
|
@codex review All prior findings are addressed and their threads are resolved. Please perform a fresh code review of |
This comment has been minimized.
This comment has been minimized.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Fix the visual gap where a follow-up sent during compaction could disappear between leaving the queued-message card and appearing as a durable transcript row.
Background
The composer clears as soon as a send begins, so a follow-up queued behind compaction is represented only by the queued-message card. Queue draining previously removed the entry and emitted an empty queue projection before asynchronous history persistence emitted the corresponding user row. During that interval the text appeared nowhere in the UI.
Implementation
PREPARINGlifecycle before publishing the projection and disable Edit, dispatch-mode, send-now, and queued-message keyboard actions during persistence.Validation
make static-checktests/ui/chat/queuedMessageBanner.test.tsx: 21 passedtests/ipc/streaming/queuedMessages.completing.test.ts: 6 passedRisks
Moderate but scoped risk in queued-message projection and action timing. Persistence and FIFO dispatch semantics are unchanged; the added state only spans dequeue through durable acceptance. Tests cover reconnect-equivalent projection rebuilding, concurrent queue mutation, cancellation/failure cleanup, and disabled dispatching actions.
Subtractive ledger
The authoritative in-flight projection and action gate require a small production addition. The same change removes five parallel visible-queue getters and consolidates three duplicated failure/cancellation cleanup paths in the queue/session modules.
Generated with
xum• Model:openai:gpt-5.6-sol• Thinking:xhigh• Cost:$133.55