feat(web): On this day carousel on the Photos start page (spec 056 T002-T004) #1138

Merged
chris merged 1 commit from feat/on-this-day-web into main 2026-10-12 11:53:17 +02:00
Owner

Summary

"A year ago / Two years ago / …" carousel above the timeline on / (spec 056, T002–T004; design: docs/superpowers/specs/2026-10-12-on-this-day-carousel-design.md). Consumes GET /api/timeline/on-this-day from #1137.

  • T002 Row-height breakpoint table extracted from MediaGrid into lib/utils/wallRowHeights.ts (pure extraction, pixel-identical; table locked by unit tests).
  • T003 OnThisDayCarousel.svelte: fetch once on mount, renders nothing on error/empty; cards max-w 520px, mini-wall via layoutJustifiedRows at half target row height (1–3 items one full row, 4–5 items 3+2 half rows, last row never stretched); card height ≈ one wall row height so the band aligns with the timeline. Labels "A year ago"…"Five years ago", true photo count, newest year first.
  • T004 Card click jumps to the day in-place via the spec-051 targeted-day path + existing jumpToTimelineDay (no navigation, no overlay); modified clicks fall through to the /?date= deep-restore href. Carousel tiles carry no timeline media ids so scroll anchoring/selection are unaffected.

Tests

Unit: 11 new component tests (geometry 1-row vs 3+2, hidden on empty/error, ordering/labels, click wiring) + 4 table-lock tests — 108/108 green. Playwright tests/on-this-day.spec.ts: 6 specs desktop+mobile incl. real click→in-place jump for both day-in-overview and targeted-day-add paths — green (1 pre-known mobile flake, passes on retry; timeline regression suite 82 passed, a11y suite 7 passed). svelte-check 0 errors.

## Summary "A year ago / Two years ago / …" carousel above the timeline on `/` (spec 056, T002–T004; design: `docs/superpowers/specs/2026-10-12-on-this-day-carousel-design.md`). Consumes `GET /api/timeline/on-this-day` from #1137. - **T002** Row-height breakpoint table extracted from `MediaGrid` into `lib/utils/wallRowHeights.ts` (pure extraction, pixel-identical; table locked by unit tests). - **T003** `OnThisDayCarousel.svelte`: fetch once on mount, renders *nothing* on error/empty; cards max-w 520px, mini-wall via `layoutJustifiedRows` at half target row height (1–3 items one full row, 4–5 items 3+2 half rows, last row never stretched); card height ≈ one wall row height so the band aligns with the timeline. Labels "A year ago"…"Five years ago", true photo count, newest year first. - **T004** Card click jumps to the day in-place via the spec-051 targeted-day path + existing `jumpToTimelineDay` (no navigation, no overlay); modified clicks fall through to the `/?date=` deep-restore href. Carousel tiles carry no timeline media ids so scroll anchoring/selection are unaffected. ## Tests Unit: 11 new component tests (geometry 1-row vs 3+2, hidden on empty/error, ordering/labels, click wiring) + 4 table-lock tests — 108/108 green. Playwright `tests/on-this-day.spec.ts`: 6 specs desktop+mobile incl. real click→in-place jump for both day-in-overview and targeted-day-add paths — green (1 pre-known mobile flake, passes on retry; timeline regression suite 82 passed, a11y suite 7 passed). svelte-check 0 errors.
feat(web): On this day carousel on the Photos start page (spec 055 T002-T004)
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 3s
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 7m1s
a78816b6de
- T002: extract MediaGrid's row-height breakpoint table (target/min/max/
  fallback) verbatim into lib/utils/wallRowHeights.ts; MediaGrid keeps
  thin wrappers so rendered behavior is pixel-identical. Unit test locks
  the 168/194/236/268/300 (and compact 92/112/136) table.
- T003: getOnThisDay() API client (typed OnThisDayResponse, same
  scope/sharingGroupId + error handling as the other timeline endpoints)
  and OnThisDayCarousel.svelte: fetch-on-mount, renders nothing on error
  or empty entries, horizontal scroll region (albums-carousel pattern),
  520px cards that are whole-card links, mini-wall via layoutJustifiedRows
  at half the shared target row height for 4-5 items (3+2 split),
  fillFinalRow:false, MediaGrid-parity tile aspect/thumb handling with
  lazy ProgressiveImage.
- T004: mount the carousel above #photos-timeline on / and wire card
  clicks to a new jumpToOnThisDay(): adds a missing day through the
  spec-051 targeted-day merge path, then reuses jumpToTimelineDay (window
  + hydrate + scroll settle). No navigation, no media overlay.
- Tests: component specs (1-row vs 2-row geometry, hidden on empty/error,
  ordering + labels/counts, day-link wiring) and a Playwright spec
  covering the real click -> in-page day jump (including the
  targeted-day add path) plus empty/500 responses.
chris merged commit 235793b708 into main 2026-10-12 11:53:17 +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!1138
No description provided.