Skip to content

web: remove tracks from a playlist#20

Merged
vynulldev merged 1 commit into
mainfrom
playlist-remove
Jul 19, 2026
Merged

web: remove tracks from a playlist#20
vynulldev merged 1 commit into
mainfrom
playlist-remove

Conversation

@vynulldev

Copy link
Copy Markdown
Owner

What & why

There was no way to take a track out of a playlist from the web UI: removePlaylistTrack existed but nothing called it, dragging a row only reorders, and the bulk DELETE removes the track from the entire library.

This adds the two missing affordances, both scoped to regular playlist views: a per-row x button that drops that track from the playlist, and a bulk-bar "- PLAYLIST" button that drops the whole selection in one update. Smart playlists are excluded since membership is rule-driven, and Collection and History have no membership to edit.

The per-row handler resolves the playlist index by track ID rather than visible row index, so an active search filter or column sort cannot misalign the removal. The bulk path deselects only the removed tracks so a selection spanning other sources survives, and postPlaylistTrackIDs now reports success so the toast only fires when the update actually landed. Library rows, tags, cues, and other playlists are untouched by either path.

Verified headlessly end to end with Playwright: per-row removal under an active BPM sort takes out the right track, bulk removal empties the playlist and leaves the collection intact, the removed track stays in the library, and neither affordance renders in Collection or smart-playlist views; no console errors.

Hardware testing

  • Tested on: N/A: no deck-facing change. Web UI only; playlist membership updates go through the existing set-tracks API, which is unchanged.

Checklist

  • go build ./..., go vet ./..., and go test ./... pass
  • gofmt -l . is clean
  • New source files carry an SPDX header (GPL-3.0-or-later) (n/a, no new files)
  • Tested on real hardware (deck + firmware noted above), or this change doesn't affect deck behaviour
  • I agree my contribution is licensed under the project's GPLv3

There was no way to take a track out of a playlist from the web UI:
removePlaylistTrack existed but nothing called it, dragging a row only
reorders, and the bulk DELETE removes tracks from the whole library.
Add the two missing affordances, both scoped to regular playlist views
(smart playlists are rule-driven, and Collection and History have no
membership to edit): a per-row x button that drops that track from the
playlist, and a bulk-bar "- PLAYLIST" button that drops the whole
selection in one update.

The per-row handler resolves the playlist index by track ID rather
than row index, so an active search filter or column sort cannot
misalign the removal. The bulk path deselects only the removed tracks,
so a selection spanning other sources survives, and
postPlaylistTrackIDs now reports success so the toast only fires when
the update actually landed. Library rows, tags, cues, and other
playlists are untouched by either path.

Verified headlessly end to end: per-row removal under an active BPM
sort takes out the right track, bulk removal empties the playlist and
leaves the collection intact, and neither affordance renders in
Collection or smart-playlist views; no console errors.
@vynulldev
vynulldev merged commit 7f9badc into main Jul 19, 2026
1 check passed
@vynulldev
vynulldev deleted the playlist-remove branch July 19, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant