Skip to content

fix(web): keep the local backend connected when the computer loses internet - #204

Merged
AadiJo merged 1 commit into
mainfrom
local-backend-ignores-offline
Nov 3, 2026
Merged

AadiJo merged 1 commit into
mainfrom
local-backend-ignores-offline

Conversation

@AadiJo

@AadiJo AadiJo commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

When the computer lost internet, chat showed "Offline. Reconnect the backend before sending messages or running actions." and sending was disabled, even though the backend runs on the same machine. The browser's offline event made the connection supervisor drop the open WebSocket and stop trying to reconnect until it came back online.

Network status is now a hint, not a gate. The supervisor no longer drops or skips a connection because the browser reports offline. Coming back online still cuts a retry backoff short. Nothing produces the offline connection phase anymore, so this PR removes it.

Proof: two new supervisor tests fail on main and pass with the fix. One covers a live session going offline, and one covers starting while offline. In the dev app, firing offline on main showed the banner and disabled send. With the fix, the banner never appears and a message sent afterward is saved by the backend. Typecheck, vp check, and the client-runtime and web tests pass.

Reviewed with sol-loop: 1 round with gpt-6.1-sol. Sol verdict: approved


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cadsense Ready Ready Preview Nov 3, 2026 7:22pm UTC

@AadiJo
AadiJo force-pushed the local-backend-ignores-offline branch from f8a24dd to 6f497e0 Compare November 3, 2026 19:21
@AadiJo
AadiJo merged commit 5895169 into main Nov 3, 2026
12 checks passed
@AadiJo
AadiJo deleted the local-backend-ignores-offline branch November 26, 2026 19:51

This branch was successfully deployed

1 active deployment
Preview — 6f497e0e Deployed Nov 3, 2026 by vercel[bot]
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.

1 participant