fix(desktop): apply stale remote session fallback on all platforms#35815
Open
leecoder wants to merge 2 commits into
Open
fix(desktop): apply stale remote session fallback on all platforms#35815leecoder wants to merge 2 commits into
leecoder wants to merge 2 commits into
Conversation
PR anomalyco#35790 only guards Windows. The same stale session restore bug affects macOS/Linux when switching between remote servers. Remove the Windows-only navigator.userAgent check so getLastActiveUrl falls back to home on every OS.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: The search results show that PR #35815 (the current PR) builds on PR #35790 as mentioned in the description. PR #35790 implemented the Windows-only version of this fix, and the current PR extends it to all platforms. These are related but not duplicates—#35790 is the predecessor that this PR builds upon. No duplicate PRs found |
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #25131
Closes #32473
Type of change
What does this PR do?
PR #35790 added stale remote session URL detection to prevent the desktop app from crashing on startup when the persisted last-active URL references a session that no longer exists. However, it only applied the fix on Windows (gated by
navigator.userAgent.includes("Windows")).The same crash happens on macOS and Linux when switching between remote servers — the localStorage retains a session URL from the previous server, and the new server returns 404.
This PR removes the Windows-only guard so
getLastActiveUrl()falls back to/(home) on all platforms when a stale remote session URL pattern is detected.How did you verify your code works?
bun typecheck)Screenshots / recordings
N/A — no UI change, crash prevention only.
Checklist