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>