From dae46ea980ec0a2096473b4f872edcc8d1d97bd8 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 27 Nov 2026 03:09:15 -0500 Subject: [PATCH] refactor(web): every cover thumbnail goes through Cover, so a failed load falls back (DRY W2) Seven places drew their own cover image. The Missing, Suspect sources, Hidden and Reports rows showed a Music2 icon only when the track had no album; a cover that failed to load (not fetched yet, or gone) showed a broken image. The queue row, play bar and Now Playing each set the placeholder in their own onerror, and the playlist card's images had no fallback at all. Cover gains fallback="track" (the Music2 icon a track row uses), and all seven go through it, so each one handles a missing src and a failed load the same way. Co-Authored-By: Claude Opus 5.5 --- web/src/lib/components/Cover.svelte | 21 +++++++++------ web/src/lib/components/Cover.test.ts | 26 +++++++++++++++++++ web/src/lib/components/PlayerBar.svelte | 24 ++++++----------- web/src/lib/components/PlaylistCard.svelte | 9 +++---- web/src/lib/components/QueueTrackRow.svelte | 12 ++++----- web/src/lib/components/QueueTrackRow.test.ts | 4 ++- .../routes/collection/missing/+page.svelte | 21 ++++----------- .../routes/collection/reports/+page.svelte | 13 ++++------ .../collection/suspect-sources/+page.svelte | 21 ++++----------- web/src/routes/library/hidden/+page.svelte | 16 +++--------- web/src/routes/now-playing/+page.svelte | 13 +++------- 11 files changed, 80 insertions(+), 100 deletions(-) create mode 100644 web/src/lib/components/Cover.test.ts diff --git a/web/src/lib/components/Cover.svelte b/web/src/lib/components/Cover.svelte index b4cdec4c..38a82264 100644 --- a/web/src/lib/components/Cover.svelte +++ b/web/src/lib/components/Cover.svelte @@ -1,6 +1,6 @@