Skip to content

Enable playlist tree drag and drop - #19

Merged
claw1200 merged 5 commits into
mainfrom
playlist-tree-dnd
Oct 29, 2026
Merged

claw1200 merged 5 commits into
mainfrom
playlist-tree-dnd

Conversation

@claw1200

Copy link
Copy Markdown
Owner

Enable dragging playlists and folders in the sidebar to reorder siblings or move items into folders. The app routes moves through the native library service; the SDK transaction validates folder targets and cycles, updates sibling sequence values, and keeps masterPlaylists6.xml in sync.

The SDK implementation is in claw1200/es-rekordbox-sdk#4, which must merge before this PR can build against the updated submodule pointer.

Validation: app production build, app typecheck, SDK tests, native service test, and N-API compile pass. npm run lint still reports two existing errors in app/tests/media.test.mjs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Root playlist reordering uses indices that conflict with the SDK’s inclusion of the hidden cloud-sync playlist, producing incorrect ordering, and neither reordering nor reparenting has a keyboard-operable alternative.

2 open issues
What changed in this PR

Adds sidebar drag-and-drop for reordering playlists and folders or moving them into folders, routing changes through the native library service to the linked SDK transaction.

Changes:

  • Adds draggable tree rows, drop-target positioning, and visual feedback.
  • Wires playlist.treeMove through the renderer, IPC, and native layers.
  • Adds a native service test confirming that moves return the refreshed tree.
File Description
native/​crates/​es-node/​src/​library.rs Exposes and dispatches the native tree-move operation.
native/​crates/​es-engine/​src/​library.rs Calls the SDK transaction and tests tree refresh.
app/​src/​renderer/​src/​lib/​library.svelte.ts Defines the drag type and applies refreshed playlists after moves.
app/​src/​renderer/​src/​lib/​components/​Sidebar.svelte Implements tree dragging, drop positioning, and indicators.
app/​src/​renderer/​src/​lib/​api.ts Adds the renderer tree-move API call.
app/​src/​preload/​engine.ts Defines tree-move command parameters.
app/​src/​main/​library.ts Routes the command to the native library.
app/​src/​main/​audio/​native.ts Declares the native tree-move interface.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Playlist reordering can leave items unmoved because hidden siblings skew indices, while tree dragging also lacks collapsed-folder expansion and keyboard-accessible alternatives.

3 open issues

Review effort: Balanced

@claw1200
claw1200 merged commit 18f7836 into main Oct 29, 2026
3 checks passed
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.

2 participants