tane/apps/app_seeds/lib
vjrj d0dbed9bc2 feat(sync): device-to-device inventory sync, end to end
Wires the encrypted sync transport into a working replication between one
identity's own devices, reusing the CRDT-ready model (HLC + tombstones +
LWW) the data model was built for.

- SocialSession gains a 5th interface, sync, over the shared connection,
  built with a per-install deviceId + the app's inventory namespace.
- DeviceIdStore: a stable random per-install id in the keystore — distinct
  from the seed-derived CRDT node id, which is IDENTICAL across a user's
  devices (so it couldn't tell them apart / they'd clobber each other's
  replaceable record).
- InventorySnapshotIO (implemented by ExportImportService): build/apply the
  inventory as the SAME interchange JSON as backups but UNSEALED — the sync
  transport does the encryption, so it must not double-seal. Apply = the
  existing idempotent LWW importInventory.
- SyncService: on (re)connect publishes this device's snapshot + subscribes
  to the others'; a local edit (debounced, off tableUpdates) republishes;
  incoming snapshots merge idempotently; skips its own echo; a byte check
  skips re-publishing an unchanged snapshot so the ping-pong converges.
  Foreground only, like the inbox.
- DI/Bootstrap/switchSocialAccount wire and lifecycle it per identity.

Tests: DeviceIdStore, ExportImportService snapshot round-trip (unsealed +
idempotent), SyncService.handleRemote (applies others', skips own).

Follow-ups: deltas vs full-snapshot pushes; background sync; conflict UI.
2026-07-10 23:45:40 +02:00
..
data feat(market): host and publish the cover photo with each offer 2026-07-10 21:12:36 +02:00
db feat(inventory): photo-first drafts + on-device OCR (digitization R2+R4) 2026-07-09 21:23:46 +02:00
di feat(sync): device-to-device inventory sync, end to end 2026-07-10 23:45:40 +02:00
domain Solve lint issue 2026-07-10 10:34:43 +02:00
i18n Merge branch 'claude/nostalgic-wright-acfc25': inline offer photos 2026-07-10 21:43:35 +02:00
security feat(backup): sealed backups + printable recovery sheet 2026-07-09 22:32:13 +02:00
services feat(sync): device-to-device inventory sync, end to end 2026-07-10 23:45:40 +02:00
state refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
ui refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
app.dart refactor(social): one shared relay connection per identity 2026-07-10 21:50:34 +02:00
bootstrap.dart feat(sync): device-to-device inventory sync, end to end 2026-07-10 23:45:40 +02:00
main.dart feat(identity): switch social identity, all from the one backup 2026-07-10 20:22:24 +02:00