Summary
Allow renaming a playlist directly from the UI. Today there's no way to edit a playlist's name — the only context-menu action available is "Pin to Sidebar".
Desired behavior
Two entry points, both should open an inline rename editor:
- Double-click the playlist title in the detail header (the large "May 26" title with "8 tracks" beneath it) → the title becomes an editable text field, like renaming a file/playlist in Finder/Apple Music. Commit on Enter, cancel on Esc.
- Right-click → "Edit playlist name" from the playlist's context menu (both in the sidebar list and the detail header). Currently this menu only offers "Pin to Sidebar".
On commit, persist the new name to Spotify and reflect it everywhere (sidebar row + detail header) optimistically.
Constraints
- Spotify only permits renaming playlists the current user owns. The rename affordance (double-click + menu item) should only be shown when
summary.ownerID == currentUserSpotifyID. Followed/other-user playlists should not show it.
- Empty / whitespace-only names should be rejected (revert to the previous name).
Relevant code
- Detail header (title + track count):
Spotiglass/Views/PlaylistBrowser/PlaylistDetailContent.swift — headerBlock (~L124-189); header context menu lives in LibraryHeaderPinningModifier (~L258-295), which already hosts the pin/unpin actions.
- Sidebar context menu:
Spotiglass/Views/PlaylistBrowser/PlaylistsSidebarSection.swift — playlistSidebarRow .contextMenu (~L96-106), currently only Pin/Unpin.
- API wrapper (needs new method):
Spotiglass/Services/SpotifyAPIClient+Playlists.swift — no rename method exists. Add updatePlaylist(playlistID:name:) using PUT /v1/playlists/{id} with a JSON body { "name": ... }, following the sendVoidWrite() pattern in SpotifyAPIClient+Library.swift (~L41-71).
- Browsing protocol:
Spotiglass/Browsing/SpotifyBrowsingAPI.swift (~L35-42) — add the rename method to the contract.
- Ownership check (already exists):
PlaylistBrowserViewModel+TrackMutations.swift userOwnedPlaylistsForMenu (~L147-155) and currentUserSpotifyID in PlaylistBrowserViewModel.swift (~L27) — reuse the ownerID == currentUserSpotifyID gate.
- Model:
SpotifyPlaylistSummary in Spotiglass/Domain/SpotifyWebAPIDomain.swift (~L12-20) carries ownerID.
Acceptance criteria
Summary
Allow renaming a playlist directly from the UI. Today there's no way to edit a playlist's name — the only context-menu action available is "Pin to Sidebar".
Desired behavior
Two entry points, both should open an inline rename editor:
On commit, persist the new name to Spotify and reflect it everywhere (sidebar row + detail header) optimistically.
Constraints
summary.ownerID == currentUserSpotifyID. Followed/other-user playlists should not show it.Relevant code
Spotiglass/Views/PlaylistBrowser/PlaylistDetailContent.swift—headerBlock(~L124-189); header context menu lives inLibraryHeaderPinningModifier(~L258-295), which already hosts the pin/unpin actions.Spotiglass/Views/PlaylistBrowser/PlaylistsSidebarSection.swift—playlistSidebarRow.contextMenu(~L96-106), currently only Pin/Unpin.Spotiglass/Services/SpotifyAPIClient+Playlists.swift— no rename method exists. AddupdatePlaylist(playlistID:name:)usingPUT /v1/playlists/{id}with a JSON body{ "name": ... }, following thesendVoidWrite()pattern inSpotifyAPIClient+Library.swift(~L41-71).Spotiglass/Browsing/SpotifyBrowsingAPI.swift(~L35-42) — add the rename method to the contract.PlaylistBrowserViewModel+TrackMutations.swiftuserOwnedPlaylistsForMenu(~L147-155) andcurrentUserSpotifyIDinPlaylistBrowserViewModel.swift(~L27) — reuse theownerID == currentUserSpotifyIDgate.SpotifyPlaylistSummaryinSpotiglass/Domain/SpotifyWebAPIDomain.swift(~L12-20) carriesownerID.Acceptance criteria