feat(api): on-this-day carousel endpoint (spec 056 T001) #1137
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/on-this-day-backend"
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
New
GET /api/timeline/on-this-dayendpoint for the Photos start page carousel (spec 056, T001; design:docs/superpowers/specs/2026-10-12-on-this-day-carousel-design.md).TimelineQueryService.onThisDay: server-UTC day matching (same day semantics as timeline day keys), 1..5 years back, years without matches absent, Feb 29 clamps to Feb 28, per year max-5 newest items with trueitemCountvia windowedCOUNT(*) OVER ().Clock(UTC) for testability; 2-arg constructor kept for existing callers. Read-only, no migration.Tests
Service (Testcontainers): year window + empty-year skipping + 6-back exclusion, cap-5 with true count + newest-first, Feb 29 clamping, scope/visibility parity (revoked contribution, trashed, unsupported format), empty response. Controller: media:read scope enforcement + param forwarding. Full
:apps:api:testgreen (pre- and post-rebase onto latest main).Frontend follows in
feat/on-this-day-web(stacked loosely on the same contract).