simpl-liste/app
le king fu 6fd234af8e feat(sync): listen to the companion WebSocket for instant web-to-app sync (#175)
The app opens the companion WebSocket in the foreground (ticket from
POST /api/ws-ticket, then wss://.../ws derived from SYNC_API_BASE). A sync
notice asks the scheduler at once; later notices within 20 s fold into one
sync at the end of the window. The fixed 30 s tick skips while the socket is
open and the last sync is under 2 min old.

Reconnection: 1 s doubled, capped at 60 s, +-20 % jitter, reset after 30 s
open; auth_expired takes a new ticket at once; ticket 401 stops until the
next start; ticket 429 waits for the bounded Retry-After. The socket closes
in the background, on sign-out, sync off and canSync false.

syncSocket.ts is pure and import-free (tests/syncSocket.test.mjs under node);
syncSocketClient.ts wires fetch, WebSocket and timers and only calls
scheduleSync. REVIEW.md Haut Sync line and review-levels.py include both.

Refs #175

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:35:45 +00:00
..
(tabs) fix(sync): no merge across accounts, sync off until the first-sync choice 2026-11-02 21:06:10 -05:00
list fix: replace broken swipe-to-refresh with toolbar refresh button (#61) 2026-04-09 09:37:26 -04:00
task fix(sync): read the app inbox from the database and repair split devices 2026-10-25 20:20:24 -04:00
+not-found.tsx feat: initial Simpl-Liste MVP 2026-02-20 19:28:42 -05:00
_layout.tsx feat(sync): listen to the companion WebSocket for instant web-to-app sync (#175) 2026-11-08 15:35:45 +00:00