Skip to content

feat(web): add duplicate playlist flow under the New nav button#14319

Open
dylanjeffers wants to merge 1 commit into
claude/trusting-antonelli-0dc3ccfrom
claude/duplicate-playlist-modal
Open

feat(web): add duplicate playlist flow under the New nav button#14319
dylanjeffers wants to merge 1 commit into
claude/trusting-antonelli-0dc3ccfrom
claude/duplicate-playlist-modal

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

Adds a Duplicate Playlist secondary action to the sidebar's + (New) popup menu. Users paste any public Audius playlist URL, see a preview of the source (title, description, cover art), and toggle per-field switches to choose what to customize in the copy. The duplicated playlist is created as private by default.

Stacks on top of #14318 (Create Playlist modal) — review/merge that first.

Scope:

  • Metadata-only duplication for v1: title, description, artwork. Tracks are not copied in this PR — a follow-up will support full duplicate including track contents. The modal surfaces this with a helper line so users know to add tracks themselves.
  • When the user keeps the source artwork, we pass the source's cover_art_sizes CID through to the existing createPlaylist saga so it reuses the cover instead of treating it as a new upload. No content node re-upload required.

Implementation

  • New DuplicatePlaylistModal Redux modal slice (via existing createModal helper) registered in modals types/reducers/parent state.
  • New DuplicatePlaylistModal component using Harmony Modal + TextInput + Switch + TextArea + Artwork + the existing UploadArtwork.
  • URL paste resolves through getPathFromPlaylistUrluseCollectionByPermalink to load the source collection.
  • Wires "Duplicate Playlist" into CreatePlaylistLibraryItemButton between Create Playlist and Create Folder.

Test plan

  • Sign in to the web app
  • Left nav → +Duplicate Playlist
  • Paste a malformed URL → see inline "Enter a valid Audius playlist URL"
  • Paste a valid Audius playlist URL → preview card appears with the source title, description, and artwork
  • Submit with all three switches off → new playlist created with <Source Title> (Copy), the source description, and the source cover art reused (no re-upload)
  • Toggle "Customize title" → enter a custom name → that name wins
  • Toggle "Customize description" → enter a custom description → that description wins
  • Toggle "Customize artwork" → upload a new image → custom image wins
  • Resulting playlist is private (Hidden) and the user is routed to its edit page
  • The "tracks not copied" note is visible in the modal

Follow-ups

  • Copy tracks from source to the duplicated playlist (probably via a new duplicatePlaylist action + saga that chains createPlaylist then addTrackToPlaylist per track).
  • Paste-tracks-by-URL on the edit page (separate PR), which pairs naturally with this once track copy lands.

🤖 Generated with Claude Code

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: 74f3c41

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Adds a "Duplicate Playlist" secondary action to the sidebar's New (+)
popup menu. Opens a modal where the user pastes any public Audius
playlist URL, sees a preview of the source playlist (title, description,
cover art), and toggles per-field switches to customize what should
differ in the copy. The duplicated playlist is created as private by
default (enforced by the existing optimisticallySavePlaylist saga).

Scope:
- Metadata-only duplication for now. Tracks are not copied — a follow-up
  PR will support full duplicate including track contents. The modal
  surfaces this with a helper line so users know they need to add tracks
  separately.
- Reuses the existing createPlaylist saga: when artwork is not
  customized, we pass the source playlist's cover_art_sizes CID through
  so the saga reuses the cover instead of treating it as a new upload.

Implementation:
- New `DuplicatePlaylistModal` Redux modal slice (createModal helper).
- New `DuplicatePlaylistModal` component (Harmony Modal + TextInput +
  Switch + TextArea + Artwork + UploadArtwork).
- Resolves pasted URL → permalink via `getPathFromPlaylistUrl`, then
  loads the source via `useCollectionByPermalink`.
- Wires "Duplicate Playlist" into `CreatePlaylistLibraryItemButton`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dylanjeffers dylanjeffers force-pushed the claude/duplicate-playlist-modal branch from e4e9fe5 to 74f3c41 Compare May 15, 2026 18:10
@github-actions
Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14319.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant