fix(desktop): route profile tabs through active gateway - #89786
Closed
addelh wants to merge 2 commits into
Closed
Conversation
…ve-gateway-89675 # Conflicts: # apps/desktop/src/store/profile.test.ts # apps/desktop/src/store/profile.ts
Contributor
Author
|
Superseded by merged #89785 ( Closing without deleting the branch. If profile tabs still fail after testing current main—especially on an explicit non-local registered gateway—we can re-cut the narrow connection-identity fix against the restored seams with fresh evidence. For the reported Mac Mini local-profile failure, #89785 is now the correct fix to verify. |
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.
Summary
Why
After merged #89719, Bot Mode can switch agents on the Mac Mini because it calls the connection-aware
ensureAgent(connectionId, profile)path. The profile squares at the bottom of Sessions still call legacyensureGatewayProfile(profile), dropping the active gateway identity.That leaves an explicit
local/registry-backed Sessions workspace unable to switch profiles even though the same profiles work from Bots.The routing rule is deliberately bounded:
(connectionId, profile);connectionId === "local"is authoritative even on the legacy primary descriptor, so This device cannot inherit a v1 remote override;Fire-and-forget tab actions contain and log registry activation rejections, preserving the existing non-throwing UI contract instead of producing an unhandled promise rejection.
Relationship to other work
Related to #89675 and merged #89719.
This addresses the remaining Sessions profile-rail routing failure reported after Bot selection began working. It does not claim to replace #89609's activation-verdict work or #81165's failed-dial error surfacing.
Tests
TDD / mutation proof:
prepareGatewayForAgent("local", "research")was never called;Validation on Windows 11:
The full
src/storesweep produced 993 passes and one unrelated timeout insession-unread-tile.test.ts; rerunning that file alone passed 3/3.