feat: drag and drop tracks onto sidebar playlists - #363
Conversation
6c8a7a2 to
c440b97
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40e52941ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
e341b45 to
f334553
Compare
f334553 to
ecba1be
Compare
Rebased onto current main. 3-way merge integrates drag-drop features with upstream's account boundary guards, reselect navigation, and create-playlist-from-sidebar. Key merge decisions: - Sidebar: combined upstream reselect + create-playlist with drag-drop dropDestination + feedback badge. Both sides added 'client' param. - LibraryMutationActions: added AddSongOutcome + addSong() integrated with upstream's runTrackedAccountBoundaryMutation guards. addSongToPlaylist now delegates to addSong. - SearchView: combined upstream's resultRow(index:) with drag-drop's HoverObservingRow(song:) call. - Tests: added 3 new tests inside upstream's restructured test suite. - ArtistDetailView/HistoryView/TopSongsView: HoverObservingRow(song:) on top of upstream's localized string changes. - PlaylistDetailView: .songDraggable on top of upstream's changes.
Test used SongLikeStatusManager.shared; concurrent suites clearCache()/ setActiveAccountID() bump sessionGeneration, so the enqueued rating bails before rateSong. Use a fresh instance (repo convention). Also apply swiftformat (markTypes, blankLinesBetweenScopes).
6c7de4b to
9f53cb9
Compare
Description
Adds drag-and-drop of tracks onto playlists in the sidebar. Any track row (search results, history, home sections, playlist detail, etc.) can be dragged onto an owned playlist in the sidebar to add it. The target playlist highlights while dragging over it, and a brief success badge confirms the drop.
AI Prompt (Optional)
🤖 AI Prompt Used
AI Tool: Claude Code
Type of Change
Related Issues
Changes Made
Songis a drag source (via the existingTransferableconformance), attached at the shared wrappers rather than per view: playlist track rows,HoverObservingRow(search, history, artist pages, top songs), andHomeSectionItemCardsong cards (home, explore, charts, moods, new releases).dropDestination(for: Song.self, action:isTargeted:)on owned sidebar playlist rows; drops callYTMusicClient.addSongToPlaylistSongLikeStatusManager(optimistic, broadcasts so like buttons update everywhere, rollback on failure)Testing
swift test --skip KasetUITests) — 1774 passed, 148 suitesChecklist
swiftlint --strict && swiftformat .Screenshots
kaset-drag-drop-pr363.mp4
Additional Notes
View-layer only: no API or model changes. The drop path reuses the existing add-to-playlist client call (and the existing like flow for Liked Music).