fix(desktop): keep queued prompts bound to their sessions - #66929
Closed
iwillwill-ALLWILL wants to merge 1 commit into
Closed
fix(desktop): keep queued prompts bound to their sessions#66929iwillwill-ALLWILL wants to merge 1 commit into
iwillwill-ALLWILL wants to merge 1 commit into
Conversation
Collaborator
Contributor
|
Thanks for the focused session-binding fix. The current-main defect is real: Problems
Suggested changes
Automated hermes-sweeper review. |
Collaborator
|
Closing as superseded by #66001 (merged). Same fix surface (composer queue + background drain + submit targeting) for binding queued Desktop prompts to their originating session so they don't execute in / navigate to an unrelated busy conversation. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug Description
When one Desktop session is running, sending a queued prompt from another conversation can route the prompt back to the running foreground conversation and navigate the UI there. Restarting Desktop clears the transient queue/runtime state and temporarily restores normal behavior.
Root Cause
The background queue drain deliberately passes
sessionId: nullwhen its stored session has no live runtime mapping.submitTextused nullish coalescing and later falsy route-recovery checks, so that authoritative null was replaced with the foreground runtime/session context.Background drains could also outlive a profile switch, but queue entries did not persist their owner profile and all submit RPCs used the active gateway.
Fix
sessionId.How to Verify
Test Plan
git diff --checkpassed.Risk Assessment
Medium — the change touches queue metadata and profile-aware gateway selection, but retains the existing active-gateway path when no owner profile is supplied. Old persisted queue entries remain compatible through the existing session-list profile lookup.