Date: 2026-06-08
I would like the option of moving a video in one playlist to a different playlist (while maintaining the guarantee that a video will be in at most one playlist). what would you recommend to support this action in the UI?
Added a "Move to…" entry to the ⋯ more menu in the playlist detail view (single-playlist view). Clicking it expands an inline sub-list of the other five playlists; selecting one atomically removes the video from the current playlist and appends it to the target.
popup/popup.js
moveSubmenuOpenFor: null state (tracks which video's move submenu is open by menuId key)otherPlaylists: [] state (array of {name, display} objects for the other playlists)updateCurrentPlaylistVideos() to recompute otherPlaylists using formatPlaylistName() for display labelsasync moveVideoToPlaylist(fromPlaylistName, videoIndex, toPlaylistName) — splices video from source array, appends to target, single storage.set call (preserves video object including status)closeAllMenus() and toggleMenu() to reset moveSubmenuOpenFormoveToSubmenuButton (toggle), moveToSubmenu (x-show), moveToPlaylistButton (execute move)popup/popup.html
x-for="pl in otherPlaylists" with x-text="pl.display" and data-to-playlist-name="pl.name"popup/popup.css
.move-to-playlist-item, .move-to-submenu (separator border), and .move-to-playlist-option (indented, blue text with hover)moveVideoToPlaylist splices from the source before appending to the target in a single atomic storage write — no window where the video exists in two playlistsotherPlaylists is pre-computed with formatted display names so x-text="pl.display" needs no method call in the template