Decision of Max at /pr-brief 185 (2026-11-03): a change made during the few
seconds of « Fusionner » (or « Charger ce compte ») must reach the server.
initialMerge and initialReset run while sync is still off, so writeOutboxEntry
dropped such a write. The outbox now also queues while a first sync runs, and
the merge points the pending entries that name the fixed local Inbox at the
server Inbox (remapInboxEntry), otherwise the server refuses them.
Refs #165
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>