Skip to content

feat: On This Day β€” release anniversaries and collection calendarΒ #166

@SimplicityGuy

Description

@SimplicityGuy

Overview

Surface time-aware content from the knowledge graph: release anniversaries, historical milestones, and "on this day" moments. "30 years ago today, Endtroducing was released." "This week marks the anniversary of 47 releases in your collection."

Low implementation cost since release year data already exists on masters and releases in the graph. High engagement value β€” gives users a reason to open the app daily.

Proposed Endpoints

API Endpoints (api/routers/calendar.py)

Endpoint Description
GET /api/calendar/today Releases with anniversaries today (all data + user's collection)
GET /api/calendar/week Upcoming anniversaries this week
GET /api/calendar/month/{year}/{month} Calendar view of release anniversaries for a given month
GET /api/calendar/milestones Notable upcoming milestones: 10th, 25th, 50th anniversaries
GET /api/calendar/history/{month}/{day} "On this day in music" β€” notable releases across all years

Query Parameters (shared)

  • collection_only=true β€” filter to only the authenticated user's collection
  • genre={style} β€” filter by genre/style
  • milestone_years=10,25,50 β€” which anniversary years to highlight

Response Shape (example: today)

{
  "date": "2026-03-18",
  "anniversaries": [
    {
      "release_id": 789,
      "title": "Endtroducing.....",
      "artist": "DJ Shadow",
      "year": 1996,
      "years_ago": 30,
      "milestone": true,
      "in_collection": true,
      "label": "Mo' Wax"
    }
  ],
  "stats": {
    "total_anniversaries": 142,
    "collection_anniversaries": 12,
    "milestones": 3
  }
}

Data Notes

  • Discogs masters/releases have a year field but not always exact month/day
  • For releases with only a year, distribute them across the year or show them in a "this year" section
  • Releases with full dates (from release notes or Discogs released field) get exact day matching
  • PostgreSQL release_dates table may be needed to store parsed exact dates when available

Explore UI β€” "Calendar" Pane

Add a Calendar pane to the Explore sidebar navigation.

Pane Layout

  1. Today's Highlights β€” hero section showing the most notable anniversary today (largest milestone year, most popular release). Card with: release title, artist, "X years ago today", label, year
  2. Anniversary Feed β€” scrollable feed of today's anniversaries, sorted by milestone significance. Each entry shows: release title, artist, years ago, milestone badge (πŸŽ‚ 10yr, πŸ₯ˆ 25yr, πŸ₯‡ 50yr). Toggle between "All" and "My Collection"
  3. This Week β€” compact list of upcoming anniversaries for the next 7 days
  4. Monthly Calendar β€” grid calendar view (current month) where days are color-coded by number of anniversaries. Clicking a day shows that day's releases. Navigation arrows to browse months
  5. Milestone Countdown β€” upcoming milestone anniversaries in the user's collection: "In 23 days: 25th anniversary of Kid A"

UI Details

  • Monthly calendar grid is a simple HTML table styled with the design system
  • Day cells show a count badge; clicking expands to a release list below the calendar
  • Milestone badges use consistent iconography
  • "Collection only" toggle filters all sections simultaneously
  • Feed auto-refreshes at midnight (or on pane activation if stale)
  • Empty state: "No anniversaries today" with a teaser of the next upcoming one

Integration Points

Implementation Notes

  • Core query is simple: match releases where year = current_year - N, optionally filtered by collection membership
  • For exact date matching, parse the released field from Discogs data (format varies: "1996-11-19", "1996", "November 1996")
  • Precompute daily anniversaries via a scheduled task and cache in Redis (TTL 24h, refreshed at midnight)
  • Month/day extraction from partial dates: if only year is known, flag as "year-only" and show in a monthly summary rather than a specific day
  • Lightweight feature β€” minimal new infrastructure needed

Acceptance Criteria

  • Today endpoint returns releases with anniversaries on the current date
  • Week endpoint returns upcoming 7 days of anniversaries
  • Month endpoint returns calendar data for a given month
  • Milestones endpoint highlights 10th, 25th, and 50th anniversaries
  • Collection-only filter works across all endpoints
  • Explore UI "Calendar" pane displays all sections
  • Exact date parsing handles Discogs date format variations gracefully
  • Daily anniversary cache refreshed automatically
  • β‰₯80% test coverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions