Repository navigation
Reorder playlist songs and add new ones - #29
Merged
Merged
Conversation
2SikNinja
force-pushed
the
edit-playlist-songs
branch
from
November 17, 2026 09:31
ce77c11 to
46c2829
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playlists can now be rearranged and have songs added.
Reordering:
Adding songs:
Schema (migration 0009): a nullable playlist_tracks.sort_order column, and the position limit goes from 100 to 200, since positions stay as each song's fixed ID and added songs take the next one. Removing, putting back, the YouTube links and the on-page player all keep using position, and follow the new order automatically.
Migration 0009 is already applied to production and the dev branch.
Since #28 merged, songs added this way show "You added this" as their reason.
Browser tests (e2e/editing.spec.ts): dragging a song to the top with the mouse, moving one with the keyboard (waiting on each screen reader announcement), and adding a song from search, which lands at the end with "You added this". This branch also carries #32's fix to the test mock so the tests can run; merge #32 first and that commit drops out.
Testing: new service tests for adding, re-adding a removed song, refusing duplicates, a missing playlist, saving an order, and rejecting a stale order list. Checked in a local production build with mocked APIs: mouse dragging, keyboard moving with the announcements, and adding a song all work. Typecheck, lint and all 190 unit tests pass, and all 22 browser tests pass (two skipped on phones). The editing tests passed 4 times in a row.
Generated by Claude Code