Skip to content

fix(desktop): apply stale remote session fallback on all platforms#35815

Open
leecoder wants to merge 2 commits into
anomalyco:devfrom
leecoder:stale-session-all-os
Open

fix(desktop): apply stale remote session fallback on all platforms#35815
leecoder wants to merge 2 commits into
anomalyco:devfrom
leecoder:stale-session-all-os

Conversation

@leecoder

@leecoder leecoder commented Jul 8, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #25131
Closes #32473

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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?

  • Built the desktop app locally on macOS (Apple Silicon)
  • Launched with a stale remote session URL in localStorage
  • Confirmed it falls back to home instead of crashing with NotFoundError
  • Typecheck passes (bun typecheck)

Screenshots / recordings

N/A — no UI change, crash prevention only.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

OpeOginni and others added 2 commits July 7, 2026 21:56
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.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
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

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants