simpl-liste/src
le king fu df40602a49 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-07 21:13:16 -05:00
..
components feat(feedback): integrate Feedback Hub widget in Settings (#68) 2026-07-27 19:43:12 -04:00
db Merge branch 'issue-179-web-task-tags' into issue-180-tag-link-sync 2026-11-03 21:13:20 -05:00
hooks feat(feedback): integrate Feedback Hub widget in Settings (#68) 2026-07-27 19:43:12 -04:00
i18n fix(sync): no merge across accounts, sync off until the first-sync choice 2026-11-02 21:06:10 -05:00
lib fix(sync): bound the wait on the persisted settings before the inbox repair 2026-10-25 20:35:06 -04:00
services feat(sync): listen to the companion WebSocket for instant web-to-app sync (#175) 2026-11-07 21:13:16 -05:00
shared fix: remove duplicate RecurrenceType definition in shared/types (#34) 2026-04-06 10:39:12 -04:00
stores fix(sync): no merge across accounts, sync off until the first-sync choice 2026-11-02 21:06:10 -05:00
theme feat: extract shared types, colors, priority and recurrence (#34) 2026-04-06 10:38:16 -04:00
widgets perf(widget): cut expand/collapse tap latency (native patches + light headless path) 2026-07-19 16:41:47 -04:00
global.css feat: initial Simpl-Liste MVP 2026-02-20 19:28:42 -05:00