In-process read surface: albums, photos, and timeline grouping #64

Merged
clawbot merged 3 commits from issue-44-read-surface into next 2026-09-22 17:21:48 +02:00
3 Commits
Author SHA1 Message Date
sneak 555badc0b9 Key timeline weeks by ISO week, not the Monday date
check / check (push) Successful in 16s
periodOf keyed a week by the Monday's YYYY-MM-DD, which collides with
the day-key form. Weeks now key as YYYY-Www (ISO 8601, e.g. 2025-W32);
the week-year comes from the week's Thursday, so it stays correct across
the January/December boundary. The Monday-start boundary and startsAt
are unchanged. Week tests now assert the ISO form.

Model: opus-4-8
2026-09-22 15:03:43 +00:00
sneak 1df0e52d40 Add in-process read surface: albums, photos, timeline (closes #44)
check / check (push) Successful in 28s
Serve albums, photos, and a grouped timeline from RAM over the record
projection (#43), with no network. Every call takes one named-argument
object. `lib.albums` lists and looks albums up by name or id; `lib.photos`
resolves a file to a `Photo` wrapper or returns plain deduped records;
`lib.timeline.groups` buckets photos by local day/week/month, newest group
and newest member first, each file once.

`PhotoFilter` narrows the timeline by album, case-insensitive text (title,
caption, or album name), file type, and presence of a location; archived
photos are excluded unless asked for and hidden photos are never included.
Weeks start on Monday and `startsAt` is local-time midnight of the period.

Thin `Album`/`Photo` classes wrap the records for in-process callers only;
the plain records remain the IPC-safe surface. Content fetch (original,
thumbnail) is a later unit — this surface is read-only.

Model: opus-4-8
2026-09-22 13:34:48 +00:00
sneak 49387713f6 Add read-surface tests (albums, photos, timeline)
TDD red phase for issue #44: the in-process read API served from RAM —
lib.albums (list/byName/byID), lib.photos (byID/records), Album/Photo
wrappers, and lib.timeline.groups with the PhotoFilter and day/week/month
grouping rules. These fail until src/library/read.ts lands.

Model: opus-4-8
2026-09-22 13:34:48 +00:00