feat: playlist cover artwork #117

Merged
joshuafhiggins merged 1 commits from t3/playlist-cover-artwork into main 2026-11-19 18:21:43 -05:00
Owner

Playlists had no artwork: every playlist showed the placeholder.

What changed

  • Automatic covers. A playlist shows its first 4 distinct albums with artwork as a 2x2, or a single album when it has fewer. It only redraws when adding, removing or reordering songs changes those albums. migrations:migratePlaylists (run from the entrypoint) draws covers for existing playlists.
  • Stored, not rendered per request. Covers are drawn once by a Convex node action into storage, and the web route just serves that image. The summary's cover is now the storage id, and clients put it in the URL (?v=), so caches never go stale. Drawing is pure JS (jpeg-js) because self-hosted Convex can't install native packages like sharp (its deploy runs npm install and the image has no npm).
  • Picker on web. The dialog opens from a pencil on the cover and from "Change Cover" in the menu. It shows the current cover, a separator, then 4 random grids, with Shuffle and Upload Image.
  • Picker on mobile. A full-screen editor opens from "Change Cover" in the menu. It has a large preview, the same current/options row, and Save in the header.
  • Uploads are cropped square on the client and stored; replaced covers are deleted from storage.
  • Sidebars. The web sidebar shows each playlist's cover instead of the list icon. The iPad sidebar (native/TabletSidebar.swift) gets a row per playlist with its cover; tapping a row opens it in the All Playlists stack.

Testing

  • Web and Android: tested against a locally built Docker image with a real library: automatic covers, picking, reshuffling, uploading, cleanup of replaced covers, and the web sidebar.
  • iPad sidebar: not built or tested yet. The new Swift (playlist rows plus a delegate proxy that catches row taps) needs a run on an iPad simulator before merge.

Made by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

Playlists had no artwork: every playlist showed the placeholder. ## What changed - **Automatic covers.** A playlist shows its first 4 distinct albums with artwork as a 2x2, or a single album when it has fewer. It only redraws when adding, removing or reordering songs changes those albums. `migrations:migratePlaylists` (run from the entrypoint) draws covers for existing playlists. - **Stored, not rendered per request.** Covers are drawn once by a Convex node action into storage, and the web route just serves that image. The summary's `cover` is now the storage id, and clients put it in the URL (`?v=`), so caches never go stale. Drawing is pure JS (`jpeg-js`) because self-hosted Convex can't install native packages like sharp (its deploy runs `npm install` and the image has no npm). - **Picker on web.** The dialog opens from a pencil on the cover and from "Change Cover" in the menu. It shows the current cover, a separator, then 4 random grids, with Shuffle and Upload Image. - **Picker on mobile.** A full-screen editor opens from "Change Cover" in the menu. It has a large preview, the same current/options row, and Save in the header. - **Uploads** are cropped square on the client and stored; replaced covers are deleted from storage. - **Sidebars.** The web sidebar shows each playlist's cover instead of the list icon. The iPad sidebar (`native/TabletSidebar.swift`) gets a row per playlist with its cover; tapping a row opens it in the All Playlists stack. ## Testing - **Web and Android:** tested against a locally built Docker image with a real library: automatic covers, picking, reshuffling, uploading, cleanup of replaced covers, and the web sidebar. - **iPad sidebar:** **not built or tested yet**. The new Swift (playlist rows plus a delegate proxy that catches row taps) needs a run on an iPad simulator before merge. --- Made by Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, running in T3 Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
joshuafhiggins force-pushed t3/playlist-cover-artwork from 886c8f0643 to 140dddc383 2026-11-19 18:02:13 -05:00 Compare
joshuafhiggins added 1 commit 2026-11-19 18:19:16 -05:00
Playlists draw a 2x2 of their first albums automatically. Owners can pick
from random grids, reshuffle, or upload an image on web and mobile.
Covers are rendered once into Convex storage and redrawn only when the
playlist's albums change. Web and iPad sidebars show playlist covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
joshuafhiggins force-pushed t3/playlist-cover-artwork from 140dddc383 to 86235a11c4 2026-11-19 18:19:16 -05:00 Compare
joshuafhiggins merged commit 4d50a49920 into main 2026-11-19 18:21:43 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joshuafhiggins/otunes#117