fix(web): send queued messages in background threads - #13122
t3-code[bot] wants to merge 3 commits into
Conversation
Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces substantial production behavior that automatically dispatches queued messages across navigation, including attachment uploads, persistent thread-setting updates, and provider-turn creation. An unresolved Medium-severity path can also leave uploaded attachments pending for up to 24 hours after cancellation. Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
|
All clear Posted via Macroscope — UI Consistency |
Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
|
@macroscopeapp please refresh approvability for 77372f9. the valid findings are fixed and tested. the latest attachment-release suggestion was resolved with source evidence: Cancel/Stop restores the attachment to the composer, and transient readiness gates retain queued ownership, so releasing the pending upload at that return would break retained attachments. latest CI is green. |
problem
queued follow-ups were only processed by the selected
ChatView. switching threads left the previous thread's queue waiting until it was selected again.fix
add an app-level processor that subscribes only to threads with queued messages. the selected thread keeps its existing send path; other threads can send at the same tool/turn boundaries without mounting hidden chat views. this also keeps queues running while settings is open.
background sends use the original thread/environment and a snapshot of the queued model and modes. they wait for connection, hydration, approval/question, and checkpoint-rewind gates. messages stay cancellable during uploads. an atomic take claims the send before persistent settings updates, and a per-thread in-flight marker keeps Stop effective through those updates and prevents competing foreground sends. failed sends return to the queue held for manual retry, without touching the selected composer's draft.
verification
ChatViewlint warnings remain outside this change.web and desktop share this implementation. native mobile's separate queue is unchanged.
request provenance
requested by @extoci.
implemented with gpt-6-astra using hermes agent.
Closes #13676