From d05264ff8029de034fdd67223e9a7354839ee76b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 20 Jun 2026 17:35:45 -0400 Subject: [PATCH] fix(web/playlists): attribute source when playing a system playlist from its detail page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Playing a system playlist from /playlists/ previously sent no source, so it never advanced that playlist's rotation — inconsistent with the home tile (and the Android detail screen, which already tags the variant). Pass source: variant alongside the existing self-heal closure so a play is attributed regardless of the surface it started from. Issue #968. Co-Authored-By: Claude Opus 4.8 (1M context) --- web/src/routes/playlists/[id]/+page.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/src/routes/playlists/[id]/+page.svelte b/web/src/routes/playlists/[id]/+page.svelte index fd80bcf9..f35fcd06 100644 --- a/web/src/routes/playlists/[id]/+page.svelte +++ b/web/src/routes/playlists/[id]/+page.svelte @@ -70,13 +70,14 @@ // so the index in the playable list != the playlist position. const clickedTrackID = data.tracks.find((t) => t.position === position)?.track_id; const startIdx = live.findIndex((t) => t.id === clickedTrackID); - // #968: a system playlist played from its detail page gets the same - // self-heal closure as the home tile, so a stale snapshot re-pulls on - // total failure. (Source attribution is intentionally left to the home - // tile / shuffle path — this only adds the recovery closure.) + // #968: a system playlist played from its detail page is tagged with its + // source (so play_started advances the rotation, matching the home tile and + // the Android detail screen) and gets the self-heal closure so a stale + // snapshot re-pulls on total failure. const variant = data.system_variant; if (variant != null) { playQueue(live, Math.max(0, startIdx), { + source: variant, refetch: systemPlaylistRefetch({ variant, playlistId: id,