fix(desktop): scope restored navigation by profile (#67709) - #79142
Merged
kshitijk4poor merged 1 commit intoAug 5, 2026
Merged
Conversation
Scope remembered desktop route and session keys by the encoded active profile. Discard ambiguous legacy global navigation keys instead of assigning them to an arbitrary profile. Delay cold-start restoration until the primary profile and session list have reached renderer.ready. Preserve explicit deep-link and hidden-window destinations. Restore and persist session routes only when a direct ID or lineage root is explicitly owned by the active profile. Clear both profile-scoped route and session state after resume exhaustion. Closes NousResearch#67709 Co-authored-by: Tranquil-Flow <tranquilflow@users.noreply.github.com>
kshitijk4poor
force-pushed
the
fix/desktop-scope-restored-navigation-by-profile
branch
from
August 5, 2026 06:50
6ceddab to
8770754
Compare
kshitijk4poor
enabled auto-merge (rebase)
August 5, 2026 06:52
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.
What changed
Salvage of #67823 (cc @Tranquil-Flow), rebased onto current
upstream/mainto resolve the modify/delete conflicts inuse-desktop-integrations.tsandwiring.tsxand the content conflicts insession.tsandsession.test.ts.The original PR's intent is preserved in full:
renderer.readyConflict resolution
upstream/mainlanded two changes in the same files since the original PR was authored:fix(desktop): scope the remembered route per profile #74277 (merged) added per-profile route key scoping with
LAST_ROUTE_KEYdeclared separately further down insession.ts. This salvage consolidatesLAST_ROUTE_KEYnext toLAST_SESSION_KEYat the top, removes the duplicate declaration, and keeps the module-levellegacyDiscardNeededflag with_resetLegacyDiscardForTests()export for test isolation.Commit
143942drestructuredwiring.tsxto calluseDesktopIntegrationswith$activeGatewayProfile.get()and$desktopBoot.get()(non-reactive.get()calls). This salvage converts both to reactiveuseStore()subscriptions (activeGatewayProfileandboot) so theprofileReadygate andactiveProfileprop update correctly when the boot phase or active profile changes.The
use-desktop-integrations.tshook itself was applied cleanly from the original PR — no modifications to its logic were needed.Why
The partial fix in #74277 scopes route keys but does NOT gate restoration on profile readiness or validate session ownership, so the race window is still open on current main. Users on v2026.8.3 with multiple profiles still see:
This salvage closes all three layers: profile-scoped keys,
renderer.readygate, and explicit session-ownership validation.Verification
tsc --noEmit)session.test.ts+use-desktop-integrations.test.tsx)assert-dist-built: passedgit diff --check: passedupstream/mainRelated