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) <noreply@anthropic.com>
This commit is contained in:
Jonathan
2026-07-12 17:58:23 +02:00
parent e624d12089
commit 606ea82b70
10 changed files with 103 additions and 15 deletions
+8 -4
View File
@@ -2,6 +2,7 @@
import { useEffect, useMemo, useState } from "react";
import { PageHead } from "../_ui/page-head";
import { SectionHeader } from "../_ui/section-header";
import { CoverArt } from "../_ui/cover-art";
import { AlbumModal } from "../_ui/album-modal";
@@ -42,14 +43,17 @@ export function LibraryClient() {
<span>Filter</span>
<input aria-label="filter library" placeholder="Artist or album…" value={q} onChange={(e) => setQ(e.target.value)} />
</label>
<span className="rmeta">
{shown.length} of {albums.length} albums
</span>
</form>
{albums.length === 0 ? (
<p className="empty">Nothing pressed yet. Scan your library in Settings, or queue a release from The Floor.</p>
) : (
<SectionHeader
title="Pressings"
note={q ? `${shown.length} of ${albums.length} albums` : `${albums.length} albums`}
/>
)}
{albums.length > 0 ? (
<div className="album-grid">
{shown.map((a) => (
<button key={a.id} className="album-card" onClick={() => setOpen(a)} aria-label={`Open ${a.album}`}>
@@ -64,7 +68,7 @@ export function LibraryClient() {
</button>
))}
</div>
)}
) : null}
{open ? (
<AlbumModal