Repository navigation
feat(calendar): personalized presets (Following default) with watched overlay - #25
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…resolvers Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Also drops the now-unused Filter/UserID/ProfileID fields from the blendUpcomingIntoDiscoverRows CalendarFilter literal in recommendations.go, which only wants an unrestricted windowed query. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…mpty-state nudge Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Popular reflects server-wide watch counts, which are sparse on a low-traffic server. Hidden from the selector, URL allowlist, and empty-state nudge; backend filter and the CalendarFilter type are left intact so re-enabling is a one-line change. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Extract hardcoded trending snapshot source/window to named constants. - Collapse the three identical personal-preset nil-checks into one case. - Persist the selected preset through the shared storage util (try/catch wrapped) instead of raw localStorage with manual SSR guards. - Derive KNOWN_FILTERS from PRESET_OPTIONS so the lists can't drift. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThis PR implements a calendar preset switcher feature that replaces the existing All/Favorites/Watchlist toggles with four presets: Following (default), Popular here, Trending, and Everything. The implementation includes a backend query infrastructure refactor, personal calendar data methods, handler orchestration for preset resolution and watched overlay, and frontend UI updates with persistent preset storage. ChangesCalendar Presets & Watched Overlay
🎯 3 (Moderate) | ⏱️ ~25 minutes
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
feat(calendar): personalized presets (Following default) with watched overlay
feat(calendar): personalized presets (Following default) with watched overlay
Summary
Replaces the calendar's
All / Favorites / Watchlisttoggles with a Simkl-style preset switcher and a personalized default, powered by real watch data:Why / approach
Performance was an explicit goal (hundreds of concurrent calendar users). The design is "filter, don't compute": every preset resolves to a small id-set that the existing windowed calendar query intersects via
itemIDExpr = ANY($n). Popular/Trending are read from background-refreshed caches (no per-request aggregation); Following is resolved per request from indexed per-profile lookups. No new heavy SQL is added beyond the windowed query that already ran.Design spec and implementation plan are included under
docs/superpowers/.Backend
CalendarFiltergains a generic id-set restriction (RestrictByIDs/RestrictToIDs), replacing the favorites/watchlistEXISTSspecial-cases with one uniform mechanism.internal/catalog/calendar_personal.go): followed / favorites / watchlist id-sets + a bounded watched lookup.resolveCalendarRestriction), overlays watched status (resolveWatched), and adds an additivewatchedfield to event responses. Popular readsrecommendation_cache; Trending reads the canonicaltmdb/weeksnapshot.Frontend
storageutil; empty-state nudges to other presets.Reviewer notes
filtervalues plus awatchedfield;all/favorites/watchliststill work, so existing silo-android / silo-apple clients are unaffected and can adopt the presets + watched cue as follow-ups.profile required400 guard (the/calendarroute already runs behindRequireProfile); per-profile presets now degrade to an empty calendar instead of erroring.recommendations.go: removed now-unusedFilter/UserID/ProfileIDfrom aCalendarFilterliteral that only wants an unrestricted windowed query.Test plan
go build ./...andgo test ./...— green locallycd web && pnpm run build+vitest+eslint+prettier --check— green locally/calendardefaults to Following; switch presets (pills on desktop, dropdown when narrow); reload remembers last preset; an empty Following week shows the Trending/Everything nudge; completed episodes render dimmed + ✓🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation