Skip to content

fix(app): guard missing notification server state#35688

Open
jones wants to merge 1 commit into
anomalyco:devfrom
jones:notification-server-fallback
Open

fix(app): guard missing notification server state#35688
jones wants to merge 1 commit into
anomalyco:devfrom
jones:notification-server-fallback

Conversation

@jones

@jones jones commented Jul 7, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #35686

Type of change

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

What does this PR do?

Prevents the app notification context from crashing the renderer when notification state is requested for a server key that is not present in the current server list.

I hit this in OpenCode Desktop v1.17.14 on macOS. After startup, the app entered an infinite crash loop with:

Error: Notification server not found: http://[server-ip]:4096

Restart and Reload Webview did not clear it; the same error returned on the next launch. The IP address is an OpenCode server on my local network, and I can connect to it normally.

The crash started after a hard reset on macOS 27.0 beta. The entire macOS UI froze, so I forced a restart. After that, OpenCode Desktop was stuck showing this startup error and could not be used.

This change makes missing notification server state degrade to an empty/no-op notification state instead of throwing during render. Notification badges may be absent for that stale server key, but the app remains usable.

How did you verify your code works?

Ran:

npm exec --yes --package bun@1.3.14 -- bun run typecheck
npm exec --yes --package bun@1.3.14 -- bun run test:unit

Both passed from packages/app.

Screenshots / recordings

Before:

OpenCode Desktop Notification server not found startup crash

Checklist

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

@jones jones requested review from Brendonovich and Hona as code owners July 7, 2026 08:18
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 v1.17.14 can get stuck in an infinite startup crash loop with: Error: Notification server not found: http://[server-ip]:4096

1 participant