Desktop: "Want track" on an album's tracklist appears to do nothing, and only shows on hover #33

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

Report

Explore → album → click the request badge on a track: nothing appears to happen. Wanting the whole album works. The track does show up in the Downloads tab, so this looks like a UI-only bug. Separately, the per-track request buttons should not be hover-revealed — they should just be there.

Findings

Root cause is almost certainly a missing re-render:

  • explore-album-details.ts:723-729 subscribes to downloadStore but the callback only assigns this.canDownload = downloadStore.available. That value does not change when a request is added, so Lit sees no state change and never re-renders.
  • The badge's status is computed at render time by libraryStatusFor(false, track.mbid) (utils/library-status.ts), which reads downloadStore.requestFor(mbid) — so the correct queued state exists in the store and is simply never re-read.
  • The album header's own "Want this" button works because it is driven by fields the component does update (downloadStore.isRequested(...) read in a path that does re-render, ~lines 2666-2715).

Hover-only styling is at ~lines 677-693: .track-row .track-request { opacity: 0 }, raised on :hover/:focus-within.

Direction

  1. In the downloadStore subscription, bump a state counter (or store the request map) so a request change re-renders the tracklist.
  2. Drop the opacity: 0 — make the badge always visible. Note the badge is a <button> only where request-mbid is passed and the entity is not owned, so always-visible does not add tab stops on owned rows.
  3. Add a regression spec: click the badge, assert it becomes queued, without a reload.
**Report** Explore → album → click the request badge on a track: nothing appears to happen. Wanting the whole album works. The track *does* show up in the Downloads tab, so this looks like a UI-only bug. Separately, the per-track request buttons should not be hover-revealed — they should just be there. **Findings** Root cause is almost certainly a missing re-render: - `explore-album-details.ts:723-729` subscribes to `downloadStore` but the callback only assigns `this.canDownload = downloadStore.available`. That value does not change when a request is added, so Lit sees no state change and never re-renders. - The badge's status is computed at render time by `libraryStatusFor(false, track.mbid)` (`utils/library-status.ts`), which reads `downloadStore.requestFor(mbid)` — so the correct `queued` state exists in the store and is simply never re-read. - The album header's own "Want this" button works because it is driven by fields the component does update (`downloadStore.isRequested(...)` read in a path that does re-render, ~lines 2666-2715). Hover-only styling is at ~lines 677-693: `.track-row .track-request { opacity: 0 }`, raised on `:hover`/`:focus-within`. **Direction** 1. In the `downloadStore` subscription, bump a state counter (or store the request map) so a request change re-renders the tracklist. 2. Drop the `opacity: 0` — make the badge always visible. Note the badge is a `<button>` only where `request-mbid` is passed and the entity is not owned, so always-visible does not add tab stops on owned rows. 3. Add a regression spec: click the badge, assert it becomes `queued`, without a reload.
logan self-assigned this 2026-08-18 15:02:05 +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#33