simpl-liste/tests
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
..
feedback.test.mjs feat(feedback): integrate Feedback Hub widget in Settings (#68) 2026-07-27 19:43:12 -04:00
hydration.test.mjs fix(sync): bound the wait on the persisted settings before the inbox repair 2026-10-25 20:35:06 -04:00
smoke.test.cjs feat(sync): listen to the companion WebSocket for instant web-to-app sync (#175) 2026-11-07 21:13:16 -05:00
syncRules.test.mjs Merge branch 'issue-179-web-task-tags' into issue-180-tag-link-sync 2026-11-03 21:13:20 -05:00
syncSchedule.test.mjs Merge branch 'issue-178-sync-scheduler' into issue-165-account-switch 2026-11-03 20:41:37 -05:00
syncSocket.test.mjs feat(sync): listen to the companion WebSocket for instant web-to-app sync (#175) 2026-11-07 21:13:16 -05:00