From 606ea82b704fc502de91313d8facb6d8ac9183f5 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sun, 12 Jul 2026 17:58:23 +0200 Subject: [PATCH] feat: real worker status, covers on Recently Pressed, library counter - Worker stamps a throttled worker.heartbeat; GET /api/worker reports online from its updatedAt recency (DB-time); masthead shows a live listening/offline dot instead of a static decoration. - /api/requests enriched with rgMbid; Recently Pressed shows cover thumbs. - Library album count moved from the filter row into a section header. Co-Authored-By: Claude Opus 4.8 (1M context) --- web/src/app/_ui/masthead.tsx | 6 ++--- web/src/app/_ui/pressed-list.tsx | 6 +++-- web/src/app/_ui/worker-status.tsx | 34 ++++++++++++++++++++++++++ web/src/app/api/requests/route.ts | 10 +++++--- web/src/app/api/worker/route.test.ts | 24 ++++++++++++++++++ web/src/app/api/worker/route.ts | 10 ++++++++ web/src/app/design.css | 8 ++++++ web/src/app/library/library-client.tsx | 12 ++++++--- web/src/app/queue.tsx | 3 ++- worker/lyra_worker/main.py | 5 ++++ 10 files changed, 103 insertions(+), 15 deletions(-) create mode 100644 web/src/app/_ui/worker-status.tsx create mode 100644 web/src/app/api/worker/route.test.ts create mode 100644 web/src/app/api/worker/route.ts diff --git a/web/src/app/_ui/masthead.tsx b/web/src/app/_ui/masthead.tsx index 6f5cea8..1456840 100644 --- a/web/src/app/_ui/masthead.tsx +++ b/web/src/app/_ui/masthead.tsx @@ -1,4 +1,5 @@ import { ThemeToggle } from "./theme-toggle"; +import { WorkerStatus } from "./worker-status"; export function Masthead() { return ( @@ -10,10 +11,7 @@ export function Masthead() {
A record label for an audience of one
-
- - Worker · listening -
+
diff --git a/web/src/app/_ui/pressed-list.tsx b/web/src/app/_ui/pressed-list.tsx index bea3e5e..148b6c4 100644 --- a/web/src/app/_ui/pressed-list.tsx +++ b/web/src/app/_ui/pressed-list.tsx @@ -1,11 +1,13 @@ -export type PressedItem = { id: string; artist: string; album: string; matrix: string }; +import { CoverArt } from "./cover-art"; + +export type PressedItem = { id: string; artist: string; album: string; matrix: string; rgMbid: string | null }; export function PressedList({ items }: { items: PressedItem[] }) { return (