feat(timeline): progressive day hydration with exact layout manifest (spec 051) #1000

Merged
chris merged 10 commits from feat/timeline-instant-placeholders into main 2026-10-03 11:38:49 +02:00
Owner

Summary

  • API: GET /api/timeline/days accepts optional layoutDayCount (clamped [0,24]) and layoutAround; a bounded window of days carries layoutItems (id, mediaType, captureTimestamp, createdAt, width, height — no URLs). NON_NULL keeps the response byte-identical for callers that do not opt in. One layout query reuses the day-items FROM/JOIN/visibility/predicate structure with identical ordering and a per-day 500-entry cap.
  • Web load: the grid renders as soon as the days overview resolves (skeleton only during the days request). Day items hydrate through a single FIFO pump — one request in flight, top-to-bottom, per-day failures non-fatal, generation-aware so stale loads cannot mutate the timeline. Event refreshes fetch sequentially and skip days the pump owns. Dropped queue entries settle their batch promises on load.
  • MediaGrid: layoutItems render as exact, non-interactive, aria-hidden placeholder tiles through the same justified-row layout path as real items (identical geometry, no layout shift), each with a subtle centered spinner (animate-spin, never animate-pulse — spec-013 guard). Placeholders carry no data-timeline-media-id, so selection and scroll anchoring only ever resolve real tiles. Days without a manifest keep the existing count-based placeholders.
  • Spec: specs/051-progressive-timeline-day-hydration/ (spec, plan, tasks; renumbered from 050 after main claimed 050 for semisupervised clustering).

CI environment fixes (bundled — scoped tests were red on every branch)

  1. build.gradle.kts: pin Testcontainers docker client api.version=1.44. Docker Engine >= 28 (Winterfell/CI) rejects docker-java default 1.32 — this was the real ISSUE-076 root cause (runner configs were identical to the working NUC ones).
  2. deploy/postgres/Dockerfile + README: base postgis/postgis:16-* is Debian 11-only and PGDG removed bullseye-pgdg (2026-08), so the image could not be rebuilt anywhere. Now postgres:16 (Debian 13) + postgresql-16-postgis-3 + postgresql-16-pgvector; PG major 16 and the data volume path unchanged. Note: merging this rebuilds and recreates the memories-postgres container via the normal CI deploy path (volume preserved).

Verification

  • :apps:api:test: 1418 tests, 0 failures on the CI daemon (Engine 29.7.2) with both fixes
  • npm run check (svelte-check): 0 errors (pre-existing warnings only)
  • npm run test:unit (vitest): 60/60 after merging origin/main
  • Post-merge (origin/main @ b3dab737 merged in; no file overlap): svelte-check 0 errors, vitest 60/60, :apps:api:compileJava+compileTestJava OK; spec 051 validated via spec-query
  • Playwright not run locally (requires full stack); timeline + spec-013 fixtures updated for the new render/hydration timing and left for CI.
## Summary - **API**: `GET /api/timeline/days` accepts optional `layoutDayCount` (clamped [0,24]) and `layoutAround`; a bounded window of days carries `layoutItems` (id, mediaType, captureTimestamp, createdAt, width, height — no URLs). `NON_NULL` keeps the response byte-identical for callers that do not opt in. One layout query reuses the day-items FROM/JOIN/visibility/predicate structure with identical ordering and a per-day 500-entry cap. - **Web load**: the grid renders as soon as the days overview resolves (skeleton only during the days request). Day items hydrate through a single FIFO pump — one request in flight, top-to-bottom, per-day failures non-fatal, generation-aware so stale loads cannot mutate the timeline. Event refreshes fetch sequentially and skip days the pump owns. Dropped queue entries settle their batch promises on load. - **MediaGrid**: `layoutItems` render as exact, non-interactive, aria-hidden placeholder tiles through the same justified-row layout path as real items (identical geometry, no layout shift), each with a subtle centered spinner (`animate-spin`, never `animate-pulse` — spec-013 guard). Placeholders carry no `data-timeline-media-id`, so selection and scroll anchoring only ever resolve real tiles. Days without a manifest keep the existing count-based placeholders. - **Spec**: `specs/051-progressive-timeline-day-hydration/` (spec, plan, tasks; renumbered from 050 after main claimed 050 for semisupervised clustering). ## CI environment fixes (bundled — scoped tests were red on every branch) 1. `build.gradle.kts`: pin Testcontainers docker client `api.version=1.44`. Docker Engine >= 28 (Winterfell/CI) rejects docker-java default 1.32 — this was the real ISSUE-076 root cause (runner configs were identical to the working NUC ones). 2. `deploy/postgres/Dockerfile` + README: base `postgis/postgis:16-*` is Debian 11-only and PGDG removed `bullseye-pgdg` (2026-08), so the image could not be rebuilt anywhere. Now `postgres:16` (Debian 13) + `postgresql-16-postgis-3` + `postgresql-16-pgvector`; PG major 16 and the data volume path unchanged. **Note: merging this rebuilds and recreates the `memories-postgres` container via the normal CI deploy path (volume preserved).** ## Verification - `:apps:api:test`: **1418 tests, 0 failures** on the CI daemon (Engine 29.7.2) with both fixes - `npm run check` (svelte-check): 0 errors (pre-existing warnings only) - `npm run test:unit` (vitest): 60/60 after merging origin/main - Post-merge (origin/main @ b3dab737 merged in; no file overlap): svelte-check 0 errors, vitest 60/60, `:apps:api:compileJava`+`compileTestJava` OK; spec 051 validated via spec-query - Playwright not run locally (requires full stack); timeline + spec-013 fixtures updated for the new render/hydration timing and left for CI.
API: GET /api/timeline/days accepts optional layoutDayCount (clamped
[0,24]) and layoutAround; a bounded window of days carries layoutItems
(id/type/timestamps/dimensions only, NON_NULL so the shape stays
byte-identical for callers that did not opt in). One layout query
reuses the day-items FROM/JOIN/visibility/predicate structure with
identical ordering and a per-day 500-entry cap.

Web: the grid renders as soon as the days overview resolves (skeleton
only during the days request); day items hydrate through one FIFO pump
with at most one request in flight, top-to-bottom, per-day failures
non-fatal, generation-aware so stale loads cannot mutate the timeline.
Event refreshes fetch sequentially and skip days the pump owns.
Timeline bulk-selection test waits for hydrated tiles (spec 050).
feat(web): exact spinner placeholders for manifest days (spec 050 T002)
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 1m7s
85ae657dc4
MediaGrid renders day.layoutItems as non-interactive placeholder tiles
through the same justified-row layout path as real items (layoutRows +
rowItemStyle + aspect clamping), so hydrated tiles replace them
in-place with identical geometry. Placeholders are aria-hidden, carry
the media-grid-placeholder test hook but no data-timeline-media-id
(scroll anchoring must only resolve real tiles), and show a subtle
animate-spin (never animate-pulse, which the spec-013 guard forbids
inside aria-hidden). Count-based placeholders shrink by the manifest
count; days without a manifest keep the old block unchanged.
load() clears the FIFO queue of the previous generation; dropped
entries must still invoke their batch-settle callback so awaiters of
hydrateDays resolve per its documented contract (merged, failed, or
stale) instead of hanging on an orphaned promise.
chore(spec): mark spec 050 tasks T001/T002 done, T003 active
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 1m10s
8c94aa21ec
chore(spec): record PR #1000, mark spec 050 T003 done
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 1m9s
f9e7530a0a
ci: retrigger scoped tests (ISSUE-076 docker-daemon flake)
Some checks failed
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Failing after 1m7s
c6c30d678c
Docker Engine >= 28 rejects docker-java's default client API 1.32
('Minimum supported API version is 1.40'), so every Testcontainers
suite failed at DockerClientProviderStrategy on hosts with new daemons
(Winterfell / its CI runners) while the NUC's older engine accepted it.
Verifiable locally: GET /v1.32/version returns 404-era 400, /v1.44 is
200. The value is overridable with -Dapi.version for other daemons.
fix(deploy): rebuild postgres image from postgres:16 (PGDG dropped bullseye)
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 1m34s
c2d4f23f48
postgis/postgis:16-* (16-3.4 and 16-3.5 alike) ship only Debian 11
(bullseye), and PGDG removed bullseye-pgdg after Debian 11 LTS ended
2026-08 — apt-get update 404s inside every postgis image, so neither
the Testcontainers test image (deploy/postgres/Dockerfile) nor the
production image could be rebuilt. Switch to the official postgres:16
image (Debian 13/trixie, PGDG repo alive) and install
postgresql-16-postgis-3 + postgresql-16-pgvector. PG major 16 and the
/var/lib/postgresql/data volume path are unchanged; full :apps:api:test
(1418 tests) green against the new image.
chris changed title from feat(timeline): progressive day hydration with exact layout manifest (spec 050) to feat(timeline): progressive day hydration with exact layout manifest (spec 051) 2026-10-03 11:37:00 +02:00
merge: origin/main + renumber spec 050->051 (main claimed 050 for semisupervised clustering)
All checks were successful
Wiki Sync / Sync wiki from docs (push) Has been skipped
Build and Deploy / Detect changed services and test scopes (push) Successful in 2s
Build and Deploy / Android unit tests and debug APK (push) Has been skipped
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Smoke people worker (push) Has been skipped
Build and Deploy / Build postgres image (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Deploy postgres (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 1m20s
736ad42006
Main merged specs/050-single-pass-semi-supervised-face-clustering while
this branch's spec was drafted as 050. Move ours to 051 (next free),
update spec/plan/tasks ids, S050T00x task ids and 'spec 050' code
comments in files owned by this branch; main's clustering references
stay untouched.
chris merged commit 3e8567eea2 into main 2026-10-03 11:38:49 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!1000
No description provided.