simpl-liste/tests
le king fu 38bcf8b893 fix(sync): no merge across accounts, sync off until the first-sync choice
Refs #165

A device holding another account's data (dataOwnerId, persisted, kept at
sign-out) only offers « Charger ce compte » (initialReset) or « Annuler »
(sign-out, data untouched), at sign-in and on « Synchroniser ». The rule
lives in syncRules.ts (firstSyncChoice).

Sync stays off until initialMerge or initialReset has succeeded, and the
scheduler refuses every sync while the local data belong to another account
(canSync): the outbox of the old account is never pushed under the new one.
The sync's own outbox writes (kept rows, the Inbox of initialReset) no
longer depend on syncEnabled, and the token getter follows the session, so
that the first sync runs with sync still off.

Sign-out pushes the outbox first (10 s at most, in the first-sync state of
the scheduler, one request reserved outside its budget) and warns with the
number of changes still unsent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:06:10 -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 fix(sync): no merge across accounts, sync off until the first-sync choice 2026-11-02 21:06:10 -05:00
syncRules.test.mjs fix(sync): no merge across accounts, sync off until the first-sync choice 2026-11-02 21:06:10 -05:00
syncSchedule.test.mjs fix(sync): no merge across accounts, sync off until the first-sync choice 2026-11-02 21:06:10 -05:00