tane/apps/app_seeds/lib/data/export_import
vjrj 21e4357970 fix(sync): replicate deletions and keep photos off the wire
Reusing the backup snapshot for sync had two bugs that would bite real use:

1. Deletions didn't propagate. exportInventory() filters isDeleted=false
   (user backups are tombstone-free by design) and the JSON codec dropped
   isDeleted (omitted on encode, hardcoded false on decode) — so deleting a
   variety on one device never reached the others. Now the codec round-trips
   isDeleted (emitted only when true, so backups stay byte-identical and it's
   backward compatible), and a new exportForSync() includes tombstones. The
   importer already merges them LWW-correctly.

2. Photos bloated events. The snapshot embeds photo bytes as base64, so a
   real inventory would blow past relay event-size limits and sync would
   silently fail. exportForSync() omits attachments entirely (photos stay
   device-local; media sync is a separate, deferred concern).

buildSnapshot() now uses exportForSync(); backups keep using exportInventory
(photos in, tombstones out) unchanged.

Tests: a deletion replicates as a tombstone; the sync snapshot carries no
photo bytes while a sealed backup still does.
2026-07-11 00:17:08 +02:00
..
import_reconciler.dart feat(inventory): CSV/JSON export and JSON import with LWW reconciliation 2026-07-09 12:46:53 +02:00
inventory_csv_codec.dart style: dart format reflow (no behavior change) 2026-07-09 22:19:43 +02:00
inventory_json_codec.dart fix(sync): replicate deletions and keep photos off the wire 2026-07-11 00:17:08 +02:00
inventory_snapshot.dart style: dart format reflow (no behavior change) 2026-07-09 22:19:43 +02:00
seed_label_codec.dart feat(labels): print seed labels with QR from an inventory selection 2026-07-10 19:14:04 +02:00