diff --git a/web/scripts/deck-pack-smoke.ts b/web/scripts/deck-pack-smoke.ts index a03f9a1..8184b62 100644 --- a/web/scripts/deck-pack-smoke.ts +++ b/web/scripts/deck-pack-smoke.ts @@ -15,7 +15,7 @@ * * The PERFORMANCE decoration runs on every download of a deck that has one, * and it rewrites the archive — so a mistake there breaks the pack itself, - * not just the performance. It must add both forms, leave the modules alone, + * not just the performance. It must add the table, leave the modules alone, * and refuse to fail loudly: a broken attachment may cost its own file and * nothing else. */ @@ -146,13 +146,10 @@ const names = Object.keys(decorated).sort(); check("the modules survive untouched", names.includes("wave_saw.pfm"), true); check("so does the running order", names.includes("catalog.txt"), true); -check("the editable source is added", names.includes("performance.json"), true); check("the packed table is added, named from the id", names.includes("sunset_set.pfs"), true); -check( - "performance.json is stored verbatim", - new TextDecoder().decode(decorated["performance.json"]), - performanceJson, -); +// The Director opens and saves .pfs, so the table IS the document — a JSON +// beside it would be a file nothing opens. +check("no JSON rides along", names.includes("performance.json"), false); // The .pfs is what the panel plays, so it has to be a table, not bytes that // merely exist — decode it back and check the timeline survived the trip. diff --git a/web/src/app/api/community/decks/[id]/route.ts b/web/src/app/api/community/decks/[id]/route.ts index d2fb1bd..bdb7859 100644 --- a/web/src/app/api/community/decks/[id]/route.ts +++ b/web/src/app/api/community/decks/[id]/route.ts @@ -138,9 +138,9 @@ async function handlePatch(request: Request, context: { params: Promise<{ id: st // Optional attached performance (Director timeline). null detaches; a // string is validated against the same limits the device's .pfs player - // enforces, and stored in canonical form so the pack's performance.json - // is stable across re-serializations. Serve-time zip decoration means no - // rebuild is queued either way. + // enforces, and stored canonically so the table the pack ships is stable + // across re-serializations. Serve-time zip decoration means no rebuild is + // queued either way. let performanceJson: string | null | undefined; if (raw.performanceJson !== undefined) { if (raw.performanceJson === null || raw.performanceJson === "") { diff --git a/web/src/app/community/d/[id]/DeckDetailClient.tsx b/web/src/app/community/d/[id]/DeckDetailClient.tsx index fb6e6f3..affd0c4 100644 --- a/web/src/app/community/d/[id]/DeckDetailClient.tsx +++ b/web/src/app/community/d/[id]/DeckDetailClient.tsx @@ -438,7 +438,7 @@ export default function DeckDetailClient({