Plain-record library snapshot and change subscription #62

Merged
clawbot merged 1 commits from issue-43-snapshot-subscribe into next 2026-09-22 15:22:52 +02:00
1 Commits
Author SHA1 Message Date
sneak 377b4b628c Plain-record library snapshot and change subscription (closes #43)
check / check (push) Successful in 26s
Project the decrypted store into plain, key-free records the GUI reads
across Electron IPC: PhotoRecord, AlbumRecord, LibrarySnapshot, and the
LibraryChange a subscription delivers.

snapshot() is synchronous (RAM only): one PhotoRecord per fileID, deduped
across memberships with every album id, newest first. subscribe({ onChange })
fires a LibraryChange (changed full records plus removed id sets) only when a
refresh alters the projection; a no-op refresh fires nothing.

Magic-metadata field names are taken from the repo fixtures: w/h and
visibility. Edited-name/edited-time precedence is pubMagicMetadata over basic
metadata; takenAt is exposed in milliseconds (Ente stores microseconds).

Model: opus-4-8
2026-09-22 13:04:58 +00:00