tane/apps/app_seeds/lib/data
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
..
export_import fix(sync): replicate deletions and keep photos off the wire 2026-07-11 00:17:08 +02:00
species_catalog.dart perf(species): seed the bundled catalog only once per version 2026-07-10 15:46:04 +02:00
species_repository.dart perf(species): seed the bundled catalog only once per version 2026-07-10 15:46:04 +02:00
variety_repository.dart fix(sync): replicate deletions and keep photos off the wire 2026-07-11 00:17:08 +02:00