fix(web/playlists): attribute source when playing a system playlist from its detail page
test-web / test (push) Successful in 38s

Playing a system playlist from /playlists/<id> 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) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 17:35:45 -04:00
parent a23e2e36ca
commit d05264ff80
+5 -4
View File
@@ -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,