Commit Graph

89 Commits

Author SHA1 Message Date
Jonathan f750b815d2 feat(discovery): GET /api/discover feed
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 00:29:28 +02:00
Jonathan 2dfc9ab277 feat(discovery): web ListenBrainz similar-artists client
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-12 00:26:29 +02:00
Jonathan 0ddc9db611 feat(discovery): DiscoverySuggestion schema + WatchedArtist.lastDiscoveredAt
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 23:58:45 +02:00
Jonathan d65230ddfb feat: artist page toggle to show all release types (default studio-only) 2026-07-11 18:07:38 +02:00
Jonathan 560fdaa4b0 feat: filter artist discography + counts to core releases unless showAllTypes 2026-07-11 18:05:46 +02:00
Jonathan f2dbef047c feat: WatchedArtist.showAllTypes toggle (default false)
Adds the per-artist release-type filter toggle: off (default) restricts
a discography view to core studio releases, on shows everything
(live, compilations, etc.).
2026-07-11 18:03:29 +02:00
Jonathan 28fc1ee1a8 fix: artists search marks already-followed artists instead of a Follow button 2026-07-11 17:50:53 +02:00
Jonathan 2fb825140f feat: auto-refresh the scan button until the worker finishes 2026-07-11 17:40:27 +02:00
Jonathan 612cd02b15 feat: Settings 'Scan library' button + last-result status 2026-07-11 17:14:37 +02:00
Jonathan 7cb99361a5 feat: /api/scan — request a library scan + read its result
Type the POST request param (_request: Request) to match the test's
call signature and keep tsc --noEmit clean, per Next.js route handler
convention already used elsewhere in the codebase.
2026-07-11 17:11:42 +02:00
Jonathan af67d01aa2 feat: LibraryItem.requestId nullable (scanned haves need no request) + test cleanup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 16:56:59 +02:00
Jonathan f59f972c1b fix: guard test cleanup to a dedicated lyra_test DB (never wipe live data)
Test suites were running DELETE FROM.../deleteMany() against whatever
DATABASE_URL pointed to, which was the live app database, wiping user
credentials and library. Add a guard in both the worker conftest and
web test setup that raises before any cleanup unless the target DB
name ends in '_test'. Default DATABASE_URL to lyra_test when unset in
the worker, and make `npm test` target lyra_test explicitly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 16:16:12 +02:00
Jonathan 9f895cfc10 fix: search-now dedupes against an active job (match worker enqueue invariant)
The worker's enqueue_due refuses to enqueue when a non-terminal job
already exists for a release. The search-now route enqueued
unconditionally, so two clicks (or a click racing the worker sweep)
could create two concurrent pipelines for the same album, both
importing and colliding on LibraryItem's @@unique([artist,album]).

Mirror the worker's guard: no-op if a job in a non-terminal state
(anything other than imported/needs_attention) already exists for the
release.
2026-07-11 14:19:31 +02:00
Jonathan 7087b2780e feat: artist discography page + wanted page 2026-07-11 14:11:53 +02:00
Jonathan f7135b9046 feat: artists page with live-search follow picker 2026-07-11 14:08:10 +02:00
Jonathan cd652c7285 feat: wanted list API — list + standalone add 2026-07-11 14:04:35 +02:00
Jonathan 6615ecf3a7 feat: releases API — monitor toggle + search-now enqueue 2026-07-11 14:00:49 +02:00
Jonathan f5ceea8fde fix: narrow artist PATCH/DELETE 404 catch to Prisma P2025 (rethrow real errors) 2026-07-11 13:58:40 +02:00
Jonathan 1e39c74b16 feat: artist item API — detail, auto-monitor toggle, unfollow 2026-07-11 13:55:36 +02:00
Jonathan 7f0ac68657 feat: artists API — follow (persist discography) + list 2026-07-11 13:51:14 +02:00
Jonathan 8e97796bad feat: MusicBrainz proxy API routes (artist search + discography browse)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 13:45:24 +02:00
Jonathan 341da71505 test: type the fetch mock so the MB test typechecks (tsc --noEmit clean) 2026-07-11 13:15:21 +02:00
Jonathan cdcda9e501 feat: read-only MusicBrainz module + monitoring test cleanup
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 13:11:11 +02:00
Jonathan ec85016d88 feat: monitoring data model (WatchedArtist, MonitoredRelease, Request link) 2026-07-11 12:07:09 +02:00
Jonathan 00b3dddca6 feat: Qobuz auth-token (user_id + token) login as a reliable alternative to email/password
Qobuz's email/password API login returns 401 even with valid credentials
(a known Qobuz limitation, unaffected by streamrip version). Add settings
fields for a Qobuz user ID + auth token (token stored encrypted); when both
are present StreamripClient uses use_auth_token=True, else falls back to
email/password.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-11 00:46:17 +02:00
Jonathan 69a8835c86 feat: add settings page for credentials 2026-07-10 19:58:46 +02:00
Jonathan 1b11fa37bd feat: add config API with encrypted secret storage 2026-07-10 19:54:27 +02:00
Jonathan 91ea32c4b8 feat: add web AES-256-GCM secret crypto and LYRA_SECRET_KEY plumbing 2026-07-10 19:50:16 +02:00
Jonathan 45cf9e8527 feat: add Config schema 2026-07-10 19:46:17 +02:00
Jonathan 60f3cd0df9 feat: add Candidate and LibraryItem schema
Adds Candidate (per-job download candidates found by the pipeline)
and LibraryItem (per-request imported album, deduped on
artist+album) tables. LibraryItem.requestId is @unique since
Request.libraryItem is a one-to-one back-relation (required for
Prisma validation, matching the existing Job.requestId pattern).
2026-07-10 18:40:41 +02:00
Jonathan 7532e20d1e fix: worker waits for schema before claiming; npm ci for reproducible builds
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 17:32:20 +02:00
Jonathan 52a0999f9b chore: add restart policies and document prisma copy step
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 17:22:36 +02:00
Jonathan 3e44de093e feat: add worker loop and production Dockerfiles 2026-07-10 17:16:24 +02:00
Jonathan 8085ed719f feat: add request form and live queue UI 2026-07-10 16:53:07 +02:00
Jonathan fd9969ae17 test: cover 400 validation branches in request API
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 16:51:24 +02:00
Jonathan 15bb68bc49 feat: add request create/list API 2026-07-10 16:47:54 +02:00
Jonathan ab4db641b0 feat: add Request and Job schema with migration
Adds the Prisma schema (Request/Job models, RequestStatus/JobState
enums), a Prisma client singleton at web/src/lib/db.ts, and the
init_request_job migration, applied and verified against Postgres.

Also publishes the db service's port (5432:5432) in docker-compose.yml
so host-run Prisma commands can reach localhost:5432 for local dev.
2026-07-10 16:43:22 +02:00
Jonathan 80e01b1c52 fix: bump next past known CVEs
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 16:39:57 +02:00
Jonathan 599cc76404 chore: scaffold web, worker, and compose stack
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 16:33:22 +02:00