Files
chat_web_app/llm-fe/src
westfarn 7f16a3dca8
Unit Tests / test (push) Successful in 11s
Harden chat WebSocket for mobile lifecycle (#23) (#25)
## Summary
- Closes #23
- Add WebSocket reconnect with exponential backoff + jitter (capped attempts), heartbeat keepalives, and reconnect on browser visibility/`online` plus Capacitor `App`/`Network` plugins when present
- Refresh JWT before reconnect (coordinates with #22) so conversation refetch after a drop still works
- Mid-stream drop recovery: mark interrupted + refetch conversation; surface connecting/reconnecting/disconnected state and disable send while down

## Test plan
- [x] Unit tests: `websocketReconnect` helpers + `WebSocketProvider` reconnect/resume/send (`npm run test:ci`)
- [ ] Background app ~30s and ~10min, then resume — chat reconnects without reload
- [ ] Airplane mode on/off and cellular↔WiFi — reconnect indicator then restored send
- [ ] Drop mid-stream response — interrupted banner + conversation refetch
- [ ] Confirm nginx/`/ws/` proxy idle timeout stays above heartbeat (25s) or allows ping payloadsReviewed-on: #25
2026-07-26 13:35:39 -07:00
..
2025-03-07 12:21:37 -06:00
2025-03-07 12:21:37 -06:00
2025-04-27 07:31:56 +00:00
2025-03-07 12:21:37 -06:00
2025-03-07 12:21:37 -06:00
2025-03-07 12:21:37 -06:00