Matthias Nott
2026-03-08 6cbe1fb2618af557262a8717c494e7958494bf2d
refs
author Matthias Nott <mnott@mnsoft.org>
Sunday, March 8, 2026 07:03 +0100
committer Matthias Nott <mnott@mnsoft.org>
Sunday, March 8, 2026 07:03 +0100
commit6cbe1fb2618af557262a8717c494e7958494bf2d
tree 381a402d3724c0e4ffe6bef7a5149011ce8355b4 tree | zip | gz
parent dbb6bf09b013937b5903844f8aa567ef4ee69555 view | diff
fix: robust WebSocket reconnection after daemon restart

- Add 5s connection timeout per attempt (prevents hanging on unreachable URLs)
- Always try local URL first on reconnect (daemon restarts are local)
- Add "reconnecting" status so UI shows yellow dot instead of red during auto-reconnect
- Track wasConnected/reconnectAttempt for smarter retry logic
- Clean up connectTimer in cleanup()
5 files modified
changed files
app/settings.tsx diff | view | blame | history
components/ui/StatusDot.tsx diff | view | blame | history
contexts/ConnectionContext.tsx diff | view | blame | history
services/websocket.ts diff | view | blame | history
types/index.ts diff | view | blame | history