feat(web): On this day carousel on the Photos start page (spec 056 T002-T004) #1138
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/on-this-day-web"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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). ConsumesGET /api/timeline/on-this-dayfrom #1137.MediaGridintolib/utils/wallRowHeights.ts(pure extraction, pixel-identical; table locked by unit tests).OnThisDayCarousel.svelte: fetch once on mount, renders nothing on error/empty; cards max-w 520px, mini-wall vialayoutJustifiedRowsat 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.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.