feat: create playlists from the sidebar - #370
Merged
Merged
Conversation
tsibog
force-pushed
the
pr/create-playlist-sidebar
branch
from
July 11, 2026 09:19
f80dff6 to
f75d809
Compare
…sidebar # Conflicts: # Tests/KasetTests/LibraryMutationActionsTests.swift
tsibog
force-pushed
the
pr/create-playlist-sidebar
branch
from
July 13, 2026 09:43
8234326 to
8c0c0dd
Compare
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
Contributor
Author
Happy to contribute to this great project! |
Yoddikko
pushed a commit
to Yoddikko/kasetPlus
that referenced
this pull request
Jul 16, 2026
Co-authored-by: Daniel Andersson <dandersson@evroc.com> Co-authored-by: Sertac Ozercan <sozercan@gmail.com> Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
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.
Description
Playlists can now be created from the sidebar: a "+" button reveals on hover over the Playlists section header, opens the existing create-playlist dialog, and on success pins the new playlist to the sidebar and navigates straight to it. Previously the only way to create a playlist was buried in a song's "Add to Playlist" context menu, so an empty account had no visible entry point at all. While creation is in flight the "+" is replaced by a small inline spinner.
The second commit fixes a bug this feature made prominent: deleting a playlist left its sidebar pin behind forever (
deletePlaylistnever touchedSidebarPinnedItemsManager), and the deleted playlist's page stayed open when it had been opened from the sidebar (dismiss()is a no-op there). Deletion is now optimistic — the pin and library entry disappear and navigation happens immediately on confirm; on API failure the pin is restored at its original position, the library entry comes back, and the existing error alert is shown.AI Prompt (Optional)
🤖 AI Prompt Used
AI Tool: Claude Code
Type of Change
Related Issues
None found.
Changes Made
Sidebar— custom Playlists section header with a hover-revealed "+" (spinner while creating); the section now renders even with no pinned items so the entry point always existsSongActionsHelper.presentCreatePlaylistDialog— the NSAlert create dialog previously inlined inAddToPlaylistContextMenuis extracted so both call sites share one create/broadcast/reconcile path (PlaylistCreationRequest+Resultcompletion)LibraryMutationActions.deletePlaylist— optimistic: unpins from the sidebar and broadcasts the library removal before the API call, rolls both back on failure; reconciliation unchangedSidebarPinnedItemsManager.insert(_:at:)— position-preserving restore for the rollback pathonPlaylistDeleted@Entryenvironment key — the pinned-playlist detail page navigates home after deletion instead of callingdismiss()(a no-op outside a navigation stack); nav-stack contexts keep thedismiss()fallbackTesting
swift test --skip KasetUITests)Checklist
swiftlint --strict && swiftformat .Screenshots
kaset-pr370-demo.mp4
Additional Notes
Includes the same
test:deflake commit as #363/#364 (theNotificationServiceTestsfixed-wait flake lives onmainand hits fresh branches); it disappears on rebase once any of them merges.Agent Transcript
Redacted agent session transcript (scoped to this PR)