From a79a38a22a6145c475f50eeadb79b451aee31c11 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Wed, 16 Sep 2026 10:21:58 +0200 Subject: docs: playlists — storage split, queue ops, and the UI design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 256 KB cap contradicted its own worked example; entries were also missing `size`/`name`, without which a stored track cannot be fetched at all. Storage becomes a manifest plus one blob per playlist, compressed, so starring a track no longer rewrites the collection. Adds the UI pass that was missing: the queue verbs, the menus, and the one real code change behind them — the player's queue can today only be replaced, not appended to. Co-Authored-By: Claude Opus 5 --- docs/playlists.md | 1096 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 801 insertions(+), 295 deletions(-) (limited to 'docs/playlists.md') diff --git a/docs/playlists.md b/docs/playlists.md index 485011a..ecbbac4 100644 --- a/docs/playlists.md +++ b/docs/playlists.md @@ -1,23 +1,22 @@ # MeshBay — Playlists (design) > Status: **proposal**, not implemented. This was deferred out of the Music -> application's design, -> which deferred it for the right reason: *"a genuinely new category of -> per-account node state, not covered by anything E9 already enumerates — -> needs its own design pass (ownership, sync across devices, whether it's -> node-local or something else)"*. This document is that pass. +> application's design, which deferred it for the right reason: *"a genuinely +> new category of per-account node state, not covered by anything E9 already +> enumerates — needs its own design pass (ownership, sync across devices, +> whether it's node-local or something else)"*. This document is that pass. > > Read `MESHBAY_DESIGN.md` §9.8 first — Music is built, and this adds nothing -> to its playback path. Read §9.11 second: the -> cross-group consolidation this feature needs already exists there, and -> most of the work is recognising that. +> to its playback *path*. Read §9.11 second: the cross-group consolidation +> this feature needs already exists there, and most of the work is +> recognising that. > > **Scope, settled before writing this:** a playlist belongs to **one > account** and is never shared with other group members. That answer is what -> keeps §5 small; see §10 for what changes if it is ever reversed. +> keeps §6 small; see §13 for what changes if it is ever reversed. > -> Follows the project convention: every claim names the adversary it holds -> against (§9). +> Follows the project convention: every claim names the adversary or the +> failure it holds against (§12). --- @@ -28,36 +27,64 @@ turn up on that person's other devices — and so that one playlist may hold albums from **several different groups on several different nodes**, the way the Search page already searches a consolidated view. With the constraint, stated up front, that nodes go offline for an evening or for a month and that -this must not corrupt anything. +this must not corrupt anything. And — added after the first draft, and now +half of this document — **a user interface**: the queue verbs (play, play +next, enqueue) that a music player is expected to have, a way to build a +playlist from what is on screen, a way to manage playlists from one button, +and none of it breaking the album auto-advance and prefetch that already +work. + +## 0.1 What changed from the first draft, and why + +The first draft answered the storage question and stopped. Three things in it +were wrong or missing, and they are corrected here rather than patched: + +| | First draft | Now | § | +|---|---|---|---| +| Size | one blob for everything, capped at 256 KB | **manifest + one blob per playlist**, compressed, stored as a BLOB; caps per unit | §4, §5 | +| The stored track reference | "takes it unchanged" into `onPlayQueue` | **it does not** — `size` and `name` are missing and both are required to fetch a track at all | §5.3 | +| UI | one route `/playlists` and a sidebar entry | **dropped.** A menu in Music's sticky toolbar, which Search → Music inherits for free | §9, §13 O7 | + +The 256 KB figure contradicted its own worked example: the draft estimated +1 000 tracks at ~200 bytes as "~200 KB", against a cap applied to `blob_enc`, +which was a **base64 TEXT** column — so its own example was already ~267 KB on +the wire, over a cap it declared generous. §4 redoes the arithmetic with the +fields that actually have to be there. --- ## 1. What this design does not reopen -- **Views over the index, never a catalogue** (`MESHBAY_DESIGN.md` §6.5, §9.1, - draft-v6 §2.7). A playlist is a list of *references*; it creates no second - identity for a file and no server-side database of content. -- **Nothing about content reaches the hub** (H7, draft-v6 §2.5). §3.1. -- **No new streaming path.** `MESHBAY_DESIGN.md` §9.8 stands untouched: a track is - fetched through `pipelinedDownload` and handed to `