Desktop: "Playing from" keeps naming a source the queue has outgrown #14

Closed
opened 2026-08-18 05:54:00 +00:00 by logan · 0 comments
Collaborator

Report

The "Playing from ..." line under the now-playing artist/track keeps naming the first album I happened to start a song from, even after I have appended lots of unrelated tracks to the queue. It should only claim a source while the queue actually is that source — or it should track the current track's origin.

Findings

  • backend/queue/queue.go: q.source is set by SetQueue (line ~248) and cleared in exactly one place (line 1224, on clear). Nothing in the add-to-queue paths touches it, so it survives arbitrary appends.
  • The line is rendered by frontend/src/utils/queue-source-link.ts from QueueState.Source.
  • It is persisted too (persistence.go:404), so a stale source survives a restart.

Direction

Two candidate rules, pick one deliberately:

  1. Invalidate on divergence — any append/insert/remove that makes the queue no longer equal to what the source produced clears q.source. Simple, honest, and the line disappears rather than lying.
  2. Per-track provenance — store a source per queue row and show the current track's. More useful, more bookkeeping (queue_tracks gains columns, and the persist writer's snapshots must carry it).

Whatever is chosen, resolveFallback's PreviousSource reads the same field, so check the dynamic-mix continuation still behaves.

**Report** The "Playing from ..." line under the now-playing artist/track keeps naming the first album I happened to start a song from, even after I have appended lots of unrelated tracks to the queue. It should only claim a source while the queue actually *is* that source — or it should track the current track's origin. **Findings** - `backend/queue/queue.go`: `q.source` is set by `SetQueue` (line ~248) and cleared in exactly one place (line 1224, on clear). Nothing in the add-to-queue paths touches it, so it survives arbitrary appends. - The line is rendered by `frontend/src/utils/queue-source-link.ts` from `QueueState.Source`. - It is persisted too (`persistence.go:404`), so a stale source survives a restart. **Direction** Two candidate rules, pick one deliberately: 1. **Invalidate on divergence** — any append/insert/remove that makes the queue no longer equal to what the source produced clears `q.source`. Simple, honest, and the line disappears rather than lying. 2. **Per-track provenance** — store a source per queue row and show the current track's. More useful, more bookkeeping (`queue_tracks` gains columns, and the persist writer's snapshots must carry it). Whatever is chosen, `resolveFallback`'s `PreviousSource` reads the same field, so check the dynamic-mix continuation still behaves.
yonlu was assigned by logan 2026-08-18 15:32:38 +00:00
logan closed this issue 2026-08-18 16:18:37 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#14