Skip to content

feat(playlists): drag to reorder sidebar playlists and sort the Playlists page - #1864

Merged
lklynet merged 1 commit into
mainfrom
lklynet/playlist-page-sorting
Nov 13, 2026
Merged

lklynet merged 1 commit into
mainfrom
lklynet/playlist-page-sorting

Conversation

@lklynet

@lklynet lklynet commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Playlists only showed up in the order you created them, in both the sidebar and Library > Playlists. A user asked for recently played order and sort options. Reordering the sidebar by play history would shuffle it while you listen, so the sidebar gets a stable order you set yourself, and the page gets a sort.

  • Sidebar: drag any playlist or flow row to reorder it. Keyboard works too: Space picks a row up, the arrow keys move it, Space drops it, and Enter still opens the link. The order is saved per user. New playlists go to the bottom. "Reset order" in the Playlists heading menu (hover, or right-click) clears it.
  • Library > Playlists: a sort toolbar matching Library albums: Name, Date created, Last edited, plus a direction toggle. The default is Date created, oldest first, which is today's order.
  • Last edited: static playlists now record updatedAt. It changes only when the name, description, or track list changes, so MBID enrichment, setting toggles, and re-syncs that change nothing don't count. Existing playlists start at their created date. Subsonic playlist changed now uses it too. Before, it never moved when tracks changed.

Two behavior notes:

  • Drag lists now pick up only on Space, matching dnd-kit's screen reader instructions. Enter used to work too. This applies to the queue, track lists, and quality profiles as well, and it's what lets Enter open a sidebar link.
  • The perf baseline's playlists response bytes rose from 4503 to 4737, for the new updatedAt field on each playlist. Nothing else moved.
Dragging a row Reset order Page sort on a phone
Sidebar row lifted mid-drag Playlist order menu on the sidebar heading Playlists page sorted by name at phone width

At rest, the sidebar looks the same as before.

Proof: pnpm run check and pnpm test pass. New tests cover when updatedAt changes and when it doesn't, the order endpoint keeping only playlists the user can see, the order merge, and Subsonic changed after a rename (fails on main). In a browser against Eden: pointer drag, keyboard reorder, no navigation after a drag, click and Enter still navigate, reset, page sort, phone width.

Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on high. Sol verdict: approved

Created with Opus 5.5 in Claude Code (T3 Code).

@github-actions github-actions Bot added enhancement Requested improvement or new capability. size:XL 500-999 changed lines. labels Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Preview image: ghcr.io/lklynet/aurral:pr-1864

Built from pr.1864+eadeb3e. Each push replaces it.

docker pull ghcr.io/lklynet/aurral:pr-1864

Back up your Aurral config, point your compose service at this image, then docker compose pull aurral && docker compose up -d aurral. Switch back to your usual tag when you're done.

@github-actions

Copy link
Copy Markdown
Performance: Nothing is slower than main.

50,336 tracks, 2 alternating rounds per side, lower quartiles.

main this PR change queries
app shell 3.3 ms 3.3 ms +2% 13
library home 98.1 ms 99.1 ms +1% 121
library albums 15.6 ms 16.0 ms +2% 20
library albums, last page 21.9 ms 22.3 ms +2% 20
library albums, recently added 39.2 ms 39.1 ms 0% 20
library artists 15.1 ms 15.2 ms 0% 12
library tracks 7.4 ms 7.5 ms +2% 21
library genres 1.8 ms 1.9 ms +5% 4
library genre filter 17.7 ms 17.7 ms 0% 20
library status filter 35.4 ms 35.7 ms +1% 32
library filter 19.4 ms 19.4 ms 0% 20
artist page 13.4 ms 13.3 ms -1% 57
album page 3.0 ms 3.0 ms 0% 24
favorites 36.7 ms 35.4 ms -3% 22
search 18.1 ms 17.9 ms -1% 21
discover recently added 7.5 ms 7.4 ms -1% 28
discover releases 3.1 ms 3.1 ms +1% 8
releases page 8.9 ms 8.7 ms -2% 24
discover artist 15.1 ms 14.8 ms -1% 58
discover album 1.3 ms 1.2 ms -3% 3
discover album tracks 4.1 ms 3.9 ms -3% 8
discover album editions 2.1 ms 1.9 ms -8% 4
discover search 1.2 ms 1.2 ms +3% 3
similar artists 1.5 ms 1.5 ms 0% 6
playlists 17.4 ms 17.4 ms 0% 19
activity queue 44.1 ms 38.2 ms faster (-13%) 12
listening history 1.3 ms 1.2 ms -9% 4
subsonic getArtists 18.0 ms 18.1 ms 0% 9
subsonic getAlbumList2 81.9 ms 83.3 ms +2% 43
subsonic getArtist 4.1 ms 4.2 ms +2% 15
subsonic getAlbum 2.9 ms 3.0 ms +1% 14
subsonic search3 19.5 ms 19.7 ms +1% 22
subsonic getStarred2 29.5 ms 29.2 ms -1% 15
subsonic getRandomSongs 4.3 ms 4.3 ms 0% 15
subsonic getGenres 1.4 ms 1.3 ms -2% 3
subsonic getSongsByGenre 34.8 ms 35.0 ms +1% 14
subsonic playlists 37.6 ms 38.6 ms +3% 49
album match 1.5 ms 1.5 ms +4% 4
track match 1.5 ms 1.5 ms -2% 5
artist match 1.3 ms 1.4 ms +2% 4
subsonic edit playlist 157 ms 159 ms +1% 964
server startup 973 ms 983 ms +1%
server memory at startup 172.9 MiB 173.9 MiB +1%
initial JS and CSS, gzip 283.4 KiB 284.6 KiB 0%

@lklynet
lklynet merged commit ba28b3a into main Nov 13, 2026
15 checks passed
@lklynet
lklynet deleted the lklynet/playlist-page-sorting branch November 13, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Requested improvement or new capability. size:XL 500-999 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant