Skip to content

fix(app): handle missing session route#24673

Open
kill74 wants to merge 2 commits intoanomalyco:devfrom
kill74:fix/missing-session-route
Open

fix(app): handle missing session route#24673
kill74 wants to merge 2 commits intoanomalyco:devfrom
kill74:fix/missing-session-route

Conversation

@kill74
Copy link
Copy Markdown

@kill74 kill74 commented Apr 27, 2026

Issue for this PR

Closes #23514

Type of change

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

What does this PR do?

Handles the case where the app is opened on a stale /session/:id route and the connected server does not have that session.

Previously, sync.session.sync(id) could throw a NotFoundError, which reached the app error boundary and showed a crash screen. This change detects that specific missing-session error, shows a toast, and navigates back instead of crashing.

It also avoids surfacing the same missing-session error from the scheduled refresh path.

How did you verify your code works?

  • Ran bun lint
  • Ran bun turbo typecheck --filter=@opencode-ai/app

Screenshots / recordings

N/A

Checklist

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

@kill74 kill74 requested a review from adamdotdevin as a code owner April 27, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode-desktop-windows-x64 connect opencode serve error

1 participant