fix(desktop): restore profile sessions in new windows - #59608
Open
SnowMat wants to merge 1 commit into
Open
Conversation
Secondary Desktop windows start with empty renderer stores, so route-only session ids can resume against the wrong/default profile before the owning session row is known. Pass a pre-hash profile hint through the open-window bridge and use it before fallback session probing.\n\nAdds regression coverage for secondary-window URL construction, bridge option forwarding, query parsing, and hinted profile resolution.
Contributor
|
Thanks for isolating a real multi-profile Desktop resume failure. Current Problems
Suggested changes
Automated hermes-sweeper review. |
This was referenced Aug 9, 2026
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
openSessionWindowbridge into secondary-window URLsprofilequery hint during route resume and probe that backend before the default/active profileWhy
Secondary Desktop windows start with fresh renderer stores. If an existing session is opened with only
#/SESSION_ID, the new renderer can try to resume before it knows the session's owning profile. In multi-profile installs this can hit the wrong/default backend and render an effectively blank session window with only the composer.The fix keeps the existing hash route intact but adds routing metadata before the hash, e.g.
?win=secondary&profile=mission-control#/SESSION_ID, soHashRouterstill receives the session id while the resume path can select the correct backend immediately. Stale/copied URLs without a profile hint keep the previous fallback probing behavior.Verification
node --test apps/desktop/electron/session-windows.test.cjsnpm run --prefix apps/desktop test:ui -- src/store/windows.test.ts src/app/session/hooks/use-session-actions/utils.test.tsnpm run --prefix apps/desktop typechecknpm run --prefix apps/desktop lint(passes with one pre-existing warning insrc/app/settings/model-settings.tsx)