You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closes#65601\n\n## Summary\n- Skip remembered-route/session restoration in standalone new-session windows\n- Add a regression test proving the window stays on /new instead of jumping to the last session\n\n## Verification\n- npm run test:ui -- --run src/app/contrib/hooks/use-desktop-integrations.test.tsx\n- npm run typecheck\n- npx eslint src/app/contrib/hooks/use-desktop-integrations.ts src/app/contrib/hooks/use-desktop-integrations.test.tsx\n- git diff --check
Thanks for the focused regression fix. Current main has the reported path: apps/desktop/src/app/contrib/hooks/use-desktop-integrations.ts:64-72 persists shared remembered state, then :79-100 restores it when the renderer starts at /. Electron deliberately starts standalone drafts at ?win=secondary&new=1#/ (apps/desktop/electron/session-windows.ts:45-47), and isNewSessionWindow() already recognizes that flag (apps/desktop/src/store/windows.ts:33-49).
The patch gates both effects and the regression test exercises the hook with a new-session window, asserting that neither remembered-state reads/writes nor navigation occur. The current hook blob matches the PR preimage, so salvage is mechanically clean.
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
area/sessionsSession lifecycle, resume, persistence, historycomp/desktopElectron desktop app (apps/desktop/*)duplicateThis issue or pull request already existsP3Low — cosmetic, nice to havesweeper:blast-moderateSweeper blast radius: moderate — a subsystem or single platformsweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradessweeper:risk-session-stateSweeper risk: may lose/corrupt/mis-associate session or context statetype/bugSomething isn't working
3 participants
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.
Closes #65601\n\n## Summary\n- Skip remembered-route/session restoration in standalone new-session windows\n- Add a regression test proving the window stays on /new instead of jumping to the last session\n\n## Verification\n- npm run test:ui -- --run src/app/contrib/hooks/use-desktop-integrations.test.tsx\n- npm run typecheck\n- npx eslint src/app/contrib/hooks/use-desktop-integrations.ts src/app/contrib/hooks/use-desktop-integrations.test.tsx\n- git diff --check