feat(collection): inline playlist create flow + edit-mode overhaul#14421
Merged
Conversation
Replace the create-playlist modal with an inline /create/playlist flow that reuses the existing collection edit UI. The draft lives only in the query cache (nothing hits the backend) until Apply, which publishes metadata + ordered tracks in one shot and redirects to the new playlist. Also: fix discard, description-field contrast, anchor the unsaved-changes bar, add an unsaved-changes nav guard, make suggested tracks playable, and add an owned-vs-favorited indicator in the left nav. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The /create/playlist redirect targeted /playlists/:id with the raw numeric id, but the collection route parser decodes :id via OptionalHashId.parse, so the lookup returned null params and the page rendered blank. Encode the draft id with Id.parse so the parser resolves it back to the primed draft. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14421.audius.workers.dev Unique preview for this PR (deployed from this branch). |
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.
Summary
/create/playlistflow that reuses the existing collection edit UI. The draft lives only in the TanStack Query cache — nothing is written to the backend until Apply, which publishes metadata + ordered tracks in one shot via the SDK and redirects to the new playlist's permalink.Implementation notes
/create/playlistroute generates a playlist id, primes a private draft into the cache (forceReplace;entityCacheOptionsstaleTime/gcTime Infinity keep it from being refetched), then redirects to the standard collection page which auto-enters create-edit mode.packages/web(a tan-query mutation hook) rather thanpackages/commonto avoid a publishable-package changeset.CreatePlaylistLibraryItemButton,EmptyLibraryNavLink) now navigate to the route instead of opening the modal. Mobile triggers are left on the modal — this is a desktop inline feature.Test plan
/create/playlist→ redirects into inline create-edit mode🤖 Generated with Claude Code