The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Placeholder results: every studio opens the connect card, and results say "Placeholder"
Adarsh971893e9324a
diff --git a/bin/lib/commands.mjs b/bin/lib/commands.mjsindex c02b9193..ad446b31 100644--- a/bin/lib/commands.mjs+++ b/bin/lib/commands.mjs@@ -373,7 +373,7 @@ async function status(ctx) {.filter((p) => p.label).map((p) => `${p.label} ${p.configured ? "✓" : "–"}`);ctx.print(`Fuobe at ${t.url}${t.urlFrom === "default" ? "" : ` (from ${t.urlFrom})`}`);- ctx.print(`Engine mode: ${s.engineMode} · Demo mode: ${s.demoMode} · Preferred cloud: ${s.cloudProvider}`);+ ctx.print(`Engine mode: ${s.engineMode} · Placeholder results: ${s.demoMode === "on" ? "on" : "off"} · Preferred cloud: ${s.cloudProvider}`);ctx.print(`Providers: ${providers.join(", ")}`);// Older servers don't say which local model server they use.const local = s.llm?.local;diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 43a60afa..0e266c13 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -28,7 +28,9 @@ Composer / studio (React) ──POST /api/generations (or a studio route that buchooseRoute() among the routes still on (offeredRoutes()): first configured provider for that operation, preferring one that carries│ every LoRA and makes the clip length asked (Preferred provider sets│ fal/Replicate order otherwise; "llm" for text steps), else the demo- │ provider (Settings → Placeholder results; request.demo, a skill's free dry run, forces it)+ │ provider (Settings → Placeholder results; request.demo, a skill's free dry run, forces it).+ │ With neither, ConnectComfyError: every studio's route answers the owner's browser with+ │ the connect card's 422 (src/server/connect-refusal.ts), never a 500 or a toastfitLoras() src/lib/catalog/loras.ts: LoRAs a cloud run can't carry are left out, with notes│ (a recipe LoRA the model always loads, left out or switched off, refuses the run instead)▼diff --git a/src/app/api/audio-tools/route.ts b/src/app/api/audio-tools/route.tsindex c499765b..1ebfafd1 100644--- a/src/app/api/audio-tools/route.ts+++ b/src/app/api/audio-tools/route.ts@@ -1,4 +1,6 @@import { AudioToolBody, AudioToolError, previewAudioTool, runAudioTool } from "@/server/audio-tools";+import { connectRefusal } from "@/server/connect-refusal";+import { ConnectComfyError } from "@/server/generations";import { priceAs } from "@/server/visitor";/** What a field that doesn't check out means, in words the page shows. */@@ -20,11 +22,14 @@ async function post(request: Request) {const msg = path.startsWith("clips") ? "Add 2 to 10 audio clips to join" : remux && path === "audio" ? "Export the mix first" : (MESSAGES[path] ?? "Check the settings");return Response.json({ error: msg }, { status: 400 });}+ const preview = new URL(request.url).searchParams.get("preview") === "1";try {- if (new URL(request.url).searchParams.get("preview") === "1") return Response.json(await previewAudioTool(parsed.data));+ if (preview) return Response.json(await previewAudioTool(parsed.data));return Response.json(await runAudioTool(parsed.data), { status: 201 });} catch (e) {if (e instanceof AudioToolError) return Response.json({ error: e.message }, { status: 422 });+ // Nothing connected runs it: the connect card in the owner's browser (a price check just says so).+ if (e instanceof ConnectComfyError) return connectRefusal(e, request, preview) ?? Response.json({ error: e.message }, { status: 422 });console.error("[audio-tools]", e);return Response.json({ error: (e as Error).message || "Something went wrong" }, { status: 500 });}diff --git a/src/app/api/canvases/route.ts b/src/app/api/canvases/route.tsindex a6c37953..8507f4b4 100644--- a/src/app/api/canvases/route.ts+++ b/src/app/api/canvases/route.ts@@ -1,6 +1,7 @@import { connection } from "next/server";import { z } from "zod";import { createCanvas, listCanvases, parseGraph, parsePages } from "@/server/canvas";+import { refusedRun } from "@/server/connect-refusal";const Body = z.object({name: z.string().max(80).optional(),@@ -25,6 +26,6 @@ export async function POST(request: Request) {try {return Response.json(createCanvas({ ...rest, graph, pages }), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/cinema/projects/[id]/director/route.ts b/src/app/api/cinema/projects/[id]/director/route.tsindex c80c7118..a406359a 100644--- a/src/app/api/cinema/projects/[id]/director/route.ts+++ b/src/app/api/cinema/projects/[id]/director/route.ts@@ -20,13 +20,13 @@ export async function POST(request: Request, ctx: RouteContext<"/api/cinema/proj// An LLM call can outlive a closed tab; keep it running so the answer is saved.after(() => reply.catch(() => {}));return Response.json({ messages: await reply });- });+ }, request);}-export async function DELETE(_req: Request, ctx: RouteContext<"/api/cinema/projects/[id]/director">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/cinema/projects/[id]/director">) {return handle(async () => {const { id } = await ctx.params;clearChat(id);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/cinema/projects/[id]/folders/[folderId]/route.ts b/src/app/api/cinema/projects/[id]/folders/[folderId]/route.tsindex b28ef54f..8445ca5d 100644--- a/src/app/api/cinema/projects/[id]/folders/[folderId]/route.ts+++ b/src/app/api/cinema/projects/[id]/folders/[folderId]/route.ts@@ -6,14 +6,14 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/cinema/proconst { id, folderId } = await ctx.params;const patch = await body(request, FolderPatch, "Those folder settings aren't valid");return Response.json(updateFolder(id, folderId, patch));- });+ }, request);}/** Its takes and subfolders move up to the parent folder. */-export async function DELETE(_req: Request, ctx: RouteContext<"/api/cinema/projects/[id]/folders/[folderId]">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/cinema/projects/[id]/folders/[folderId]">) {return handle(async () => {const { id, folderId } = await ctx.params;deleteFolder(id, folderId);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/cinema/projects/[id]/folders/route.ts b/src/app/api/cinema/projects/[id]/folders/route.tsindex 6347527c..ad0c00c4 100644--- a/src/app/api/cinema/projects/[id]/folders/route.ts+++ b/src/app/api/cinema/projects/[id]/folders/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/cinema/projconst { id } = await ctx.params;const input = await body(request, FolderCreate, "Give the folder a name");return Response.json(createFolder(id, input), { status: 201 });- });+ }, request);}diff --git a/src/app/api/cinema/projects/[id]/generate/route.ts b/src/app/api/cinema/projects/[id]/generate/route.tsindex aa618ca6..827180d3 100644--- a/src/app/api/cinema/projects/[id]/generate/route.ts+++ b/src/app/api/cinema/projects/[id]/generate/route.ts@@ -10,5 +10,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/cinema/projconst { id } = await ctx.params;const b = await body(request, GenerateBody, "That request isn't valid");return Response.json(generateInProject(id, b.input, b.folderId ?? null), { status: 201 });- });+ }, request);}diff --git a/src/app/api/cinema/projects/[id]/items/[generationId]/retry/route.ts b/src/app/api/cinema/projects/[id]/items/[generationId]/retry/route.tsindex a32f81a8..6f13903f 100644--- a/src/app/api/cinema/projects/[id]/items/[generationId]/retry/route.ts+++ b/src/app/api/cinema/projects/[id]/items/[generationId]/retry/route.ts@@ -2,9 +2,9 @@ import { retryItem } from "@/server/cinema";import { handle } from "@/server/cinema-schemas";/** Run a failed take again (same request, same folder). */-export async function POST(_req: Request, ctx: RouteContext<"/api/cinema/projects/[id]/items/[generationId]/retry">) {+export async function POST(request: Request, ctx: RouteContext<"/api/cinema/projects/[id]/items/[generationId]/retry">) {return handle(async () => {const { id, generationId } = await ctx.params;return Response.json({ items: retryItem(id, generationId) }, { status: 201 });- });+ }, request);}diff --git a/src/app/api/cinema/projects/[id]/items/route.ts b/src/app/api/cinema/projects/[id]/items/route.tsindex 231293cf..8316aacd 100644--- a/src/app/api/cinema/projects/[id]/items/route.ts+++ b/src/app/api/cinema/projects/[id]/items/route.ts@@ -32,7 +32,7 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/cinema/proconst moved = b.folderId !== undefined ? moveItems(id, b.ids, b.folderId) : 0;const liked = b.favorite !== undefined ? setFavorites(id, b.ids, b.favorite) : 0;return Response.json({ ok: true, moved, liked });- });+ }, request);}/** Bulk: take out of the project; `deleteGenerations` moves them to the library's Trash (restorable, still filed here). Only this project's takes are touched. */@@ -41,5 +41,5 @@ export async function DELETE(request: Request, ctx: RouteContext<"/api/cinema/prconst { id } = await ctx.params;const b = await body(request, ItemsDelete, "Pick the takes to delete");return Response.json({ removed: removeItems(id, b.ids, { deleteGenerations: b.deleteGenerations }) });- });+ }, request);}diff --git a/src/app/api/cinema/projects/[id]/route.ts b/src/app/api/cinema/projects/[id]/route.tsindex a364cea8..19b58e12 100644--- a/src/app/api/cinema/projects/[id]/route.ts+++ b/src/app/api/cinema/projects/[id]/route.ts@@ -20,13 +20,13 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/cinema/proconst { id } = await ctx.params;const patch = await body(request, ProjectPatch, "Those project settings aren't valid");return Response.json(updateProject(id, patch));- });+ }, request);}-export async function DELETE(_req: Request, ctx: RouteContext<"/api/cinema/projects/[id]">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/cinema/projects/[id]">) {return handle(async () => {const { id } = await ctx.params;deleteProject(id);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/cinema/projects/route.ts b/src/app/api/cinema/projects/route.tsindex 051abb94..eccf931e 100644--- a/src/app/api/cinema/projects/route.ts+++ b/src/app/api/cinema/projects/route.ts@@ -11,5 +11,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, ProjectCreate, "Give the project a name");return Response.json(createProject(input), { status: 201 });- });+ }, request);}diff --git a/src/app/api/content-factory/series/[id]/episodes/route.ts b/src/app/api/content-factory/series/[id]/episodes/route.tsindex 546fc6d9..ca852c22 100644--- a/src/app/api/content-factory/series/[id]/episodes/route.ts+++ b/src/app/api/content-factory/series/[id]/episodes/route.ts@@ -14,5 +14,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/content-facreturn handle(async () => {const { id } = await ctx.params;return Response.json(await addEpisodes(id, await body(request, More, "Say how many episodes to add")));- });+ }, request);}diff --git a/src/app/api/content-factory/series/[id]/generate/route.ts b/src/app/api/content-factory/series/[id]/generate/route.tsindex e6d0e8db..2d7dc49c 100644--- a/src/app/api/content-factory/series/[id]/generate/route.ts+++ b/src/app/api/content-factory/series/[id]/generate/route.ts@@ -9,5 +9,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/content-facreturn handle(async () => {const { id } = await ctx.params;return Response.json(await generateSeries(id, await body(request, Generate, "Say what the video is about and pick the settings")));- });+ }, request);}diff --git a/src/app/api/content-factory/series/[id]/read/route.ts b/src/app/api/content-factory/series/[id]/read/route.tsindex 17132b58..9ee72ad2 100644--- a/src/app/api/content-factory/series/[id]/read/route.ts+++ b/src/app/api/content-factory/series/[id]/read/route.ts@@ -9,5 +9,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/content-facreturn handle(async () => {const { id } = await ctx.params;return Response.json(await rereadSeries(id, (await body(request, Read, "Pick an engine")).engine));- });+ }, request);}diff --git a/src/app/api/content-factory/series/[id]/route.ts b/src/app/api/content-factory/series/[id]/route.tsindex 2f57b7ed..877e73b7 100644--- a/src/app/api/content-factory/series/[id]/route.ts+++ b/src/app/api/content-factory/series/[id]/route.ts@@ -16,7 +16,7 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/content-fareturn handle(async () => {const { id } = await ctx.params;return Response.json(updateSeries(id, await body(request, Patch, "That brief isn't valid")));- });+ }, request);}/**@@ -27,5 +27,5 @@ export async function DELETE(request: Request, ctx: RouteContext<"/api/content-freturn handle(async () => {await deleteSeries((await ctx.params).id, { draftOnly: new URL(request.url).searchParams.get("draft") === "1" });return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/content-factory/series/route.ts b/src/app/api/content-factory/series/route.tsindex 198cf1d2..0de5ba4b 100644--- a/src/app/api/content-factory/series/route.ts+++ b/src/app/api/content-factory/series/route.ts@@ -23,5 +23,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, Create, "Add a reference clip, a link or a preset");return Response.json(await createSeries(input), { status: 201 });- });+ }, request);}diff --git a/src/app/api/dub/route.ts b/src/app/api/dub/route.tsindex cc2fd354..1590d5da 100644--- a/src/app/api/dub/route.ts+++ b/src/app/api/dub/route.ts@@ -2,6 +2,7 @@ import { connection } from "next/server";import { z } from "zod";import { ONE_SHOT_MODELS } from "@/lib/av/dub";import { createDubSession, listDubSessions, previewDub } from "@/server/dub";+import { connectRefusal } from "@/server/connect-refusal";import { priceAs } from "@/server/visitor";const Body = z.object({@@ -31,11 +32,13 @@ async function post(request: Request) {const msg = first?.path[0] === "video" ? "Add the video to translate" : first?.path[0] === "targets" ? "Pick up to 8 languages to dub into" : "Check the dub settings";return Response.json({ error: msg }, { status: 400 });}+ const preview = new URL(request.url).searchParams.get("preview") === "1";try {- if (new URL(request.url).searchParams.get("preview") === "1") return Response.json(previewDub(parsed.data));+ if (preview) return Response.json(previewDub(parsed.data));return Response.json(createDubSession(parsed.data), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ // Nothing connected runs it: the connect card in the owner's browser (never on a price check).+ return connectRefusal(e, request, preview) ?? Response.json({ error: (e as Error).message }, { status: 422 });}}diff --git a/src/app/api/evolution/direction/route.ts b/src/app/api/evolution/direction/route.tsindex 72ad5c17..585c1592 100644--- a/src/app/api/evolution/direction/route.ts+++ b/src/app/api/evolution/direction/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, DirectionSchema, "Pick how much should change, then add references or a few words");return Response.json(await writeDirection(input));- });+ }, request);}diff --git a/src/app/api/evolution/route.ts b/src/app/api/evolution/route.tsindex b6911fbe..5514ffb7 100644--- a/src/app/api/evolution/route.ts+++ b/src/app/api/evolution/route.ts@@ -8,5 +8,5 @@ export async function POST(request: Request) {// A repeated requestId (a second click on Evolve) gets the run the first one started.const result = await once("evolution", input.requestId, () => createEvolution(input));return Response.json(result, { status: 201 });- });+ }, request);}diff --git a/src/app/api/explainer/document/route.ts b/src/app/api/explainer/document/route.tsindex acb7e437..261a728b 100644--- a/src/app/api/explainer/document/route.ts+++ b/src/app/api/explainer/document/route.ts@@ -17,5 +17,5 @@ export async function POST(request: Request) {if (file.size > MAX_DOCUMENT_BYTES) throw new FacelessError(`${file.name} is over ${MAX_DOCUMENT_BYTES / 1024 / 1024} MB — add the part that matters, or paste its text into the prompt`, 413);const engine = EngineSchema.safeParse(form?.get("engine"));return Response.json(await readDocument({ name: file.name, data: Buffer.from(await file.arrayBuffer()), type: file.type }, engine.success ? engine.data : "cloud"));- });+ }, request);}diff --git a/src/app/api/explainer/link/route.ts b/src/app/api/explainer/link/route.tsindex fad633f4..5807a649 100644--- a/src/app/api/explainer/link/route.ts+++ b/src/app/api/explainer/link/route.ts@@ -8,5 +8,5 @@ export async function POST(request: Request) {return handle(async () => {const { url, engine } = await body(request, Ask, "Paste a link – article, page");return Response.json(await summarizeLink(url, engine));- });+ }, request);}diff --git a/src/app/api/explainer/route.ts b/src/app/api/explainer/route.tsindex aad9ea88..b9e0db4d 100644--- a/src/app/api/explainer/route.ts+++ b/src/app/api/explainer/route.ts@@ -26,5 +26,5 @@ export async function POST(request: Request) {const input = await body(request, Create, "Add a prompt, or attach a file or link");const episode = createEpisode({ kind: "explainer", topic: input.prompt, sources: input.sources, settings: input.settings, autoRender: !input.review });return Response.json(episode, { status: 201 });- });+ }, request);}diff --git a/src/app/api/faceless/channels/[id]/avatar/route.ts b/src/app/api/faceless/channels/[id]/avatar/route.tsindex 44f09c6d..dcef2bf9 100644--- a/src/app/api/faceless/channels/[id]/avatar/route.ts+++ b/src/app/api/faceless/channels/[id]/avatar/route.ts@@ -1,9 +1,9 @@import { handle, makeAvatar } from "@/server/faceless";/** Draw a channel avatar in the channel's style (one picture generation; it becomes the channel's picture when it's done). */-export async function POST(_req: Request, ctx: RouteContext<"/api/faceless/channels/[id]/avatar">) {+export async function POST(request: Request, ctx: RouteContext<"/api/faceless/channels/[id]/avatar">) {return handle(async () => {const { id } = await ctx.params;return Response.json(makeAvatar(id), { status: 201 });- });+ }, request);}diff --git a/src/app/api/faceless/channels/[id]/route.ts b/src/app/api/faceless/channels/[id]/route.tsindex 2a435c70..ed881229 100644--- a/src/app/api/faceless/channels/[id]/route.ts+++ b/src/app/api/faceless/channels/[id]/route.ts@@ -27,14 +27,14 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/faceless/cconst { id } = await ctx.params;const patch = await body(request, Patch, "Those channel settings aren't valid");return Response.json(await updateChannel(id, patch));- });+ }, request);}/** Deletes the channel and its episodes, stopping what they still render (finished videos stay in the Library). */-export async function DELETE(_req: Request, ctx: RouteContext<"/api/faceless/channels/[id]">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/faceless/channels/[id]">) {return handle(async () => {const { id } = await ctx.params;await deleteChannel(id);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/faceless/channels/route.ts b/src/app/api/faceless/channels/route.tsindex 84522075..f6bb07ad 100644--- a/src/app/api/faceless/channels/route.ts+++ b/src/app/api/faceless/channels/route.ts@@ -21,5 +21,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, Create, "Describe the channel and pick a genre");return Response.json(await createChannel(input), { status: 201 });- });+ }, request);}diff --git a/src/app/api/faceless/episodes/[id]/[action]/route.ts b/src/app/api/faceless/episodes/[id]/[action]/route.tsindex 908c0468..415d3774 100644--- a/src/app/api/faceless/episodes/[id]/[action]/route.ts+++ b/src/app/api/faceless/episodes/[id]/[action]/route.ts@@ -13,12 +13,12 @@ const ACTIONS = {upscale: upscaleEpisode,} as const;-export async function POST(_req: Request, ctx: RouteContext<"/api/faceless/episodes/[id]/[action]">) {+export async function POST(request: Request, ctx: RouteContext<"/api/faceless/episodes/[id]/[action]">) {return handle(async () => {const { id, action } = await ctx.params;const run = ACTIONS[action as keyof typeof ACTIONS];if (!run) return Response.json({ error: "Not found" }, { status: 404 });run(id);return Response.json(episodeView(id));- });+ }, request);}diff --git a/src/app/api/faceless/episodes/[id]/change/route.ts b/src/app/api/faceless/episodes/[id]/change/route.tsindex 6a9307c4..cfa5422d 100644--- a/src/app/api/faceless/episodes/[id]/change/route.ts+++ b/src/app/api/faceless/episodes/[id]/change/route.ts@@ -12,5 +12,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/faceless/epif (!c.apply) return Response.json(previewChange(id, c));applyChange(id, c);return Response.json(episodeView(id), { status: 201 });- });+ }, request);}diff --git a/src/app/api/faceless/episodes/[id]/route.ts b/src/app/api/faceless/episodes/[id]/route.tsindex 3a075834..44d0aaaa 100644--- a/src/app/api/faceless/episodes/[id]/route.ts+++ b/src/app/api/faceless/episodes/[id]/route.ts@@ -25,14 +25,14 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/faceless/econst patch = await body(request, Patch, "Those changes aren't valid");updateEpisode(id, patch);return Response.json(episodeView(id));- });+ }, request);}/** Deletes the episode and stops what it still renders (its finished videos stay in the Library). */-export async function DELETE(_req: Request, ctx: RouteContext<"/api/faceless/episodes/[id]">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/faceless/episodes/[id]">) {return handle(async () => {const { id } = await ctx.params;await deleteEpisode(id);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/faceless/episodes/route.ts b/src/app/api/faceless/episodes/route.tsindex 5120a4c0..00e3becf 100644--- a/src/app/api/faceless/episodes/route.ts+++ b/src/app/api/faceless/episodes/route.ts@@ -30,5 +30,5 @@ export async function POST(request: Request) {const lengths = getChannel(input.channelId)?.settings.brief ? CF_LENGTH_VALUES : FACELESS_LENGTHS;if (!lengths.includes(input.settings.length)) throw new FacelessError("Choose one of the offered video lengths");return Response.json(createEpisode({ kind: "faceless", channelId: input.channelId, topic: input.topic, script: input.script, settings: input.settings, saveLook: input.saveLook }), { status: 201 });- });+ }, request);}diff --git a/src/app/api/faceless/topics/route.ts b/src/app/api/faceless/topics/route.tsindex 0111dd4c..e52918e6 100644--- a/src/app/api/faceless/topics/route.ts+++ b/src/app/api/faceless/topics/route.ts@@ -19,5 +19,5 @@ export async function POST(request: Request) {if (!idea) return Response.json({ error: "Describe the channel first" }, { status: 400 });const reference = channel?.reference ? [channel.reference.title, channel.reference.author].filter(Boolean).join(" by ") || undefined : undefined;return Response.json(await suggestTopics({ idea, genre: q.genre ?? channel?.genre ?? "education", engine: q.engine, avoid: q.avoid, round: q.round, reference }));- });+ }, request);}diff --git a/src/app/api/faceless/voices/preview/route.ts b/src/app/api/faceless/voices/preview/route.tsindex e1a101e2..79078880 100644--- a/src/app/api/faceless/voices/preview/route.ts+++ b/src/app/api/faceless/voices/preview/route.ts@@ -8,5 +8,5 @@ export async function POST(request: Request) {return handle(async () => {const { id } = await body(request, Ask, "Pick a voice");return Response.json(voicePreview({ kind: "preset", id }));- });+ }, request);}diff --git a/src/app/api/generations/route.ts b/src/app/api/generations/route.tsindex 9c9d95b2..4d600b01 100644--- a/src/app/api/generations/route.ts+++ b/src/app/api/generations/route.ts@@ -11,12 +11,13 @@ import { OPERATION_LABELS } from "@/lib/catalog/types";import { ACCOUNT_LIMITS, ACCOUNT_MESSAGES, accountTotalBytes, accountUsage, diskHasRoom, filesFullMessage } from "@/server/account-files";import { accountInputProblem } from "@/server/account-inputs";import { db } from "@/server/db";-import { accountLoraFix, accountRun, AccountRunError, asAccount, asVisitor, ConnectComfyError, createGenerations, listGenerations, outputKind, previewGeneration, type AccountRunRefusal } from "@/server/generations";+import { accountLoraFix, accountRun, AccountRunError, asAccount, asVisitor, createGenerations, listGenerations, outputKind, previewGeneration, type AccountRunRefusal } from "@/server/generations";import { ensureTrashPurge, listOptionsFrom } from "@/server/library";import { hit, unhit } from "@/server/rate";import { GenerationRequestSchema } from "@/server/request-schema";import { gateGeneration, GPU_SETUP_HEADER } from "@/server/gpu/gate";import { gpuTargetFor } from "@/server/gpu/target";+import { connectNeeds } from "@/server/connect-refusal";/*** List generations, newest first. Filters: kind / kinds, features (`x*` = prefix), models, statuses,@@ -180,10 +181,10 @@ export async function POST(request: Request) {// A price check of a paid model the account has no key for says so, without opening "Add your key".if (refusal && !preview) return refused(refusal);if (account && !preview) unhit(`run:${account.id}`);- // Nothing connected runs this, and ComfyUI or a key could (Demo mode off): the owner's own browser (never a- // script's token) opens the connect card for it, with the ways that would run it, and the run starts once one is- // connected.- const connect = e instanceof ConnectComfyError && viewer.kind === "owner" && !preview && !token ? e.needs : null;+ // Nothing connected runs this, and ComfyUI or a key could (placeholder results off): the owner's own browser+ // (never a script's token) opens the connect card for it, with the ways that would run it, and the run starts once+ // one is connected (src/server/connect-refusal.ts).+ const connect = connectNeeds(e, request, preview);return Response.json({error: (e as Error).message,diff --git a/src/app/api/genjutsu/describe/route.ts b/src/app/api/genjutsu/describe/route.tsindex 9586b694..47716cc9 100644--- a/src/app/api/genjutsu/describe/route.ts+++ b/src/app/api/genjutsu/describe/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, DescribeSchema, "Add a picture of your character first");return Response.json(await describeCharacter(input));- });+ }, request);}diff --git a/src/app/api/genjutsu/route.ts b/src/app/api/genjutsu/route.tsindex 1c79d6f7..df10c6d7 100644--- a/src/app/api/genjutsu/route.ts+++ b/src/app/api/genjutsu/route.ts@@ -8,5 +8,5 @@ export async function POST(request: Request) {// A repeated requestId (a second click on Generate) gets the run the first one started.const { final, items } = await once("genjutsu", input.requestId, () => createGenjutsu(input));return Response.json({ final, items }, { status: 201 });- });+ }, request);}diff --git a/src/app/api/genjutsu/transcribe/route.ts b/src/app/api/genjutsu/transcribe/route.tsindex 544b963e..365b820a 100644--- a/src/app/api/genjutsu/transcribe/route.ts+++ b/src/app/api/genjutsu/transcribe/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, TranscribeSchema, "Add a clip first");return Response.json(transcribeClip(input), { status: 201 });- });+ }, request);}diff --git a/src/app/api/influencer/route.ts b/src/app/api/influencer/route.tsindex 1ce51dc8..237514d2 100644--- a/src/app/api/influencer/route.ts+++ b/src/app/api/influencer/route.ts@@ -1,6 +1,7 @@import { z } from "zod";import { MAX_CLOTHING, MAX_DIRECTION } from "@/lib/influencer";import { createInfluencer, previewInfluencer, type InfluencerBody } from "@/server/influencer";+import { refusedRun } from "@/server/connect-refusal";const File = z.string().startsWith("/api/files/").max(500);@@ -38,6 +39,6 @@ export async function POST(request: Request) {try {return Response.json(createInfluencer(body), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/katana/[id]/retry/route.ts b/src/app/api/katana/[id]/retry/route.tsindex 57aad703..e5515613 100644--- a/src/app/api/katana/[id]/retry/route.ts+++ b/src/app/api/katana/[id]/retry/route.ts@@ -1,4 +1,5 @@import { getKatana, rerunKatana, retryKatana } from "@/server/katana";+import { refusedRun } from "@/server/connect-refusal";/** Retry the failed steps of a run (and the ones after them); `?all=1` starts the same run again from scratch. */export async function POST(request: Request, ctx: RouteContext<"/api/katana/[id]/retry">) {@@ -8,6 +9,6 @@ export async function POST(request: Request, ctx: RouteContext<"/api/katana/[id]const all = new URL(request.url).searchParams.get("all") === "1";return Response.json(all ? rerunKatana(id) : retryKatana(id), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/katana/route.ts b/src/app/api/katana/route.tsindex bf5c6dc6..76347ff7 100644--- a/src/app/api/katana/route.ts+++ b/src/app/api/katana/route.ts@@ -1,5 +1,6 @@import { connection } from "next/server";import { createKatana, KatanaBody, listKatana, previewKatana } from "@/server/katana";+import { connectRefusal } from "@/server/connect-refusal";import { priceAs } from "@/server/visitor";/** Recent Katana runs with the state of every step. */@@ -17,11 +18,13 @@ async function post(request: Request) {const msg = path === "reference" ? "Add the reference edit" : path === "photos" ? "Add 1–5 photos of your subject" : path === "instructions" ? "Keep the instructions under 2,000 characters" : "Check the Katana settings";return Response.json({ error: msg }, { status: 400 });}+ const preview = new URL(request.url).searchParams.get("preview") === "1";try {- if (new URL(request.url).searchParams.get("preview") === "1") return Response.json(previewKatana(parsed.data));+ if (preview) return Response.json(previewKatana(parsed.data));return Response.json(createKatana(parsed.data), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ // Nothing connected runs it: the connect card in the owner's browser (never on a price check).+ return connectRefusal(e, request, preview) ?? Response.json({ error: (e as Error).message }, { status: 422 });}}diff --git a/src/app/api/layers/[id]/jobs/route.ts b/src/app/api/layers/[id]/jobs/route.tsindex 5bb43b4b..83d499ee 100644--- a/src/app/api/layers/[id]/jobs/route.ts+++ b/src/app/api/layers/[id]/jobs/route.ts@@ -1,3 +1,4 @@+import { connectRefusal } from "@/server/connect-refusal";import { JobInputSchema, LayersError, startJob } from "@/server/layers";/**@@ -12,6 +13,6 @@ export async function POST(request: Request, ctx: RouteContext<"/api/layers/[id]try {return Response.json(startJob(id, parsed.data), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: e instanceof LayersError ? e.status : 422 });+ return connectRefusal(e, request) ?? Response.json({ error: (e as Error).message }, { status: e instanceof LayersError ? e.status : 422 });}}diff --git a/src/app/api/media/probe/route.ts b/src/app/api/media/probe/route.tsindex e9169699..5d95fd69 100644--- a/src/app/api/media/probe/route.ts+++ b/src/app/api/media/probe/route.ts@@ -36,5 +36,5 @@ export async function POST(request: Request) {releaseAll();release();}- });+ }, request);}diff --git a/src/app/api/mixed-media/preview/route.ts b/src/app/api/mixed-media/preview/route.tsindex 39a4381d..93e7704c 100644--- a/src/app/api/mixed-media/preview/route.ts+++ b/src/app/api/mixed-media/preview/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, MixedBodySchema, "Pick a preset and upload a clip first");return Response.json(await once("mixed-preview", input.requestId, () => createMixedPreview(input)), { status: 201 });- });+ }, request);}diff --git a/src/app/api/mixed-media/retry/route.ts b/src/app/api/mixed-media/retry/route.tsindex 329d66e5..3b16d706 100644--- a/src/app/api/mixed-media/retry/route.ts+++ b/src/app/api/mixed-media/retry/route.ts@@ -7,5 +7,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, z.object({ id: z.string().min(1).max(64), requestId: z.string().trim().min(8).max(64).optional() }), "Pick a render to try again");return Response.json(await once("mixed-retry", input.requestId, () => retryMixed(input.id)), { status: 201 });- });+ }, request);}diff --git a/src/app/api/mixed-media/route.ts b/src/app/api/mixed-media/route.tsindex 1b02db46..44b4af32 100644--- a/src/app/api/mixed-media/route.ts+++ b/src/app/api/mixed-media/route.ts@@ -8,5 +8,5 @@ export async function POST(request: Request) {// A repeated requestId (a second click on Generate video) gets the render the first one started.const { final, items, frames } = await once("mixed-render", input.requestId, () => createMixed(input));return Response.json({ final, items, frames }, { status: 201 });- });+ }, request);}diff --git a/src/app/api/photodump/character/route.ts b/src/app/api/photodump/character/route.tsindex 339a659b..80ce78c6 100644--- a/src/app/api/photodump/character/route.ts+++ b/src/app/api/photodump/character/route.ts@@ -1,5 +1,6 @@import { z } from "zod";import { createSheet, previewSheet, type SheetRun } from "@/server/photodump";+import { refusedRun } from "@/server/connect-refusal";const Engine = z.enum(["cloud", "open"]);@@ -41,6 +42,6 @@ export async function POST(request: Request) {try {return Response.json(createSheet(input), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/photodump/fashion/route.ts b/src/app/api/photodump/fashion/route.tsindex 431712dd..90cf966f 100644--- a/src/app/api/photodump/fashion/route.ts+++ b/src/app/api/photodump/fashion/route.ts@@ -1,5 +1,6 @@import { z } from "zod";import { createFashion, previewFashion, type FashionRun } from "@/server/photodump";+import { refusedRun } from "@/server/connect-refusal";const File = z.string().startsWith("/api/files/").max(500);const Engine = z.enum(["cloud", "open"]);@@ -22,6 +23,6 @@ export async function POST(request: Request) {try {return Response.json(createFashion(input), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/photodump/retry/route.ts b/src/app/api/photodump/retry/route.tsindex a375ecac..127fb1dc 100644--- a/src/app/api/photodump/retry/route.ts+++ b/src/app/api/photodump/retry/route.ts@@ -1,5 +1,6 @@import { z } from "zod";import { retryPhoto } from "@/server/photodump";+import { refusedRun } from "@/server/connect-refusal";const Body = z.object({ id: z.string().min(1).max(40) });@@ -13,6 +14,6 @@ export async function POST(request: Request) {try {return Response.json({ items: retryPhoto(parsed.data.id) }, { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/photodump/route.ts b/src/app/api/photodump/route.tsindex 6b2e2c88..c907ba2b 100644--- a/src/app/api/photodump/route.ts+++ b/src/app/api/photodump/route.ts@@ -1,6 +1,7 @@import { connection } from "next/server";import { z } from "zod";import { createPhotodump, listUserPacks, previewPhotodump } from "@/server/photodump";+import { refusedRun } from "@/server/connect-refusal";const Body = z.object({@@ -30,6 +31,6 @@ export async function POST(request: Request) {try {return Response.json(createPhotodump(parsed.data), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/remove-object/preview/route.ts b/src/app/api/remove-object/preview/route.tsindex d85dc9b0..a4dff067 100644--- a/src/app/api/remove-object/preview/route.ts+++ b/src/app/api/remove-object/preview/route.ts@@ -7,5 +7,5 @@ export async function POST(request: Request) {const input = await body(request, RemovalBodySchema, "Add a clip and say, click or paint what to remove");const preview = await once("remove-object-preview", input.requestId, () => createRemovalPreview(input));return Response.json(preview, { status: 201 });- });+ }, request);}diff --git a/src/app/api/remove-object/route.ts b/src/app/api/remove-object/route.tsindex d172ad22..61fe705e 100644--- a/src/app/api/remove-object/route.ts+++ b/src/app/api/remove-object/route.ts@@ -8,5 +8,5 @@ export async function POST(request: Request) {// A repeated requestId (a second click on Remove) gets the run the first one started.const { final, items } = await once("remove-object", input.requestId, () => createRemoval(input));return Response.json({ final, items }, { status: 201 });- });+ }, request);}diff --git a/src/app/api/shorts/presets/[id]/route.ts b/src/app/api/shorts/presets/[id]/route.tsindex 374cde8b..4ffe43c8 100644--- a/src/app/api/shorts/presets/[id]/route.ts+++ b/src/app/api/shorts/presets/[id]/route.ts@@ -6,13 +6,13 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/shorts/preconst { id } = await ctx.params;const patch = await body(request, PresetPatchSchema, "Those preset settings aren't valid");return Response.json(updateCustomPreset(id, patch));- });+ }, request);}-export async function DELETE(_req: Request, ctx: RouteContext<"/api/shorts/presets/[id]">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/shorts/presets/[id]">) {return handle(async () => {const { id } = await ctx.params;if (!deleteCustomPreset(id)) throw new ShortsError("This preset no longer exists", 404);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/shorts/presets/route.ts b/src/app/api/shorts/presets/route.tsindex 1461326f..1f4049d7 100644--- a/src/app/api/shorts/presets/route.ts+++ b/src/app/api/shorts/presets/route.ts@@ -13,5 +13,5 @@ export async function POST(request: Request) {return handle(async () => {const input = await body(request, PresetBodySchema, "Add 1–10 reference images");return Response.json(createCustomPreset(input), { status: 201 });- });+ }, request);}diff --git a/src/app/api/shorts/probe/route.ts b/src/app/api/shorts/probe/route.tsindex 2c10ced2..018bfd23 100644--- a/src/app/api/shorts/probe/route.ts+++ b/src/app/api/shorts/probe/route.ts@@ -7,5 +7,5 @@ export async function POST(request: Request) {return handle(async () => {const { url } = await body(request, z.object({ url: z.string().startsWith("/api/files/").max(500) }), "Upload the clip first");return Response.json(await probeSource(url));- });+ }, request);}diff --git a/src/app/api/shorts/sessions/[id]/route.ts b/src/app/api/shorts/sessions/[id]/route.tsindex 1cda7a0d..65f04bc3 100644--- a/src/app/api/shorts/sessions/[id]/route.ts+++ b/src/app/api/shorts/sessions/[id]/route.ts@@ -18,7 +18,7 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/shorts/sesconst { id } = await ctx.params;const { title } = await body(request, z.object({ title: z.string().trim().min(1).max(120) }), "Give the short a name");return Response.json(renameSession(id, title));- });+ }, request);}/** Delete the session; its videos move to the Trash unless ?keep=1. */@@ -27,5 +27,5 @@ export async function DELETE(request: Request, ctx: RouteContext<"/api/shorts/seconst { id } = await ctx.params;const keep = new URL(request.url).searchParams.get("keep") === "1";return Response.json({ trashed: deleteSession(id, { keep }) });- });+ }, request);}diff --git a/src/app/api/shorts/sessions/[id]/segments/[index]/primary/route.ts b/src/app/api/shorts/sessions/[id]/segments/[index]/primary/route.tsindex 7515b42f..d0561f2e 100644--- a/src/app/api/shorts/sessions/[id]/segments/[index]/primary/route.ts+++ b/src/app/api/shorts/sessions/[id]/segments/[index]/primary/route.ts@@ -10,5 +10,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/shorts/sessif (!Number.isInteger(i) || i < 0) throw new ShortsError("No such segment", 404);const { generationId } = await body(request, z.object({ generationId: z.string().min(1).max(40) }), "Pick a take");return Response.json(makePrimary(id, i, generationId));- });+ }, request);}diff --git a/src/app/api/shorts/sessions/[id]/segments/[index]/route.ts b/src/app/api/shorts/sessions/[id]/segments/[index]/route.tsindex 8f22022f..48f14cc7 100644--- a/src/app/api/shorts/sessions/[id]/segments/[index]/route.ts+++ b/src/app/api/shorts/sessions/[id]/segments/[index]/route.ts@@ -9,5 +9,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/shorts/sessif (!Number.isInteger(i) || i < 0) throw new ShortsError("No such segment", 404);const { requestId } = await optionalBody(request, NonceSchema);return Response.json(await once(`shorts-take:${id}:${i}`, requestId, () => regenerateSegment(id, i)), { status: 201 });- });+ }, request);}diff --git a/src/app/api/shorts/sessions/[id]/stitch/route.ts b/src/app/api/shorts/sessions/[id]/stitch/route.tsindex cb2861f3..e50cb4ef 100644--- a/src/app/api/shorts/sessions/[id]/stitch/route.ts+++ b/src/app/api/shorts/sessions/[id]/stitch/route.ts@@ -7,5 +7,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/shorts/sessconst { id } = await ctx.params;const { requestId } = await optionalBody(request, NonceSchema);return Response.json(await once(`shorts-stitch:${id}`, requestId, () => stitchSession(id)), { status: 201 });- });+ }, request);}diff --git a/src/app/api/shorts/sessions/route.ts b/src/app/api/shorts/sessions/route.tsindex 35ce9261..3138dbfc 100644--- a/src/app/api/shorts/sessions/route.ts+++ b/src/app/api/shorts/sessions/route.ts@@ -14,5 +14,5 @@ export async function POST(request: Request) {const input = await body(request, ShortsBodySchema, "Pick a preset, upload a clip and choose the part to restyle");// A repeated requestId (a second click on Generate) gets the session the first one started.return Response.json(await once("shorts-session", input.requestId, () => createSession(input)), { status: 201 });- });+ }, request);}diff --git a/src/app/api/storyboards/[id]/film/route.ts b/src/app/api/storyboards/[id]/film/route.tsindex d1d659a0..2a7f1a1c 100644--- a/src/app/api/storyboards/[id]/film/route.ts+++ b/src/app/api/storyboards/[id]/film/route.ts@@ -1,5 +1,6 @@import { z } from "zod";import { createStoryboardFilm } from "@/server/storyboard";+import { refusedRun } from "@/server/connect-refusal";const Body = z.object({ modelId: z.string().max(100).optional() });@@ -10,6 +11,6 @@ export async function POST(request: Request, ctx: RouteContext<"/api/storyboardstry {return Response.json(createStoryboardFilm((await ctx.params).id, parsed.data), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/storyboards/route.ts b/src/app/api/storyboards/route.tsindex 016e7185..d938777b 100644--- a/src/app/api/storyboards/route.ts+++ b/src/app/api/storyboards/route.ts@@ -1,4 +1,5 @@import { createStoryboard, StoryboardBodySchema } from "@/server/storyboard";+import { refusedRun } from "@/server/connect-refusal";/** Popcorn-style storyboard: consecutive frames, each made from the previous one. */export async function POST(request: Request) {@@ -7,6 +8,6 @@ export async function POST(request: Request) {try {return Response.json(await createStoryboard(parsed.data), { status: 201 });} catch (e) {- return Response.json({ error: (e as Error).message }, { status: 422 });+ return refusedRun(e, request);}}diff --git a/src/app/api/swap-studio/projects/[id]/anchors/route.ts b/src/app/api/swap-studio/projects/[id]/anchors/route.tsindex 0c2a888f..84272ca9 100644--- a/src/app/api/swap-studio/projects/[id]/anchors/route.ts+++ b/src/app/api/swap-studio/projects/[id]/anchors/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(makeAnchor(id, await body(request, AnchorSchema, "Pick a shot")), { status: 201 });- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/assemble/route.ts b/src/app/api/swap-studio/projects/[id]/assemble/route.tsindex 772dd456..1d36b80c 100644--- a/src/app/api/swap-studio/projects/[id]/assemble/route.ts+++ b/src/app/api/swap-studio/projects/[id]/assemble/route.ts@@ -9,5 +9,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(assemble(id, (await body(request, Assemble, "Pick a clip")).clipId), { status: 201 });- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/clips/route.ts b/src/app/api/swap-studio/projects/[id]/clips/route.tsindex 5405e038..8f095aea 100644--- a/src/app/api/swap-studio/projects/[id]/clips/route.ts+++ b/src/app/api/swap-studio/projects/[id]/clips/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(await addClip(id, await body(request, ClipSchema, "Upload a clip first")), { status: 201 });- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/masks/route.ts b/src/app/api/swap-studio/projects/[id]/masks/route.tsindex af0d49ee..6133d3f9 100644--- a/src/app/api/swap-studio/projects/[id]/masks/route.ts+++ b/src/app/api/swap-studio/projects/[id]/masks/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(makeMask(id, await body(request, MaskSchema, "Pick a shot, a frame and who to swap")), { status: 201 });- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/prepare/route.ts b/src/app/api/swap-studio/projects/[id]/prepare/route.tsindex edc21ba2..e3167f27 100644--- a/src/app/api/swap-studio/projects/[id]/prepare/route.ts+++ b/src/app/api/swap-studio/projects/[id]/prepare/route.ts@@ -9,5 +9,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(prepareClip(id, (await body(request, Prepare, "Pick a clip")).clipId));- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/queue/route.ts b/src/app/api/swap-studio/projects/[id]/queue/route.tsindex 52b12b12..522c60c4 100644--- a/src/app/api/swap-studio/projects/[id]/queue/route.ts+++ b/src/app/api/swap-studio/projects/[id]/queue/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(queueTakes(id, await body(request, QueueSchema, "Pick a segment to queue")), { status: 201 });- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/route.ts b/src/app/api/swap-studio/projects/[id]/route.tsindex c3c39f5f..ac49a0fd 100644--- a/src/app/api/swap-studio/projects/[id]/route.ts+++ b/src/app/api/swap-studio/projects/[id]/route.ts@@ -13,13 +13,13 @@ export async function PATCH(request: Request, ctx: RouteContext<"/api/swap-studireturn handle(async () => {const { id } = await ctx.params;return Response.json(await editProject(id, await body(request, EditSchema, "That change isn't valid")));- });+ }, request);}/** Delete the project, stopping what it still makes (the assembled clips stay in the Library). */-export async function DELETE(_req: Request, ctx: RouteContext<"/api/swap-studio/projects/[id]">) {+export async function DELETE(request: Request, ctx: RouteContext<"/api/swap-studio/projects/[id]">) {return handle(async () => {await deleteProject((await ctx.params).id);return new Response(null, { status: 204 });- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/stop/route.ts b/src/app/api/swap-studio/projects/[id]/stop/route.tsindex 190a02fe..3e6885fc 100644--- a/src/app/api/swap-studio/projects/[id]/stop/route.ts+++ b/src/app/api/swap-studio/projects/[id]/stop/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(await stopJob(id, await body(request, StopSchema, "Pick a job to stop")));- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/takes/stop/route.ts b/src/app/api/swap-studio/projects/[id]/takes/stop/route.tsindex 0036cada..ffbe20ba 100644--- a/src/app/api/swap-studio/projects/[id]/takes/stop/route.ts+++ b/src/app/api/swap-studio/projects/[id]/takes/stop/route.ts@@ -6,5 +6,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(await stopTake(id, await body(request, TakeRefSchema, "Pick a take")));- });+ }, request);}diff --git a/src/app/api/swap-studio/projects/[id]/transcribe/route.ts b/src/app/api/swap-studio/projects/[id]/transcribe/route.tsindex c8820b0e..01681252 100644--- a/src/app/api/swap-studio/projects/[id]/transcribe/route.ts+++ b/src/app/api/swap-studio/projects/[id]/transcribe/route.ts@@ -9,5 +9,5 @@ export async function POST(request: Request, ctx: RouteContext<"/api/swap-studioreturn handle(async () => {const { id } = await ctx.params;return Response.json(transcribe(id, (await body(request, Transcribe, "Pick a clip")).clipId));- });+ }, request);}diff --git a/src/components/ads/multiplier.tsx b/src/components/ads/multiplier.tsxindex 070d927b..a7bbea14 100644--- a/src/components/ads/multiplier.tsx+++ b/src/components/ads/multiplier.tsx@@ -270,7 +270,7 @@ export function AdMultiplier({ models }: { models: Record<string, ModelInfo> })const estBody = useMemo(() => (body && sections ? { ...body, firstFrame: hookOn ? body.video : undefined, lastFrame: ctaOn ? body.video : undefined } : body), [body, sections, hookOn, ctaOn]);const est = useEstimate<RunEstimate>("/api/ads/multiplier/estimate", estBody);const blocker = !video ? "Upload a reference video" : video.uploading ? "Uploading the video…" : duration == null ? "Reading the video…" : length < MULTIPLIER.minSeconds - 0.05 || length > MULTIPLIER.maxSeconds + 0.05 ? "Video duration: 4-30 seconds" : est.data?.blocker;- const cost = est.data && !est.data.blocker ? (est.data.demo ? "Demo · free" : est.data.costUsd == null ? "" : `≈ ${formatCost(est.data.costUsd)}`) : "";+ const cost = est.data && !est.data.blocker ? (est.data.demo ? "Placeholder · free" : est.data.costUsd == null ? "" : `≈ ${formatCost(est.data.costUsd)}`) : "";const mention = (n: number) => {const tag = `@image_${n}`;diff --git a/src/components/ads/new-ads.tsx b/src/components/ads/new-ads.tsxindex 0c860735..11fc59c8 100644--- a/src/components/ads/new-ads.tsx+++ b/src/components/ads/new-ads.tsx@@ -83,7 +83,7 @@ export function NewAds({ brand, products, engine, onCreated }: { brand: BrandKitonError: (e) => toastError(e),});};- const price = est.data ? (est.data.demo ? "Demo · free" : est.data.costUsd == null ? "price unknown" : est.data.costUsd === 0 ? "Free" : `≈ ${formatCost(est.data.costUsd)}`) : "";+ const price = est.data ? (est.data.demo ? "Placeholder · free" : est.data.costUsd == null ? "price unknown" : est.data.costUsd === 0 ? "Free" : `≈ ${formatCost(est.data.costUsd)}`) : "";return (<div className="space-y-6"><section className="rounded-2xl border bg-background p-4 sm:p-5">diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsxindex 5f563bef..64d22313 100644--- a/src/components/app-sidebar.tsx+++ b/src/components/app-sidebar.tsx@@ -679,9 +679,15 @@ export function AppSidebar() {{/* Placeholder results, only while the owner has them on (Settings, for a tour): a click turns them off. Its ownbutton beside the status link (a button never sits inside a link). */}{status && !status.viewer && placeholdersOn(status.demoMode) && (- <div className="-mt-1 px-2 pb-1 group-data-[collapsible=icon]:hidden">- <PlaceholdersOnChip />- </div>+ <>+ <div className="-mt-1 px-2 pb-1 group-data-[collapsible=icon]:hidden">+ <PlaceholdersOnChip />+ </div>+ {/* Collapsed to icons: the same way out, as a round mark. */}+ <div className="hidden justify-center pb-1 group-data-[collapsible=icon]:flex">+ <PlaceholdersOnChip icon />+ </div>+ </>)}<SidebarMenu className="flex-row gap-1 group-data-[collapsible=icon]:flex-col"><SidebarMenuItem className="min-w-0 flex-1">diff --git a/src/components/assist/plan-jobs.tsx b/src/components/assist/plan-jobs.tsxindex d4b4f10d..b8d57834 100644--- a/src/components/assist/plan-jobs.tsx+++ b/src/components/assist/plan-jobs.tsx@@ -13,7 +13,7 @@ const KIND_ICON: Record<MediaKind | "storyboard" | "memory", typeof ImageIcon> =export function jobPrice(j: PlannedJob): string {if (j.error) return "—";if (j.op === "memory") return "";- if (j.demo) return "Demo";+ if (j.demo) return "Placeholder";if (j.costUsd === 0) return "Free";return j.costUsd === null ? "Price varies" : formatCost(j.costUsd);}diff --git a/src/components/assist/project-view.tsx b/src/components/assist/project-view.tsxindex d29cc9f0..40956cff 100644--- a/src/components/assist/project-view.tsx+++ b/src/components/assist/project-view.tsx@@ -41,12 +41,14 @@ import { SidebarTrigger } from "@/components/ui/sidebar";import { Skeleton } from "@/components/ui/skeleton";import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";import { Textarea } from "@/components/ui/textarea";+import { PlaceholderChip } from "@/components/demo-mode";import { MediaThumb } from "@/components/studio/feed";import { Viewer } from "@/components/studio/viewer";import { AssistComposer } from "@/components/assist/composer";import { chatSkills, NewChatControls, SkillStarters } from "@/components/assist-view";import { useElements, useEngine } from "@/lib/api";import { MAX_PROJECT_SOURCES, type AssistProject, type ProjectSource, type SourceKind } from "@/lib/assist";+import { isPlaceholder, PLACEHOLDER_CHIP } from "@/lib/demo-mode";import { timeAgo } from "@/lib/format";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";@@ -247,11 +249,12 @@ function Assets({ p, active }: { p: AssistProject; active: boolean }) {</p><ul className="grid grid-cols-3 gap-2 sm:grid-cols-4">{tiles.map(({ a, at, o, i }) => (- <li key={`${a.generation.id}-${i}`}>+ <li key={`${a.generation.id}-${i}`} className="relative"><button onClick={() => setOpen({ at, i })} className="group relative block aspect-square w-full overflow-hidden rounded-xl bg-muted" aria-label={`Open ${a.generation.request.prompt?.slice(0, 60) || "result"} (from ${a.chatTitle})`}>- <MediaThumb output={o} g={a.generation} className="transition duration-300 group-hover:scale-[1.03]" tag={a.generation.provider === "mock" && o.kind === "text" ? "Demo" : undefined} />- {a.generation.provider === "mock" && o.kind !== "text" && <span className="absolute top-1.5 right-1.5 rounded-full bg-background/80 px-1.5 py-0.5 text-[10px] font-medium">Demo</span>}+ <MediaThumb output={o} g={a.generation} className="transition duration-300 group-hover:scale-[1.03]" tag={isPlaceholder(a.generation) && o.kind === "text" ? PLACEHOLDER_CHIP : undefined} /></button>+ {/* Beside the tile, not in it (a button can't hold the chip's own button): the ways to the real thing. */}+ {o.kind !== "text" && <PlaceholderChip g={a.generation} overlay className="absolute top-1.5" />}</li>))}</ul>diff --git a/src/components/assist/run-skill-dialog.tsx b/src/components/assist/run-skill-dialog.tsxindex 1ec4b8e7..33d6b5ba 100644--- a/src/components/assist/run-skill-dialog.tsx+++ b/src/components/assist/run-skill-dialog.tsx@@ -72,10 +72,10 @@ function useDebounced<T>(value: T, ms: number): T {return v;}-/** "$0.62 on Cloud", "Free on your GPU", "$12.40 for 20 runs", "Demo — no provider connected". */+/** "$0.62 on Cloud", "Free on your GPU", "$12.40 for 20 runs", "Placeholder · free". */function priceLine(e: RecipeEstimate | undefined, runs: number): string {if (!e) return "";- if (e.demo) return `Demo — no provider connected, free${runs > 1 ? ` · ${runs} runs` : ""}`;+ if (e.demo) return `Placeholder · free${runs > 1 ? ` · ${runs} runs` : ""}`;if (e.total === null) return "Some prices vary";const where = e.engine === "open" ? "on your GPU" : "on Cloud";if (e.total === 0) return runs > 1 ? `Free · ${runs} runs ${where}` : `Free ${where}`;diff --git a/src/components/assist/transcript.tsx b/src/components/assist/transcript.tsxindex e22b5f31..474219c9 100644--- a/src/components/assist/transcript.tsx+++ b/src/components/assist/transcript.tsx@@ -4,10 +4,12 @@ import { AppWindow, ArrowUpRight, Brain, Captions, Check, CircleAlert, Clapperboimport Link from "next/link";import { useState } from "react";import { Button } from "@/components/ui/button";+import { PlaceholderChip } from "@/components/demo-mode";import { FailedTile, MediaThumb, PendingTile, tileRatio } from "@/components/studio/feed";import { useCreateGeneration } from "@/lib/api";import { memoryCardLine, planRunnable, type AssistItem, type AssistThread, type SkillSummary } from "@/lib/assist";import type { Generation } from "@/lib/catalog/types";+import { isPlaceholder, PLACEHOLDER_CHIP } from "@/lib/demo-mode";import { formatCost } from "@/lib/format";import { cn } from "@/lib/utils";import { toastError } from "@/lib/refusals";@@ -50,7 +52,7 @@ export function ApprovalCard({ item, live, onAnswer }: { item: Extract<AssistIte: !runnable && item.status === "pending"? "Can't run yet — fix what's marked above, or tell Assist what to change": allDemo- ? "Demo run — no provider connected"+ ? "Placeholder run · free": item.totalUsd === null? "Some prices vary": item.totalUsd === 0@@ -148,27 +150,24 @@ export function GenerationCards({ ids, all, storyboard, onOpen }: { ids: string[return g.outputs.map((o, i) => {const n = stills > 1 && g.kind === "image" && o.kind === "image" ? ++take : 0;return (- <button- key={`${g.id}-${i}`}- onClick={() => onOpen(g, i)}- className="group relative overflow-hidden rounded-xl bg-muted"- style={{ aspectRatio: ratio }}- aria-label={`Open ${n ? `take ${n}: ` : ""}${g.request.prompt?.slice(0, 60) || "result"}`}- >- {/* A text card says "Demo" in its own header row: on a narrow tile a corner badge would cover its label. */}- <MediaThumb output={o} className="transition duration-300 group-hover:scale-[1.02]" tag={g.provider === "mock" && o.kind === "text" ? "Demo" : undefined} />- {/* Top right, next to "Demo": the other corners hold the picture's own caption on demo stills. */}- {(n > 0 || (g.provider === "mock" && o.kind !== "text")) && (- <span className="absolute top-2 right-2 flex items-center gap-1">- {n > 0 && (- <span aria-hidden className="grid size-6 place-items-center rounded-full bg-background/85 text-[12px] font-medium tabular-nums shadow-soft">- {n}- </span>- )}- {g.provider === "mock" && o.kind !== "text" && <span className="rounded-full bg-background/80 px-2 py-0.5 text-[10px] font-medium">Demo</span>}- </span>- )}- </button>+ <div key={`${g.id}-${i}`} className="relative">+ <button+ onClick={() => onOpen(g, i)}+ className="group relative block w-full overflow-hidden rounded-xl bg-muted"+ style={{ aspectRatio: ratio }}+ aria-label={`Open ${n ? `take ${n}: ` : ""}${g.request.prompt?.slice(0, 60) || "result"}`}+ >+ {/* A text card says "Placeholder" in its own header row: on a narrow tile a corner badge would cover its label. */}+ <MediaThumb output={o} className="transition duration-300 group-hover:scale-[1.02]" tag={isPlaceholder(g) && o.kind === "text" ? PLACEHOLDER_CHIP : undefined} />+ {n > 0 && (+ <span aria-hidden className="absolute top-2 right-2 grid size-6 place-items-center rounded-full bg-background/85 text-[12px] font-medium tabular-nums shadow-soft">+ {n}+ </span>+ )}+ </button>+ {/* Beside the tile, not in it (a button can't hold the chip's own button): the ways to the real thing. */}+ {o.kind !== "text" && <PlaceholderChip g={g} overlay className="absolute top-2" />}+ </div>);});}diff --git a/src/components/audio-tools/audio-tools.tsx b/src/components/audio-tools/audio-tools.tsxindex 8c47909b..316b5609 100644--- a/src/components/audio-tools/audio-tools.tsx+++ b/src/components/audio-tools/audio-tools.tsx@@ -43,7 +43,7 @@ type Curve = "equal-power" | "linear";type Clip = SlotValue & { duration?: number };const money = (p: AudioToolPreview, engine: Engine) =>- p.demo ? "Demo · free" : engine === "open" ? "Free · runs on your ComfyUI" : p.costUsd === null ? "Price unknown" : p.costUsd < 0.01 ? "Under $0.01" : `≈ $${p.costUsd.toFixed(2)}`;+ p.demo ? "Placeholder · free" : engine === "open" ? "Free · runs on your ComfyUI" : p.costUsd === null ? "Price unknown" : p.costUsd < 0.01 ? "Under $0.01" : `≈ $${p.costUsd.toFixed(2)}`;const nameOf = (c: Clip) => (c.name ?? "Audio clip").replace(/\.[a-z0-9]{2,4}$/i, "");diff --git a/src/components/audio-tools/split-tool.tsx b/src/components/audio-tools/split-tool.tsxindex 9289de5b..4f497e7a 100644--- a/src/components/audio-tools/split-tool.tsx+++ b/src/components/audio-tools/split-tool.tsx@@ -577,7 +577,7 @@ function Mixer({ stems, source, engine }: { stems: Stem[]; source: Source; engin}return backgroundLowered(peak);}, [bed]);- const remuxCost = remuxPrice.data ? (remuxPrice.data.demo ? "Demo · free" : engine === "open" ? "Free" : remuxPrice.data.costUsd !== null && remuxPrice.data.costUsd < 0.01 ? "under $0.01" : `≈ $${remuxPrice.data.costUsd?.toFixed(2)}`) : null;+ const remuxCost = remuxPrice.data ? (remuxPrice.data.demo ? "Placeholder · free" : engine === "open" ? "Free" : remuxPrice.data.costUsd !== null && remuxPrice.data.costUsd < 0.01 ? "under $0.01" : `≈ $${remuxPrice.data.costUsd?.toFixed(2)}`) : null;return (<section aria-labelledby="mixer" className="space-y-3">@@ -650,7 +650,7 @@ function Mixer({ stems, source, engine }: { stems: Stem[]; source: Source; engin// ---------------------------------------------------------------------------// The tool-const money = (p: AudioToolPreview) => (p.demo ? "Demo · free" : "Free · runs on your ComfyUI");+const money = (p: AudioToolPreview) => (p.demo ? "Placeholder · free" : "Free · runs on your ComfyUI");/** Where the time estimate is for: the host's device when it said; else a CPU's, the figures the estimate then uses. */const onDevice = (device?: string) => (device === "cuda" ? "on your GPU" : device ? "on your CPU" : "on a CPU");diff --git a/src/components/av/step-list.tsx b/src/components/av/step-list.tsxindex 5c820dca..8809234b 100644--- a/src/components/av/step-list.tsx+++ b/src/components/av/step-list.tsx@@ -59,7 +59,7 @@ export function StepList({ steps, className }: { steps: StepRow[]; className?: s{g?.modelName && <span className="hidden truncate text-[12px] text-muted-foreground sm:inline">{g.modelName}</span>}<span className="ml-auto shrink-0 font-mono text-[11px] text-muted-foreground">{status === "succeeded" ? "Done" : status === "failed" ? "Failed" : status === "canceled" ? "Canceled" : waiting ? "Waiting" : counted ?? (pct != null ? `${pct}%` : "Working")}- {g?.provider === "mock" && status === "succeeded" ? " · demo" : ""}+ {g?.provider === "mock" && status === "succeeded" ? " · placeholder" : ""}</span></div>{(status === "running" || (status === "queued" && !waiting)) && (diff --git a/src/components/canvas/board.tsx b/src/components/canvas/board.tsxindex 7face06c..fa385b02 100644--- a/src/components/canvas/board.tsx+++ b/src/components/canvas/board.tsx@@ -188,7 +188,7 @@ function GroupPrice({ id }: { id: string }) {const m = getModel(mid);return !!m && isDemo(m);});- const price = demo ? "demo, free" : p.unknown ? "price unknown" : p.usd === 0 ? "free" : `≈ ${formatCost(p.usd)}`;+ const price = demo ? "placeholder, free" : p.unknown ? "price unknown" : p.usd === 0 ? "free" : `≈ ${formatCost(p.usd)}`;return (<>Runs {p.steps === 1 ? "1 node" : `${p.steps} nodes`} (with what they need) · {price}diff --git a/src/components/canvas/canvas-editor.tsx b/src/components/canvas/canvas-editor.tsxindex 12a7dda3..83cfd502 100644--- a/src/components/canvas/canvas-editor.tsx+++ b/src/components/canvas/canvas-editor.tsx@@ -1220,7 +1220,7 @@ function Editor({ id, initial, view }: { id: string; initial: Canvas; view: Canvconst attention = new Set(plan.errors.filter((e) => e.message !== OPEN_DUB_HINT).map((e) => e.nodeId)).size;const summary = [plan.steps.length- ? `${plan.steps.length} to run · ${planDemo ? "Demo · free" : plan.costUnknown ? "price unknown" : plan.costUsd === 0 ? "Free" : `≈ ${formatCost(plan.costUsd)}`}`+ ? `${plan.steps.length} to run · ${planDemo ? "Placeholder · free" : plan.costUnknown ? "price unknown" : plan.costUsd === 0 ? "Free" : `≈ ${formatCost(plan.costUsd)}`}`: generators.length && !attention? "Up to date": "",diff --git a/src/components/canvas/nodes.tsx b/src/components/canvas/nodes.tsxindex 720080f8..dab98d73 100644--- a/src/components/canvas/nodes.tsx+++ b/src/components/canvas/nodes.tsx@@ -661,7 +661,7 @@ function EngineBadge({ model }: { model?: ModelDef }) {function costLabel(isDemo: (m: ModelDef) => boolean, model: ModelDef | undefined, cost: number | null): string {if (!model) return "";- if (isDemo(model)) return "Demo · free";+ if (isDemo(model)) return "Placeholder · free";if (model.engine === "open") return "Free · your GPU";return cost == null ? "Price unknown" : cost === 0 ? "Free" : `≈ ${formatCost(cost)}`;}diff --git a/src/components/cinema/cinema-feed.tsx b/src/components/cinema/cinema-feed.tsxindex cf4ea896..fb8ad5ce 100644--- a/src/components/cinema/cinema-feed.tsx+++ b/src/components/cinema/cinema-feed.tsx@@ -379,7 +379,7 @@ function TileView({<div className="min-w-0 flex-1"><p className="line-clamp-2 text-[13.5px] leading-snug">{promptOf(g)}</p><p className="mt-0.5 flex flex-wrap gap-x-1.5 text-[11.5px] text-muted-foreground">- {[step, getModel(g.modelId)?.name ?? g.modelId, g.provider === "mock" ? "Demo" : g.engine === "open" ? "Open source" : "Cloud", timeAgo(g.createdAt), g.costUsd ? formatCost(g.costUsd) : null, g.status === "failed" ? g.error : null]+ {[step, getModel(g.modelId)?.name ?? g.modelId, g.provider === "mock" ? "Placeholder" : g.engine === "open" ? "Open source" : "Cloud", timeAgo(g.createdAt), g.costUsd ? formatCost(g.costUsd) : null, g.status === "failed" ? g.error : null].filter(Boolean).map((m, i) => (<span key={i} className={cn(i > 0 && "before:mr-1.5 before:content-['·']", m === g.error && "text-destructive")}>diff --git a/src/components/cinema/prompt-bar.tsx b/src/components/cinema/prompt-bar.tsxindex ebf5d590..920bd685 100644--- a/src/components/cinema/prompt-bar.tsx+++ b/src/components/cinema/prompt-bar.tsx@@ -541,8 +541,8 @@ export function PromptBar(props: PromptBarProps) {.filter(Boolean).join(" · ");// The live cost sits next to Generate at every width (short on narrow bars).- const costShort = demo ? "Demo" : cost === 0 ? "Free" : cost != null ? `≈ ${formatCost(cost)}` : "≈ ?";- const costLong = demo ? "Demo · free" : cost === 0 ? "Free" : cost != null ? `≈ ${formatCost(cost)}` : "Price unknown";+ const costShort = demo ? "Placeholder" : cost === 0 ? "Free" : cost != null ? `≈ ${formatCost(cost)}` : "≈ ?";+ const costLong = demo ? "Placeholder · free" : cost === 0 ? "Free" : cost != null ? `≈ ${formatCost(cost)}` : "Price unknown";// The Director's Panel chips: their own row from sm up; on phones one "Director" chip opens them in a sheet.const directorChips = (diff --git a/src/components/cinema/scene-actions.tsx b/src/components/cinema/scene-actions.tsxindex 37a8c45a..60cba9b7 100644--- a/src/components/cinema/scene-actions.tsx+++ b/src/components/cinema/scene-actions.tsx@@ -42,12 +42,12 @@ export function sceneTake(g: CinemaGeneration): SceneTake | null {return { generation: g, still, source, aspect: ar && IMAGE_ASPECTS.includes(ar) ? ar : "16:9" };}-/** What a plan costs here: "Demo" while placeholder results are on (Settings, for a tour). */+/** What a plan costs here: "Placeholder · free" while placeholder results are on (Settings, for a tour). */export function usePlanPrice(plan: CinemaPlan): { cost: number | null; label: string; demo: boolean } {const status = useStatus().data;const demo = placeholdersOn(status?.demoMode);const cost = demo ? 0 : plan.costUsd;- return { cost, demo, label: demo ? "Demo · free" : cost === 0 ? "Free" : cost != null ? `≈ ${formatCost(cost)}` : "Price unknown" };+ return { cost, demo, label: demo ? "Placeholder · free" : cost === 0 ? "Free" : cost != null ? `≈ ${formatCost(cost)}` : "Price unknown" };}const SKIP_KEY = "fuobe.cinema.sceneConfirm";diff --git a/src/components/cinema/soul-builders.tsx b/src/components/cinema/soul-builders.tsxindex bb00e475..4c269a68 100644--- a/src/components/cinema/soul-builders.tsx+++ b/src/components/cinema/soul-builders.tsx@@ -199,7 +199,7 @@ function useBuilderRun(projectId: string) {function CostLabel({ plan }: { plan: { costUsd: number | null } }) {const status = useStatus().data;const demo = placeholdersOn(status?.demoMode);- return <span className="font-mono text-[12px] whitespace-nowrap text-muted-foreground">{demo ? "Demo · free" : plan.costUsd === 0 ? "Free" : plan.costUsd != null ? `≈ ${formatCost(plan.costUsd)}` : ""}</span>;+ return <span className="font-mono text-[12px] whitespace-nowrap text-muted-foreground">{demo ? "Placeholder · free" : plan.costUsd === 0 ? "Free" : plan.costUsd != null ? `≈ ${formatCost(plan.costUsd)}` : ""}</span>;}function SaveElement({ kind, defaultName, picked, description, onSaved }: { kind: "character" | "location"; defaultName: string; picked: string[]; description: string; onSaved: () => void }) {diff --git a/src/components/content-factory/parts.tsx b/src/components/content-factory/parts.tsxindex fe701da6..2bbdca59 100644--- a/src/components/content-factory/parts.tsx+++ b/src/components/content-factory/parts.tsx@@ -282,7 +282,7 @@ export function PresetTile({ p, on, tabStop, onPick }: { p: StylePreset; on: boo// The price/**- * "≈ $4.20 · 3 episodes × $1.40" / "Demo · free" / "Free · your GPU", with the research's pricing note. A guest or an+ * "≈ $4.20 · 3 episodes × $1.40" / "Placeholder · free" / "Free · your GPU", with the research's pricing note. A guest or an* account reads "Self-hosted only" for the open engine: a series doesn't run on their own GPU yet.*/export function SeriesPriceLine({ data, loading, engine, className }: { data: SeriesEstimate | undefined; loading?: boolean; engine: Engine; className?: string }) {@@ -290,7 +290,7 @@ export function SeriesPriceLine({ data, loading, engine, className }: { data: Seif (!data) return <span className={cn("inline-flex items-center gap-1.5 font-mono text-[12px] text-muted-foreground", className)}>{loading && <Loader2 className="size-3 animate-spin" />}Estimating…</span>;const p = data.price;const each = p.episodes > 1 ? ` · ${p.episodes} × ${usd(p.perEpisode)}` : "";- const price = visitor && (data.demo || engine === "open") ? "Self-hosted only" : data.demo ? "Demo · free" : engine === "open" ? "Free · your GPU" : `≈ ${usd(p.total)}${p.unknown ? "+" : ""}${each}`;+ const price = visitor && (data.demo || engine === "open") ? "Self-hosted only" : data.demo ? "Placeholder · free" : engine === "open" ? "Free · your GPU" : `≈ ${usd(p.total)}${p.unknown ? "+" : ""}${each}`;return (<span className={cn("inline-flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5", className)}><Popover>diff --git a/src/components/demo-mode.tsx b/src/components/demo-mode.tsxindex e6f7fa70..658f5ab6 100644--- a/src/components/demo-mode.tsx+++ b/src/components/demo-mode.tsx@@ -114,24 +114,36 @@ function PlaceholderCard({ close }: { close: () => void }) {/*** The sidebar's "Placeholders on" while the switch is on (the owner's only: nobody else's runs make placeholders). A- * click turns them off at once, with Undo in the toast; Settings has the switch itself.+ * click turns them off at once, with Undo in the toast; Settings has the switch itself. `icon`: the collapsed sidebar's+ * round version, the same button with only its mark showing.*/-export function PlaceholdersOnChip({ className }: { className?: string }) {+export function PlaceholdersOnChip({ className, icon }: { className?: string; icon?: boolean }) {const { busy, turnOff } = useSetPlaceholders();return (<buttontype="button"disabled={busy}onClick={() => void turnOff()}- title="Turn off placeholder results"+ title={icon ? `${PLACEHOLDERS_ON}: click to turn them off` : "Turn off placeholder results"}aria-label={`${PLACEHOLDERS_ON}. Turn off placeholder results`}className={cn(- "group/chip inline-flex h-6 w-fit max-w-full items-center gap-1 rounded-full bg-highlight/25 pr-1.5 pl-2 text-[11px] font-medium text-highlight-foreground transition-colors outline-none hover:bg-highlight/40 focus-visible:ring-2 focus-visible:ring-ring/50 disabled:opacity-60 dark:text-highlight",+ "group/chip inline-flex items-center rounded-full bg-highlight/25 font-medium text-highlight-foreground transition-colors outline-none hover:bg-highlight/40 focus-visible:ring-2 focus-visible:ring-ring/50 disabled:opacity-60 dark:text-highlight",+ icon ? "size-8 shrink-0 justify-center" : "h-6 w-fit max-w-full gap-1 pr-1.5 pl-2 text-[11px]",className,)}>- <span className="min-w-0 truncate">{PLACEHOLDERS_ON}</span>- {busy ? <Loader2 aria-hidden className="size-3 shrink-0 animate-spin" /> : <X aria-hidden className="size-3 shrink-0 opacity-70 group-hover/chip:opacity-100" />}+ {icon ? (+ busy ? (+ <Loader2 aria-hidden className="size-4 animate-spin" />+ ) : (+ <Sparkles aria-hidden className="size-4" />+ )+ ) : (+ <>+ <span className="min-w-0 truncate">{PLACEHOLDERS_ON}</span>+ {busy ? <Loader2 aria-hidden className="size-3 shrink-0 animate-spin" /> : <X aria-hidden className="size-3 shrink-0 opacity-70 group-hover/chip:opacity-100" />}+ </>+ )}</button>);}diff --git a/src/components/dub/dub-studio.tsx b/src/components/dub/dub-studio.tsxindex 1a66d5c8..bf83af1b 100644--- a/src/components/dub/dub-studio.tsx+++ b/src/components/dub/dub-studio.tsx@@ -11,12 +11,14 @@ import { Skeleton } from "@/components/ui/skeleton";import { Switch } from "@/components/ui/switch";import type { SlotValue } from "@/components/studio/media-slot";import { CueEditor, useCueEditor } from "@/components/av/cue-editor";+import { PlaceholderChip } from "@/components/demo-mode";import { SourceLanguageSelect, TargetLanguages } from "@/components/av/language-picker";import { MediaDrop } from "@/components/av/media-drop";import { StepList, type StepRow } from "@/components/av/step-list";import { Panel, ToolHero, ToolShell } from "@/components/av/tool-shell";import { SelfHostNote } from "@/components/self-host-note";import { useEngine, useLikelyVisitor, useModelAccess } from "@/lib/api";+import { isPlaceholder } from "@/lib/demo-mode";import { keepOffered, offered } from "@/lib/model-access";import { cueProblems } from "@/lib/av/cue-edit";import { BACKGROUND_DB, crowdedLines, dubResult, languageStage, ONE_SHOT_MODELS, priceLine, reviewCues, takeLines, translateKey, voiceOnly, type DubPrice, type DubSessionView, type DubStage, type OneShotModel } from "@/lib/av/dub";@@ -233,7 +235,7 @@ function NewDub({ onStarted }: { onStarted: (id: string) => void }) {}/**- * The price of the next step, next to its button: "≈ $8.13 + ElevenLabs v4", "Demo · free", "Free on your GPU" ("Self-hosted+ * The price of the next step, next to its button: "≈ $8.13 + ElevenLabs v4", "Placeholder · free", "Free on your GPU" ("Self-hosted* only" for a guest or an account: a dub doesn't run on their own GPU yet).*/function PriceNote({ price, loading, error, hint }: { price?: DubPrice; loading?: boolean; error?: Error | null; hint?: string }) {@@ -469,7 +471,12 @@ function ResultCard({ s, lang }: { s: DubSessionView; lang: string }) {}><video src={out.url} controls playsInline preload="metadata" className="max-h-[42vh] w-full rounded-xl bg-media object-contain" />- {g.provider === "mock" && <p className="mt-2 text-[12px] text-muted-foreground">Demo result — connect a provider (or start ComfyUI) to dub for real.</p>}+ {isPlaceholder(g) && (+ <div className="mt-2 flex flex-wrap items-center gap-2 text-[12px] text-muted-foreground">+ <PlaceholderChip g={g} />+ <span>A stand-in, not a real dub.</span>+ </div>+ )}{voiceOnly(s) && <p className="mt-2 text-[12px] text-muted-foreground">Voice only: no music or effects were separated from this clip, so the new voice plays alone.</p>}</Panel>);diff --git a/src/components/elements-view.tsx b/src/components/elements-view.tsxindex 5e562e73..2aa3e0c6 100644--- a/src/components/elements-view.tsx+++ b/src/components/elements-view.tsx@@ -252,11 +252,11 @@ function HandleCopy({ handle }: { handle: string }) {);}-/** Training, Soul ID (a LoRA that runs), Retrain (only an older Soul ID kept by reference) or Demo (only a demo training's stand-in). */+/** Training, Soul ID (a LoRA that runs), Retrain (only an older Soul ID kept by reference) or Placeholder (only a placeholder training's stand-in). */function TrainedBadge({ el }: { el: StudioElement }) {const real = el.loras.some((l) => !l.demo && !isLegacySoulId(l));const legacy = !real && el.loras.some(isLegacySoulId);- const label = el.status === "training" ? "Training" : real ? "Soul ID" : legacy ? "Retrain" : el.loras.length ? "Demo" : null;+ const label = el.status === "training" ? "Training" : real ? "Soul ID" : legacy ? "Retrain" : el.loras.length ? "Placeholder" : null;if (!label) return null;return (<spandiff --git a/src/components/faceless/controls.tsx b/src/components/faceless/controls.tsxindex 24e6e54d..f19ec7a6 100644--- a/src/components/faceless/controls.tsx+++ b/src/components/faceless/controls.tsx@@ -77,7 +77,7 @@ export function Section({ title, hint, children, className }: { title: string; hexport const usd = (n: number) => (n >= 10 ? `$${n.toFixed(0)}` : `$${n.toFixed(2)}`);/**- * "≈ $7.02" / "Demo · free" / "Free · your GPU", with what it's made of in a popover. quiet: the estimate's problem (no+ * "≈ $7.02" / "Placeholder · free" / "Free · your GPU", with what it's made of in a popover. quiet: the estimate's problem (no* narrator voice yet…) is a plain hint, not a warning: nothing has been asked of the visitor yet. A guest or an account* reads "Self-hosted only" for the open engine: Faceless and Explainer don't run on their own GPU yet.*/@@ -85,7 +85,7 @@ export function EstimateLine({ data, loading, engine, className, quiet }: { dataconst [open, setOpen] = useState(false);const visitor = useLikelyVisitor();if (!data) return <span className={cn("inline-flex items-center gap-1.5 font-mono text-[12px] text-muted-foreground", className)}>{loading && <Loader2 className="size-3 animate-spin" />}Estimating…</span>;- const price = visitor && (data.demo || engine === "open") ? "Self-hosted only" : data.demo ? "Demo · free" : engine === "open" ? "Free · your GPU" : `≈ ${usd(data.estimate.total)}${data.estimate.unknown ? "+" : ""}`;+ const price = visitor && (data.demo || engine === "open") ? "Self-hosted only" : data.demo ? "Placeholder · free" : engine === "open" ? "Free · your GPU" : `≈ ${usd(data.estimate.total)}${data.estimate.unknown ? "+" : ""}`;const parts = Object.entries(data.estimate.parts).filter(([, v]) => (v ?? 0) > 0) as [StepPart, number][];const notes = !data.error ? (data.notes ?? []) : [];return (diff --git a/src/components/faceless/episode-view.tsx b/src/components/faceless/episode-view.tsxindex 1d2f5649..45cd96af 100644--- a/src/components/faceless/episode-view.tsx+++ b/src/components/faceless/episode-view.tsx@@ -347,7 +347,7 @@ function SceneEditor({ view, scenes, onClose, onOpen }: { view: View; scenes: Sc: preview.isError? (preview.error as Error).message: preview.data- ? `Re-renders ${preview.data.labels.length} step${preview.data.labels.length === 1 ? "" : "s"} (${stepWords(preview.data.labels)})${preview.data.retime ? ", plus any scene whose timing moves" : ""} · ${preview.data.demo ? "Demo · free" : ep.settings.engine === "open" ? (visitor ? "Self-hosted only" : "Free · your GPU") : preview.data.costUsd === null ? "price unknown" : `≈ ${usd(preview.data.costUsd)}${preview.data.retime ? "+" : ""}`}`+ ? `Re-renders ${preview.data.labels.length} step${preview.data.labels.length === 1 ? "" : "s"} (${stepWords(preview.data.labels)})${preview.data.retime ? ", plus any scene whose timing moves" : ""} · ${preview.data.demo ? "Placeholder · free" : ep.settings.engine === "open" ? (visitor ? "Self-hosted only" : "Free · your GPU") : preview.data.costUsd === null ? "price unknown" : `≈ ${usd(preview.data.costUsd)}${preview.data.retime ? "+" : ""}`}`: "Pricing…"}</p><Button variant="ghost" onClick={discard} disabled={!draft}>@@ -531,7 +531,7 @@ export function EpisodeView({ id, backHref, backLabel }: { id: string; backHref:<DropdownMenuItem disabled={upscaling || action.isPending} onClick={() => run("upscale", "Upscaling to 1080p — the download switches to it when it's done")}><MonitorUp /> {upscaling ? "Upscaling to 1080p…" : "Upscale to 1080p"}<span className="ml-auto pl-3 font-mono text-[11px] text-muted-foreground tabular-nums">- {view.upscale.demo ? "Demo" : view.upscale.costUsd === null ? "" : view.upscale.costUsd === 0 ? "Free" : `≈ ${usd(view.upscale.costUsd)}`}+ {view.upscale.demo ? "Placeholder" : view.upscale.costUsd === null ? "" : view.upscale.costUsd === 0 ? "Free" : `≈ ${usd(view.upscale.costUsd)}`}</span></DropdownMenuItem>)}diff --git a/src/components/influencer/influencer-builder.tsx b/src/components/influencer/influencer-builder.tsxindex 96aef81f..e2ab9a7c 100644--- a/src/components/influencer/influencer-builder.tsx+++ b/src/components/influencer/influencer-builder.tsx@@ -98,7 +98,7 @@ function RunInfo({ preview, loading, blocker, visitor }: { preview?: RunPreviewif (blocker) return <p className="text-[12.5px] text-destructive">{blocker}</p>;if (!preview) return <p className="h-5 text-[12.5px] text-muted-foreground">{loading ? "Pricing…" : ""}</p>;if (preview.error) return <p className="text-[12.5px] text-destructive">{preview.error}</p>;- const cost = visitor && (preview.demo || preview.costUsd === 0) ? "Self-hosted only" : preview.demo ? "Demo · free" : preview.costUsd === 0 ? "Free · your GPU" : preview.costUsd == null ? "price unknown" : `≈ $${preview.costUsd.toFixed(2)}`;+ const cost = visitor && (preview.demo || preview.costUsd === 0) ? "Self-hosted only" : preview.demo ? "Placeholder · free" : preview.costUsd === 0 ? "Free · your GPU" : preview.costUsd == null ? "price unknown" : `≈ $${preview.costUsd.toFixed(2)}`;return (<div className="space-y-0.5 text-[12.5px] text-muted-foreground" aria-live="polite"><p>diff --git a/src/components/katana/katana-studio.tsx b/src/components/katana/katana-studio.tsxindex 07bf8413..2d993130 100644--- a/src/components/katana/katana-studio.tsx+++ b/src/components/katana/katana-studio.tsx@@ -57,7 +57,7 @@ async function findCuts(src: string, duration: number, onProgress: (p: number) =/** visitor: a guest or an account, whose own GPU doesn't run Katana yet (the page says so). */const money = (usd: number | null | undefined, demo?: boolean, open?: boolean, visitor?: boolean) =>- visitor && (demo || open) ? "Self-hosted only" : demo ? "Demo · free" : open ? "Free · your GPU" : usd == null ? "Price unknown" : `≈ $${usd.toFixed(2)}`;+ visitor && (demo || open) ? "Self-hosted only" : demo ? "Placeholder · free" : open ? "Free · your GPU" : usd == null ? "Price unknown" : `≈ $${usd.toFixed(2)}`;/** Katana: rebuild a reference edit with your subject, shot for shot. */export function KatanaStudio() {@@ -415,7 +415,7 @@ function Runs({ jobs, loading }: { jobs?: KatanaJobView[]; loading: boolean }) {</div><p className="mt-0.5 text-[12px] text-muted-foreground">{j.segments.length} segment{j.segments.length === 1 ? "" : "s"} · {MOTION_MODELS[j.engine].find((x) => x.id === j.motionModel)?.label ?? j.motionModel} · {j.engine === "open" ? "Open source" : "Cloud"}- {final?.provider === "mock" ? " · demo" : ""}+ {final?.provider === "mock" ? " · placeholder" : ""}</p>{stage !== "done" && (<div className="mt-3">diff --git a/src/components/layers/editor-context.tsx b/src/components/layers/editor-context.tsxindex b2c490d8..281e3783 100644--- a/src/components/layers/editor-context.tsx+++ b/src/components/layers/editor-context.tsx@@ -134,12 +134,12 @@ export function useEditor(): EditorCtx {}/**- * "Demo · free", "Free · your GPU", "≈ $0.27" or "Price unknown". A launch price is read on the browser's clock, the day+ * "Placeholder · free", "Free · your GPU", "≈ $0.27" or "Price unknown". A launch price is read on the browser's clock, the day* the editor shows it (the editor renders once its project has loaded in the browser, never while a page prerenders).*/export function costLabel(m: LayerModelInfo | undefined, demo: boolean, usd?: number | null): string {if (!m) return "";- if (demo) return "Demo · free";+ if (demo) return "Placeholder · free";if (m.engine === "open") return "Free · your GPU";const p = m.pricing && pricingAt(m.pricing);const v = usd !== undefined ? usd : p && ["image", "request", "megapixel"].includes(p.unit) ? p.usd : null;diff --git a/src/components/library/asset-card.tsx b/src/components/library/asset-card.tsxindex 06bdfa63..8cb7ac8b 100644--- a/src/components/library/asset-card.tsx+++ b/src/components/library/asset-card.tsx@@ -311,7 +311,7 @@ export const AssetCard = memo(function AssetCard({{badges}{/* A placeholder says so on the card, past the select dot (not while selecting: a tap there selects). */}{!stack && done && !selecting && !trashed && (- <PlaceholderChip g={g} overlay className={cn("absolute top-2", audio && canHover && "group-focus-within/card:opacity-0 group-hover/card:opacity-0")} />+ <PlaceholderChip g={g} overlay className={cn("absolute top-2", audio && canHover && "group-focus-within/card:opacity-0 group-hover/card:opacity-0 focus-within:opacity-100! has-data-[state=open]:opacity-100!")} />)}<SelectDot selected={selected} visible={selecting} onToggle={(s) => api.toggle(entry.key, ids, s)} label={`Select ${title}`} />{actions}diff --git a/src/components/marketing/click-to-ad.tsx b/src/components/marketing/click-to-ad.tsxindex 85ef1d51..87f62fb0 100644--- a/src/components/marketing/click-to-ad.tsx+++ b/src/components/marketing/click-to-ad.tsx@@ -223,7 +223,7 @@ export function ClickToAd({ models }: { models: Record<string, ModelInfo> }) {);const est = useEstimate<RunEstimate>("/api/marketing/click-to-ad/estimate", body);const blocker = !product ? "Select a product or enter a product URL" : !product.images.length ? `${product.name} has no images` : !desc.trim() ? "Add a description" : est.data?.blocker;- const cost = est.data && !est.data.blocker ? (visitor && (est.data.demo || est.data.costUsd === 0) ? "Self-hosted only" : est.data.demo ? "Demo · free" : est.data.costUsd == null ? "" : `≈ ${formatCost(est.data.costUsd)}`) : "";+ const cost = est.data && !est.data.blocker ? (visitor && (est.data.demo || est.data.costUsd === 0) ? "Self-hosted only" : est.data.demo ? "Placeholder · free" : est.data.costUsd == null ? "" : `≈ ${formatCost(est.data.costUsd)}`) : "";const writeScript = async () => {if (!productId) return;diff --git a/src/components/marketing/marketing-studio.tsx b/src/components/marketing/marketing-studio.tsxindex 05347c44..e59980e1 100644--- a/src/components/marketing/marketing-studio.tsx+++ b/src/components/marketing/marketing-studio.tsx@@ -345,7 +345,7 @@ export function MarketingStudio({ models }: { models: Record<string, ModelInfo>: badSite? "Enter a valid website URL": est.data?.blocker;- const cost = est.data && !est.data.blocker ? (visitor && (est.data.demo || est.data.costUsd === 0) ? "Self-hosted only" : est.data.demo ? "Demo · free" : est.data.costUsd == null ? "" : est.data.costUsd === 0 ? "Free" : `≈ ${formatCost(est.data.costUsd)}`) : "";+ const cost = est.data && !est.data.blocker ? (visitor && (est.data.demo || est.data.costUsd === 0) ? "Self-hosted only" : est.data.demo ? "Placeholder · free" : est.data.costUsd == null ? "" : est.data.costUsd === 0 ? "Free" : `≈ ${formatCost(est.data.costUsd)}`) : "";// Until a template is picked or you start on the composer it stays slim (the attachment tiles fold// away), so the template gallery behind it stays in view.diff --git a/src/components/model3d/hooks.ts b/src/components/model3d/hooks.tsindex 94ccf8ab..e099efcd 100644--- a/src/components/model3d/hooks.ts+++ b/src/components/model3d/hooks.ts@@ -42,10 +42,10 @@ export function useRunPreview(req: GenerationRequest | null) {});}-/** "≈ $0.38", "Free on your GPU", "Demo — no provider connected" (null: not known yet). */+/** "≈ $0.38", "Free on your GPU", "Placeholder · nothing is charged" (null: not known yet). */export function priceLine(p: RunPreview | undefined): string | null {if (!p) return null;- if (p.demo) return "Demo — no provider connected, nothing is charged";+ if (p.demo) return "Placeholder · nothing is charged";if (p.engine === "open" || p.costUsd === 0) return "Free — runs on your ComfyUI";if (p.costUsd === null) return "Billed by your provider";const usd = p.costUsd < 0.01 ? "<$0.01" : `$${p.costUsd < 1 ? p.costUsd.toFixed(3).replace(/0$/, "") : p.costUsd.toFixed(2)}`;diff --git a/src/components/moodboards/create-moodboard.tsx b/src/components/moodboards/create-moodboard.tsxindex 31d3a596..45bb7474 100644--- a/src/components/moodboards/create-moodboard.tsx+++ b/src/components/moodboards/create-moodboard.tsx@@ -155,7 +155,7 @@ export function CreateMoodboardDialog({ open, onOpenChange, onCreated }: { open:: !st? `Cloud: a Recraft style from the ${n} most representative images`: demo- ? `Cloud: a Recraft style from the ${n} most representative images · demo, free`+ ? `Cloud: a Recraft style from the ${n} most representative images · placeholder, free`: fal? `Cloud: Recraft V4 Styles saves a style and draws the cover from the ${n} most representative images · ≈ $0.04 on fal`: `Cloud: no fal key, so no saved Recraft style — the ${n} most representative images are used as references`;diff --git a/src/components/photodump/steps.tsx b/src/components/photodump/steps.tsxindex 26516da2..8d68205d 100644--- a/src/components/photodump/steps.tsx+++ b/src/components/photodump/steps.tsx@@ -46,7 +46,7 @@ export function RunLine({ preview, loading }: { preview?: { modelName?: string;const visitor = useLikelyVisitor();if (!preview) return <p className="h-5 text-[12.5px] text-muted-foreground">{loading ? "Pricing…" : ""}</p>;if (preview.error) return <p className="text-[12.5px] text-destructive">{preview.error}</p>;- const cost = visitor && (preview.demo || preview.costUsd === 0) ? "Self-hosted only" : preview.demo ? "Demo · free" : preview.costUsd === 0 ? "Free · your GPU" : preview.costUsd == null ? "price unknown" : `≈ $${preview.costUsd.toFixed(2)}`;+ const cost = visitor && (preview.demo || preview.costUsd === 0) ? "Self-hosted only" : preview.demo ? "Placeholder · free" : preview.costUsd === 0 ? "Free · your GPU" : preview.costUsd == null ? "price unknown" : `≈ $${preview.costUsd.toFixed(2)}`;return (<div className="space-y-0.5 text-[12.5px] text-muted-foreground"><p>diff --git a/src/components/shorts/session-view.tsx b/src/components/shorts/session-view.tsxindex 1846244c..36343143 100644--- a/src/components/shorts/session-view.tsx+++ b/src/components/shorts/session-view.tsx@@ -311,7 +311,7 @@ function SegmentCard({}) {const primary = gens[seg.primary];const video = videoOf(primary);- const price = demo ? "Demo · free" : cost === null ? "" : cost === 0 ? "Free" : `≈ ${formatCost(cost)}`;+ const price = demo ? "Placeholder · free" : cost === null ? "" : cost === 0 ? "Free" : `≈ ${formatCost(cost)}`;return (<article className="min-w-0 rounded-2xl border bg-background p-3 sm:p-4" aria-label={`Segment ${index + 1}`}><div className="flex items-center gap-2">diff --git a/src/components/shorts/ui.tsx b/src/components/shorts/ui.tsxindex 0fdd18e7..203b0cd9 100644--- a/src/components/shorts/ui.tsx+++ b/src/components/shorts/ui.tsx@@ -231,13 +231,13 @@ export function Steps({ steps, current, className }: { steps: string[]; current:}/**- * "≈ $0.42", "Demo · free", "Free · your GPU". visitor: a guest or an account, whose GPU these tools don't run on yet+ * "≈ $0.42", "Placeholder · free", "Free · your GPU". visitor: a guest or an account, whose GPU these tools don't run on yet* (the page says why): "Self-hosted only", a demo's price too, since its button is off.*/export function costText(e: { costUsd: number | null; demo: boolean } | undefined, engine: "cloud" | "open", visitor?: boolean): string {if (!e) return "…";if (visitor && (e.demo || engine === "open")) return "Self-hosted only";- if (e.demo) return "Demo · free";+ if (e.demo) return "Placeholder · free";if (engine === "open") return "Free · your GPU";if (e.costUsd === null) return "Price unknown";if (e.costUsd === 0) return "Free";diff --git a/src/components/skills/skill-builder.tsx b/src/components/skills/skill-builder.tsxindex b4c3293f..f0f8114f 100644--- a/src/components/skills/skill-builder.tsx+++ b/src/components/skills/skill-builder.tsx@@ -362,7 +362,7 @@ function statusLine(c: CheckState | null, busy: "check" | "save" | null, own: stfunction priceOf(e: DraftCheckResult["engines"][number]): string {if (!e.plan.ok) return "doesn't run";- if (e.plan.demo) return "demo, free";+ if (e.plan.demo) return "placeholder, free";if (e.plan.total === null) return "price varies";if (e.plan.total === 0) return "Free";return formatCost(e.plan.total);diff --git a/src/components/studio/feed.tsx b/src/components/studio/feed.tsxindex 9dfd7dde..a0427973 100644--- a/src/components/studio/feed.tsx+++ b/src/components/studio/feed.tsx@@ -233,7 +233,7 @@ const OutputTile = memo(function OutputTile({ g, index, ratio, layered, count }:<PlaceholderChipg={g}overlay- className={cn("absolute", o.kind === "text" ? "bottom-2" : o.draftId ? "top-11" : "top-2", audio && canHover && "group-focus-within/tile:opacity-0 group-hover/tile:opacity-0")}+ className={cn("absolute", o.kind === "text" ? "bottom-2" : o.draftId ? "top-11" : "top-2", audio && canHover && "group-focus-within/tile:opacity-0 group-hover/tile:opacity-0 focus-within:opacity-100! has-data-[state=open]:opacity-100!")}/>{g.favorite && <Heart className={cn("absolute top-2 right-2 size-4 fill-highlight text-highlight drop-shadow", audio && canHover && "group-focus-within/tile:opacity-0 group-hover/tile:opacity-0")} />}{canHover && hot === "bar" && (@@ -324,7 +324,7 @@ export const GenerationGroup = memo(function GenerationGroup({ g, newest }: { g:<p className="mt-0.5 flex flex-wrap items-center gap-x-1.5 text-[12px] text-muted-foreground"><span className="inline-flex items-center gap-1">{g.engine === "open" ? <Cpu className="size-3" /> : <Cloud className="size-3" />}- {g.provider === "mock" ? "Demo" : g.provider === "local" ? "Browser" : g.engine === "open" ? "Open source" : "Cloud"}+ {g.provider === "mock" ? "Placeholder" : g.provider === "local" ? "Browser" : g.engine === "open" ? "Open source" : "Cloud"}</span>{meta.map((m, i) => (<span key={i} className="before:mr-1.5 before:content-['·']">diff --git a/src/components/studio/result-media.tsx b/src/components/studio/result-media.tsxindex 5c539002..0b6151c2 100644--- a/src/components/studio/result-media.tsx+++ b/src/components/studio/result-media.tsx@@ -27,7 +27,7 @@ export function MediaThumb({autoPlay?: boolean;/** Letterbox instead of crop (Library "Fit"). */fit?: boolean;- /** A small badge ("Demo") a text card shows in its own header row, where it can't cover the label. */+ /** A small badge ("Placeholder") a text card shows in its own header row, where it can't cover the label. */tag?: string;/** Room at the end of a text card's header for a control in the tile's top-right corner (the feed's ⋯ or heart). */inset?: boolean;diff --git a/src/components/studio/viewer.tsx b/src/components/studio/viewer.tsxindex 31d58f79..5ab74221 100644--- a/src/components/studio/viewer.tsx+++ b/src/components/studio/viewer.tsx@@ -84,7 +84,7 @@ function Details({ g, index }: { g: Generation; index: number }) {</div><div className="divide-y rounded-lg border px-3"><Row label="Model" value={g.modelName ?? g.modelId} />- <Row label="Engine" value={g.provider === "mock" ? "Demo" : g.provider === "local" ? "In your browser" : g.engine === "open" ? "Open source · ComfyUI" : `Cloud · ${g.provider}`} />+ <Row label="Engine" value={g.provider === "mock" ? "Placeholder" : g.provider === "local" ? "In your browser" : g.engine === "open" ? "Open source · ComfyUI" : `Cloud · ${g.provider}`} /><Row label="Mode" value={OPERATION_LABELS[g.op]} /><Row label={g.modelId.startsWith("fuobe-soul") ? "Look" : "Preset"} value={g.presetName} /><Row label="Finish" value={finishText(g.outputs[index])} />diff --git a/src/components/swap-studio/parts.tsx b/src/components/swap-studio/parts.tsxindex 05985162..7bf15282 100644--- a/src/components/swap-studio/parts.tsx+++ b/src/components/swap-studio/parts.tsx@@ -9,9 +9,9 @@ import { cn } from "@/lib/utils";/** Small pieces shared by Character Swap Studio's stages. */-/** "≈ $0.38", "Free · your GPU", "Demo · free", "Price unknown". */+/** "≈ $0.38", "Free · your GPU", "Placeholder · free", "Price unknown". */export function priceText(costUsd: number | null | undefined, o: { demo?: boolean; engine: Engine }): string {- if (o.demo) return "Demo · free";+ if (o.demo) return "Placeholder · free";if (o.engine === "open") return "Free · your GPU";if (costUsd === undefined) return "…";if (costUsd === null) return "Price unknown";diff --git a/src/components/turnaround/turnaround-dialog.tsx b/src/components/turnaround/turnaround-dialog.tsxindex c47a13a2..f06e82fe 100644--- a/src/components/turnaround/turnaround-dialog.tsx+++ b/src/components/turnaround/turnaround-dialog.tsx@@ -214,7 +214,7 @@ function TurnaroundForm({ pictures, name, realPerson: realDefault = false, elemeif (k === "sheet") setSheet(url);else setViews((v) => ({ ...v, [k]: url }));};- const price = !p ? "" : p.demo ? "Demo · free" : engine === "open" ? `Free · on your GPU${p.gpuGb ? `, about ${p.gpuGb} GB` : ""}` : p.costUsd != null ? `≈ ${formatCost(p.costUsd)}` : "";+ const price = !p ? "" : p.demo ? "Placeholder · free" : engine === "open" ? `Free · on your GPU${p.gpuGb ? `, about ${p.gpuGb} GB` : ""}` : p.costUsd != null ? `≈ ${formatCost(p.costUsd)}` : "";const heading = headingOf({ title, flyAround, name });return (diff --git a/src/lib/av/dub.ts b/src/lib/av/dub.tsindex fc6b5a1b..41568f5e 100644--- a/src/lib/av/dub.ts+++ b/src/lib/av/dub.ts@@ -405,9 +405,9 @@ export interface DubPrice {steps: number;}-/** The price as one short line: "≈ $8.13 + ElevenLabs v4", "Demo · free", "Free on your GPU". */+/** The price as one short line: "≈ $8.13 + ElevenLabs v4", "Placeholder · free", "Free on your GPU". */export function priceLine(p: DubPrice): string {- if (p.demo) return "Demo · free";+ if (p.demo) return "Placeholder · free";if (p.engine === "open") return "Free on your GPU";const usd = p.costUsd > 0 && p.costUsd < 0.01 ? "< $0.01" : `≈ $${p.costUsd.toFixed(2)}`;return p.unpriced.length ? `${usd} + ${p.unpriced.join(" + ")}` : usd;diff --git a/src/lib/composer.ts b/src/lib/composer.tsindex c7f1c24b..22490cdf 100644--- a/src/lib/composer.ts+++ b/src/lib/composer.ts@@ -1128,7 +1128,7 @@ export function toggleIn(list: string[], id: string): string[] {// Cost hintexport function costLabel(s: { demo: boolean; cost: number | null; compact?: boolean; unknown?: boolean }, format: (usd: number) => string): string {- if (s.demo) return s.compact ? "Demo" : "Demo · free";+ if (s.demo) return s.compact ? "Placeholder" : "Placeholder · free";if (s.cost === 0) return "Free";if (s.cost != null) return `≈ ${format(s.cost)}`;// A price the provider hasn't published (fal's MOSS-Image with LoRAs): said, never shown as free.diff --git a/src/server/assist/studio-tools.ts b/src/server/assist/studio-tools.tsindex 6f5f4f1d..7bdc281b 100644--- a/src/server/assist/studio-tools.ts+++ b/src/server/assist/studio-tools.ts@@ -11,7 +11,7 @@ import type { ChainSlot, Engine, GenerationRequest, Operation } from "@/lib/cataimport { TOOL_MODELS } from "@/lib/layers";import { createPipeline, type PipelineStep } from "../chains";import { db } from "../db";-import { chooseRoute, createGenerations, outputKind, previewChained } from "../generations";+import { chooseRoute, ConnectComfyError, createGenerations, outputKind, previewChained } from "../generations";import { engineMode } from "../settings";import { fileUrl, saveFile } from "../storage";import { defineTool, type JobPlace, type ToolContext, type ToolOutcome } from "./define";@@ -262,13 +262,17 @@ function dubSteps(i: DubToolInput, ctx: ToolContext): PipelineStep[] {const NEEDS_SAMPLE ="Add a voice sample for the narrator: open-source narration clones a voice. Attach or record 10–60 s of clear speech (or use a saved voice), then pass it as voice_sample.";-/** Whether a model's operation would run as a demo right now (no provider connected). */+/**+ * Whether a model's operation would run as a placeholder right now. Nothing connected that runs it (placeholders off)+ * throws the ConnectComfyError: the answer is to connect something, not to add a voice sample.+ */function runsAsDemo(modelId: string, op: Operation): boolean {const m = getModel(modelId);if (!m) return false;try {return chooseRoute(routesFor(m, op)).demo;- } catch {+ } catch (e) {+ if (e instanceof ConnectComfyError) throw e;return false;}}diff --git a/src/server/audio-tools.ts b/src/server/audio-tools.tsindex 585526ac..59956ad7 100644--- a/src/server/audio-tools.ts+++ b/src/server/audio-tools.ts@@ -5,7 +5,7 @@ import { CLOUD_ONLY_PROBLEM, DBS_MODELS, dbsChannelsFor, hostPick, missingDbs, pimport type { Engine, Generation } from "@/lib/catalog/types";import { lastGpuDevice } from "./account-gpu";import { createPipeline } from "./chains";-import { previewChained } from "./generations";+import { ConnectComfyError, previewChained } from "./generations";import { comfyDbsModels, comfyDevice, ownGpu } from "./providers/comfyui";import { engineMode } from "./settings";import { storedMedia } from "./storage";@@ -147,6 +147,7 @@ export async function previewAudioTool(body: AudioToolRequest): Promise<AudioTootry {r = previewChained(s.chain ? { ...s.request, chain: s.chain } : s.request, s.after?.length ?? 0);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new AudioToolError((e as Error).message);}demo ||= r.demo;@@ -184,6 +185,7 @@ export async function runAudioTool(body: AudioToolRequest): Promise<{ batchId: sconst run = createPipeline(p.steps.map((s) => ({ key: s.key, request: s.request, ...(s.after && { after: s.after }), ...(s.chain && { chain: s.chain }) })));return { batchId: run.batchId, result: run.byKey[p.steps[p.steps.length - 1].key], items: run.items };} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new AudioToolError((e as Error).message);}}diff --git a/src/server/cinema-generate.ts b/src/server/cinema-generate.tsindex b2a4ee8a..2abeec4e 100644--- a/src/server/cinema-generate.ts+++ b/src/server/cinema-generate.ts@@ -15,7 +15,7 @@ import {} from "@/lib/catalog/cinema";import type { Generation, GenerationRequest } from "@/lib/catalog/types";import { CinemaError, folderExists, getProject, recordTakes, spentUsd } from "./cinema";-import { createGenerations, previewGeneration } from "./generations";+import { ConnectComfyError, createGenerations, previewGeneration } from "./generations";import { encodePng } from "./png";import { engineMode, getSetting } from "./settings";import { saveFile } from "./storage";@@ -74,6 +74,7 @@ function previewSteps(steps: CinemaStep[]): Preview[] {try {return previewGeneration(withPlaceholders(s));} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new CinemaError((e as Error).message, 422);}});@@ -163,6 +164,7 @@ export function generateInProject(projectId: string, input: CinemaRequest, folde} catch (e) {// Keep what already started visible in the project, then report the step that failed.recordTakes(projectId, all, folder, take);+ if (e instanceof ConnectComfyError) throw e;throw new CinemaError((e as Error).message, 422);}recordTakes(projectId, all, folder, take);diff --git a/src/server/cinema-schemas.ts b/src/server/cinema-schemas.tsindex e389d6fe..6fc163ae 100644--- a/src/server/cinema-schemas.ts+++ b/src/server/cinema-schemas.ts@@ -3,6 +3,8 @@ import { z } from "zod";import { DISTANCE, MAX_KEYS } from "@/lib/camera-path";import { APERTURE, LENS } from "@/lib/scene3d";import { CinemaError } from "./cinema";+import { connectRefusal } from "./connect-refusal";+import { ConnectComfyError } from "./generations";import { TurnaroundSchema } from "./turnaround";/** Request bodies of /api/cinema/** (zod drops unknown keys). */@@ -154,11 +156,13 @@ export async function body<S extends z.ZodType>(request: Request, schema: S, mes}/** Turn thrown errors into the API's `{ error }` responses. */-export async function handle(fn: () => Promise<Response> | Response): Promise<Response> {+export async function handle(fn: () => Promise<Response> | Response, request?: Request): Promise<Response> {try {return await fn();} catch (e) {if (e instanceof CinemaError) return Response.json({ error: e.message }, { status: e.status });+ // A run nothing connected can make: the connect card in the owner's browser (src/server/connect-refusal.ts).+ if (e instanceof ConnectComfyError) return (request && connectRefusal(e, request)) || Response.json({ error: e.message }, { status: 422 });console.error("[cinema]", e);return Response.json({ error: (e as Error).message || "Something went wrong" }, { status: 500 });}diff --git a/src/server/cinema.ts b/src/server/cinema.tsindex 00657c24..629f9cca 100644--- a/src/server/cinema.ts+++ b/src/server/cinema.ts@@ -4,7 +4,7 @@ import { getModel } from "@/lib/catalog";import type { CinemaFolder, CinemaItem, CinemaProject, CinemaTakeInfo, CinemaTile, DirectorMessage, DirectorSettings } from "@/lib/catalog/cinema";import type { Generation, GenerationRequest } from "@/lib/catalog/types";import { db } from "./db";-import { createGenerations, getGeneration, listGenerations, previewChained, previewGeneration, toGeneration } from "./generations";+import { ConnectComfyError, createGenerations, getGeneration, listGenerations, previewChained, previewGeneration, toGeneration } from "./generations";import { trashGenerations } from "./library";/**@@ -672,6 +672,7 @@ export function retryItem(projectId: string, generationId: string): Generation[]if (p.deps.length) previewChained(p.req, p.deps.length);else previewGeneration(p.req);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new CinemaError((e as Error).message, 422);}}@@ -689,6 +690,7 @@ export function retryItem(projectId: string, generationId: string): Generation[]recordTakes(projectId, made, p.s.row.folder_id, parse<ItemMeta>(p.s.row.meta_json, {}).take);}} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new CinemaError((e as Error).message, 422);}const replaced = order.filter((s) => BROKEN.has(s.g.status) || waiting(s.g, s.deps)).map((s) => s.g.id);diff --git a/src/server/connect-refusal.ts b/src/server/connect-refusal.tsnew file mode 100644index 00000000..10a666c0--- /dev/null+++ b/src/server/connect-refusal.ts@@ -0,0 +1,30 @@+import "server-only";+import { CONNECT_GPU_HEADER, CONNECT_NEEDS_HEADER } from "@/lib/guest-access";+import { requestViewer, validToken } from "./auth";+import { ConnectComfyError, type ConnectNeeds } from "./generations";++/**+ * What would run a refused run, when the refusal should open the connect card: nothing connected runs it, ComfyUI or a+ * key could (placeholder results off), and the request is the owner's own browser (never a script's token, which has no+ * page to open a card on, and never a price check). Otherwise null.+ */+export function connectNeeds(e: unknown, request: Request, preview = false): ConnectNeeds | null {+ if (!(e instanceof ConnectComfyError) || preview) return null;+ if (validToken(request.headers.get("authorization"))) return null;+ return requestViewer(request).kind === "owner" ? e.needs : null;+}++/**+ * The 422 that opens the connect card in the owner's browser (src/lib/api.ts watchGuestRefusals), with the way or ways+ * that would run it; the run starts once one is connected. Null when the error is anything else.+ */+export function connectRefusal(e: unknown, request: Request, preview = false): Response | null {+ const needs = connectNeeds(e, request, preview);+ if (!needs) return null;+ return Response.json({ error: (e as Error).message, code: "connect-gpu", needs }, { status: 422, headers: { [CONNECT_GPU_HEADER]: "1", [CONNECT_NEEDS_HEADER]: needs } });+}++/** A route's refused run as `{ error }`: the connect card when connecting something would run it, else `status`. */+export function refusedRun(e: unknown, request: Request, status = 422): Response {+ return connectRefusal(e, request) ?? Response.json({ error: (e as Error).message }, { status });+}diff --git a/src/server/content-factory.ts b/src/server/content-factory.tsindex 93ed38f7..9fa18ee3 100644--- a/src/server/content-factory.ts+++ b/src/server/content-factory.ts@@ -893,13 +893,13 @@ export const ReferenceSchema = z.union([]);/** The faceless API's `{ error }` responses, plus `needsUpload` when a link gave no clip. */-export async function handle(fn: () => Promise<Response> | Response): Promise<Response> {+export async function handle(fn: () => Promise<Response> | Response, request?: Request): Promise<Response> {try {return await fn();} catch (e) {if (e instanceof NeedsUpload) return Response.json({ error: e.message, needsUpload: true }, { status: e.status });return facelessHandle(() => {throw e;- });+ }, request);}}diff --git a/src/server/evolution.ts b/src/server/evolution.tsindex 84f8a83d..5d502b71 100644--- a/src/server/evolution.ts+++ b/src/server/evolution.ts@@ -22,7 +22,7 @@ import type { Engine, Generation } from "@/lib/catalog/types";import { ACCESS_PLACE } from "@/lib/model-access";import { createPipeline } from "./chains";import { llmText, llmTextBackend } from "./enhance";-import { previewChained } from "./generations";+import { ConnectComfyError, previewChained } from "./generations";import { isOffered, offeredModel } from "./model-access";import { probeOllama } from "./providers/llm";import { engineMode, getSetting } from "./settings";@@ -220,6 +220,7 @@ function price(steps: PlanStep[]): { costUsd: number | null; demo: boolean } {try {p = previewChained(withChain(s), s.after?.length ?? 0);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}demo ||= p.demo;@@ -281,6 +282,7 @@ export async function createEvolution(body: z.infer<typeof EvolutionBodySchema>)try {p = createPipeline(plan.steps);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}return { final: p.byKey[plan.final], items: p.items, direction, by };diff --git a/src/server/faceless.ts b/src/server/faceless.tsindex de6ce752..4c1d4b40 100644--- a/src/server/faceless.ts+++ b/src/server/faceless.ts@@ -85,7 +85,8 @@ import { DocxError, docxText } from "./assist/docx";import { PdfError, pdfText } from "./assist/pdf";import { db } from "./db";import { listElements } from "./elements";-import { cancelGeneration, chooseRoute, createGenerations, getGeneration, previewChained } from "./generations";+import { connectRefusal } from "./connect-refusal";+import { cancelGeneration, chooseRoute, ConnectComfyError, createGenerations, getGeneration, previewChained } from "./generations";import { provider } from "./providers";import type { JsonSpec } from "./llm";import { llmBackends, probeLocal } from "./providers/llm";@@ -713,13 +714,17 @@ function demoVoice(): string {return saveFile({ data: buf, contentType: "audio/wav", name: "fuobe-demo-voice.wav", source: "upload" }).url;}-/** Whether a model's operation would run as a demo right now. */+/**+ * Whether a model's operation would run as a placeholder right now. Nothing connected that runs it (placeholders off)+ * throws the ConnectComfyError, so the caller says to connect something rather than ask for what the real run needs.+ */function runsAsDemo(modelId: string, op: GenerationRequest["op"]): boolean {const m = getModel(modelId);if (!m || !op) return true;try {return chooseRoute(routesFor(m, op)).demo;- } catch {+ } catch (e) {+ if (e instanceof ConnectComfyError) throw e;return false;}}@@ -753,6 +758,7 @@ function buildGraph(ep: FacelessEpisode, blocks = ep.script.blocks, stillEdits?:return buildEpisodeGraph(graphInput(ep, blocks, stillEdits), getModel);} catch (e) {if (e instanceof FacelessError) throw e;+ if (e instanceof ConnectComfyError) throw e;throw new FacelessError((e as Error).message, 422);}}@@ -768,6 +774,7 @@ function validate(steps: GraphStep[]): void {try {return { label: s.label, ...previewStep(s) };} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new FacelessError(`${s.label}: ${(e as Error).message}`, 422);}});@@ -800,6 +807,7 @@ function relaunch(graph: GraphStep[], ids: Record<string, string>, rerun: string}} catch (e) {for (const g of made) void cancelGeneration(g.id);+ if (e instanceof ConnectComfyError) throw e;throw new FacelessError((e as Error).message, 422);}return next;@@ -1072,7 +1080,12 @@ function upscaleOffer(ep: FacelessEpisode, seconds: number): EpisodeView["upscalconst modelId = ENGINE_MODELS[ep.settings.engine].upscale;const model = modelId ? getModel(modelId) : undefined;if (!model) return null;- const demo = runsAsDemo(model.id, "upscale-video");+ let demo = false;+ try {+ demo = runsAsDemo(model.id, "upscale-video");+ } catch {+ // Nothing connected runs the upscale yet: offered at its price, and the click opens the connect card.+ }const p = model.pricing && pricingAt(model.pricing);const costUsd = demo || model.engine === "open" ? 0 : p?.unit === "megapixel" ? Math.round(p.usd * UPSCALE_MP * UPSCALE_FPS * seconds * 100) / 100 : p?.unit === "second" ? Math.round(p.usd * seconds * 100) / 100 : null;return { costUsd, demo };@@ -1094,6 +1107,7 @@ export function upscaleEpisode(id: string): FacelessEpisode {{ batchId: ep.plan.batchId, dependsOn: final.id },);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new FacelessError((e as Error).message, 422);}updateEpisodeRow(id, { plan_json: JSON.stringify({ ...ep.plan, upscaled: g.id } satisfies EpisodePlan) });@@ -1533,12 +1547,16 @@ export async function body<S extends z.ZodType>(request: Request, schema: S, mesreturn parsed.data;}-/** Turn thrown errors into the API's `{ error }` responses. */-export async function handle(fn: () => Promise<Response> | Response): Promise<Response> {+/**+ * Turn thrown errors into the API's `{ error }` responses. With the `request`, a run nothing connected can make opens+ * the connect card in the owner's browser (src/server/connect-refusal.ts) instead of an error.+ */+export async function handle(fn: () => Promise<Response> | Response, request?: Request): Promise<Response> {try {return await fn();} catch (e) {if (e instanceof FacelessError) return Response.json({ error: e.message }, { status: e.status });+ if (e instanceof ConnectComfyError) return (request && connectRefusal(e, request)) || Response.json({ error: e.message }, { status: 422 });console.error("[faceless]", e);return Response.json({ error: (e as Error).message || "Something went wrong" }, { status: 500 });}diff --git a/src/server/genjutsu.ts b/src/server/genjutsu.tsindex d7e930cd..e479c1e2 100644--- a/src/server/genjutsu.ts+++ b/src/server/genjutsu.ts@@ -46,7 +46,7 @@ import type { Engine, Generation, PixelPoint, ProviderId } from "@/lib/catalog/timport { silenceWriter } from "./canvas";import { createPipeline } from "./chains";import { llmText, llmTextBackend } from "./enhance";-import { createGenerations, previewChained } from "./generations";+import { ConnectComfyError, createGenerations, previewChained } from "./generations";import { localLabel } from "./llm";import { isOffered, offeredLoras, offeredModel } from "./model-access";import { provider } from "./providers";@@ -427,6 +427,7 @@ function price(steps: PlanStep[], input: GenjutsuPlanInput): { costUsd: number |modes.push({ step: s, demo: true });continue;}+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}modes.push({ step: s, demo: p.demo });@@ -474,6 +475,7 @@ export async function estimateGenjutsu(body: GenjutsuBody): Promise<GenjutsuEstitry {plan = planGenjutsu(input);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}const character = body.mode === "character";@@ -508,6 +510,7 @@ export async function createGenjutsu(body: GenjutsuBody): Promise<{ final: Generreturn { final: p.byKey[plan.final], items: p.items };} catch (e) {if (e instanceof ShortsError) throw e;+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}}@@ -584,6 +587,7 @@ export function transcribeClip(body: z.infer<typeof TranscribeSchema>): { id: st});return { id: g.id, modelId };} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}}diff --git a/src/server/layers.ts b/src/server/layers.tsindex 03f1929c..1d34fdb4 100644--- a/src/server/layers.ts+++ b/src/server/layers.ts@@ -35,7 +35,7 @@ import {} from "@/lib/layers";import { createPipeline, type PipelineStep } from "./chains";import { db } from "./db";-import { cancelGeneration, getGeneration, previewGeneration } from "./generations";+import { cancelGeneration, ConnectComfyError, getGeneration, previewGeneration } from "./generations";import { firstOn } from "./model-access";import { getAsset } from "./storage";@@ -629,6 +629,7 @@ export function startJob(id: string, input: LayerJobInput): LayerJob {ids = createPipeline(steps, { batchId: `layers-${id}` }).items.map((g) => g.id);} catch (e) {if (e instanceof LayersError) throw e;+ if (e instanceof ConnectComfyError) throw e;throw new LayersError((e as Error).message || "Could not start the split");}// Starting the same tool again on the same target retires its failed or canceled run.diff --git a/src/server/mixed-media.ts b/src/server/mixed-media.tsindex 8e285ec2..409b4ca1 100644--- a/src/server/mixed-media.ts+++ b/src/server/mixed-media.ts@@ -31,7 +31,7 @@ import { sourceSeconds, takesImage } from "@/lib/catalog/shorts-models";import type { Engine, Generation, ProviderId } from "@/lib/catalog/types";import { createPipeline } from "./chains";import { db } from "./db";-import { DROPPED_UNUSED, getGeneration, previewChained, unfilledRequest, waitedOnFailure } from "./generations";+import { ConnectComfyError, DROPPED_UNUSED, getGeneration, previewChained, unfilledRequest, waitedOnFailure } from "./generations";import { withoutMissingOnComfy, withoutUnreachableCivitai } from "./loras";import { comfyLoraFiles, probeComfy } from "./providers/comfyui";import { engineMode, getSetting } from "./settings";@@ -262,6 +262,7 @@ function run(steps: PlanStep[], opts: { existing?: Record<string, string> } = {}try {return createPipeline(steps, opts);} catch (e) {+ if (e instanceof ConnectComfyError) throw e;throw new ShortsError((e as Error).message, 422);}}diff --git a/src/server/providers/mock.ts b/src/server/providers/mock.tsindex b9c131a3..0f466231 100644--- a/src/server/providers/mock.ts+++ b/src/server/providers/mock.ts@@ -117,7 +117,7 @@ function demoLayers(prompt: string, aspectRatio: string, n: number): DemoOutput[const { w, h } = canvas(aspectRatio);const hue = Math.floor(rng(hash(`${prompt}#layers`))() * 360);const layer = (body: string) => `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}">${body}</svg>`;- const label = escapeXml(prompt.split(/\s+/).slice(0, 3).join(" ") || "Demo");+ const label = escapeXml(prompt.split(/\s+/).slice(0, 3).join(" ") || "Placeholder");const all: { name: string; box: number[]; draw: (b: number[]) => string }[] = [{ name: "Subject", box: [w * 0.28, h * 0.22, w * 0.44, h * 0.6], draw: (b) => `<ellipse cx="${b[0] + b[2] / 2}" cy="${b[1] + b[3] / 2}" rx="${b[2] / 2}" ry="${b[3] / 2}" fill="oklch(0.72 0.17 ${(hue + 40) % 360})"/>` },{ name: "Prop", box: [w * 0.08, h * 0.62, w * 0.26, h * 0.3], draw: (b) => `<rect x="${b[0]}" y="${b[1]}" width="${b[2]}" height="${b[3]}" rx="28" fill="oklch(0.8 0.14 ${(hue + 150) % 360})"/>` },diff --git a/src/server/shorts-schemas.ts b/src/server/shorts-schemas.tsindex 7c981d3c..cbbbbac5 100644--- a/src/server/shorts-schemas.ts+++ b/src/server/shorts-schemas.ts@@ -2,6 +2,7 @@ import "server-only";import { z } from "zod";import { MIXED } from "@/lib/catalog/mixed-media";import { SHORTS } from "@/lib/catalog/shorts";+import { connectRefusal } from "./connect-refusal";import { ShortsError } from "./shorts";/** Request bodies for /api/shorts/** and /api/mixed-media/** (zod), and the shared error answer. */@@ -117,10 +118,11 @@ export function once<T>(scope: string, id: string | undefined, fn: () => Promise}/** Run a route body, answering errors as `{ error }`. */-export async function handle(fn: () => Promise<Response> | Response): Promise<Response> {+export async function handle(fn: () => Promise<Response> | Response, request?: Request): Promise<Response> {try {return await fn();} catch (e) {- return errorResponse(e);+ // A run nothing connected can make: the connect card in the owner's browser (src/server/connect-refusal.ts).+ return (request && connectRefusal(e, request)) || errorResponse(e);}}diff --git a/tests/assist-context.test.ts b/tests/assist-context.test.tsindex c7b10956..c0f287e9 100644--- a/tests/assist-context.test.ts+++ b/tests/assist-context.test.ts@@ -386,7 +386,15 @@ describe("studio tools", () => {// No sample on a real open engine: the card says what to add and can't run, in Faceless Studio// and in the pipeline it falls back to (a square episode).setSetting("demoMode", "off");+ const g = globalThis as unknown as { __fuobeComfyReach?: { ok: boolean; at: number; url: string } };+ const before = g.__fuobeComfyReach;try {+ // Nothing connected: the card says to connect ComfyUI first, not to add a sample it couldn't use yet.+ const none = plan("faceless_episode", { scenes, style: "flat 2D" }, "open");+ expect(none.jobs.find((j) => j.error)?.error ?? none.error).toMatch(/Connect ComfyUI in Settings/);+ expect(planRunnable(none.jobs)).toBe(false);+ // A ComfyUI that answers: now the sample is what's missing.+ g.__fuobeComfyReach = { ok: true, at: Date.now(), url: "http://127.0.0.1:9" };const p = plan("faceless_episode", { scenes, style: "flat 2D" }, "open");expect(p.studio).toBe("Faceless Studio");expect(p.jobs.find((j) => j.error)?.error).toMatch(/Pick the narrator's voice/);@@ -398,6 +406,7 @@ describe("studio tools", () => {expect(voice.error).toMatch(/Add a voice sample for the narrator/);expect(planRunnable(square.jobs)).toBe(false);} finally {+ g.__fuobeComfyReach = before;setSetting("demoMode", "auto");}// A sample is cloned on either engine; the cloud engine otherwise uses a premade voice.diff --git a/tests/av-dub.test.ts b/tests/av-dub.test.tsindex dd549b6f..09789c5f 100644--- a/tests/av-dub.test.ts+++ b/tests/av-dub.test.ts@@ -446,7 +446,7 @@ describe("dub sessions (demo mode)", () => {setSetting("falKey", "");}expect(priceLine({ engine: "open", costUsd: 0, unpriced: [], demo: false, steps: 4 })).toBe("Free on your GPU");- expect(priceLine({ engine: "cloud", costUsd: 0, unpriced: [], demo: true, steps: 4 })).toBe("Demo · free");+ expect(priceLine({ engine: "cloud", costUsd: 0, unpriced: [], demo: true, steps: 4 })).toBe("Placeholder · free");});it("cloud: a failed background split still reaches review and voices over silence (voice only)", async () => {diff --git a/tests/composer.test.ts b/tests/composer.test.tsindex a7a3d978..069bfcdb 100644--- a/tests/composer.test.ts+++ b/tests/composer.test.ts@@ -303,8 +303,8 @@ describe("model picker groups", () => {describe("cost and mentions", () => {const fmt = (n: number) => `$${n.toFixed(2)}`;it("labels the cost", () => {- expect(costLabel({ demo: true, cost: 0.4 }, fmt)).toBe("Demo · free");- expect(costLabel({ demo: true, cost: 0.4, compact: true }, fmt)).toBe("Demo");+ expect(costLabel({ demo: true, cost: 0.4 }, fmt)).toBe("Placeholder · free");+ expect(costLabel({ demo: true, cost: 0.4, compact: true }, fmt)).toBe("Placeholder");expect(costLabel({ demo: false, cost: 0 }, fmt)).toBe("Free");expect(costLabel({ demo: false, cost: 0.4 }, fmt)).toBe("≈ $0.40");expect(costLabel({ demo: false, cost: null }, fmt)).toBe("");diff --git a/tests/connect-card-studios.test.ts b/tests/connect-card-studios.test.tsnew file mode 100644index 00000000..168221ec--- /dev/null+++ b/tests/connect-card-studios.test.ts@@ -0,0 +1,102 @@+import fs from "node:fs";+import os from "node:os";+import path from "node:path";+import { afterAll, beforeAll, describe, expect, it } from "vitest";+import type { EpisodeSettings, FacelessEpisode } from "@/lib/catalog/faceless";++/**+ * Placeholder results are off by default, so a studio's run with nothing connected is refused. In the owner's own+ * browser that refusal is the connect card's 422 (x-fuobe-connect-gpu, with what would run it), in every studio, not+ * only the image and video composer: never a 500, an error toast, or a request for something else first.+ */++const dir = fs.mkdtempSync(path.join(os.tmpdir(), "fuobe-connect-studios-"));+process.env.FUOBE_DATA_DIR = dir;+// Nothing listens: no ComfyUI, no local text model (the offline writer splits the script).+process.env.COMFYUI_URL = "http://127.0.0.1:9";+process.env.OLLAMA_URL = "http://127.0.0.1:9";+delete process.env.FUOBE_DEMO_MODE;+delete process.env.FAL_KEY;+delete process.env.REPLICATE_API_TOKEN;+delete process.env.ANTHROPIC_API_KEY;++const { getSetting, setSetting } = await import("@/server/settings");+const faceless = await import("@/server/faceless");+const { connectRefusal } = await import("@/server/connect-refusal");+const { ConnectComfyError } = await import("@/server/generations");+const explainerRoute = await import("@/app/api/explainer/route");+const actionRoute = await import("@/app/api/faceless/episodes/[id]/[action]/route");+const estimateRoute = await import("@/app/api/faceless/estimate/route");++beforeAll(() => setSetting("enhanceProvider", "none"));+afterAll(() => {+ globalThis.__fuobeDb?.close();+ globalThis.__fuobeDb = undefined;+ fs.rmSync(dir, { recursive: true, force: true });+});++const json = (method: string, body?: unknown) =>+ new Request("http://x/api", { method, headers: { "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body) });+const params = <T extends Record<string, string>>(p: T) => ({ params: Promise.resolve(p) });++const cloud: EpisodeSettings = {+ engine: "cloud",+ length: 30,+ animation: "animated",+ aspect: "16:9",+ subtitles: true,+ music: false,+ styleId: "editorial-motion-graphics",+ styleRefs: [],+ voice: { kind: "preset", id: "Xb7hH8MSUJpSbSDYk0k2" },+ elements: [],+};+const open: EpisodeSettings = { ...cloud, engine: "open", voice: null, aspect: "9:16", animation: "frames" };+async function written(settings: EpisodeSettings): Promise<string> {+ const res = await explainerRoute.POST(json("POST", { prompt: "How lighthouses work", review: true, settings }));+ expect(res.status).toBe(201);+ const ep: FacelessEpisode = await res.json();+ await faceless.scriptWritten(ep.id);+ return ep.id;+}++describe("a studio run with nothing connected", () => {+ it("is off by default", () => {+ expect(getSetting("demoMode")).toBe("off");+ });++ it("an open-source episode opens the connect card for a GPU, not a request for a voice sample", async () => {+ const id = await written(open);+ const res = await actionRoute.POST(json("POST"), params({ id, action: "render" }));+ expect(res.status).toBe(422);+ expect(res.headers.get("x-fuobe-connect-gpu")).toBe("1");+ expect(res.headers.get("x-fuobe-connect-needs")).toBe("gpu");+ const body = await res.json();+ expect(body).toMatchObject({ code: "connect-gpu", needs: "gpu" });+ expect(body.error).not.toMatch(/voice/i);+ // Nothing started: the episode can render once something is connected.+ expect(faceless.episodeView(id).episode.status).toBe("review");+ });++ it("a cloud episode opens the connect card for a key", async () => {+ const id = await written(cloud);+ const res = await actionRoute.POST(json("POST"), params({ id, action: "render" }));+ expect(res.status).toBe(422);+ expect(res.headers.get("x-fuobe-connect-gpu")).toBe("1");+ expect(res.headers.get("x-fuobe-connect-needs")).toBe("key");+ });++ it("the price panel says to connect something, without an error status or the card", async () => {+ const res = await estimateRoute.POST(json("POST", { kind: "explainer", settings: open, blocks: [{ id: "b1", narration: "Lighthouses guide ships.", visual: "A lighthouse at dusk", seconds: 5 }] }));+ expect(res.status).toBe(200);+ expect(res.headers.get("x-fuobe-connect-gpu")).toBeNull();+ expect((await res.json()).error).toMatch(/Connect ComfyUI in Settings/);+ });++ it("a script's token or a price check never gets the card; any other error is left alone", () => {+ const e = new ConnectComfyError("Connect ComfyUI in Settings to run this model", "gpu");+ expect(connectRefusal(e, json("POST"))?.status).toBe(422);+ expect(connectRefusal(e, json("POST"), true)).toBeNull();+ expect(connectRefusal(new Error("Something else"), json("POST"))).toBeNull();+ });+});diff --git a/tests/content-factory-api.test.ts b/tests/content-factory-api.test.tsindex 904f4f9c..0e736c7e 100644--- a/tests/content-factory-api.test.ts+++ b/tests/content-factory-api.test.ts@@ -203,11 +203,19 @@ describe("prices, Generate here and Next episode", () => {// The open engine needs a narrator's voice sample first (in demo mode the demo narrator stands in).expect(((await (await estimateRoute.POST(json("POST", { prompt: "x", settings: { ...settings, engine: "open" }, seriesId: series.id, voice: null }))).json()) as SeriesEstimate).demo).toBe(true);setSetting("demoMode", "off");+ const g = globalThis as unknown as { __fuobeComfyReach?: { ok: boolean; at: number; url: string } };+ const before = g.__fuobeComfyReach;try {- const open: SeriesEstimate = await (await estimateRoute.POST(json("POST", { prompt: "x", settings: { ...settings, engine: "open" }, seriesId: series.id, voice: null }))).json();+ const ask = async () => (await (await estimateRoute.POST(json("POST", { prompt: "x", settings: { ...settings, engine: "open" }, seriesId: series.id, voice: null }))).json()) as SeriesEstimate;+ // Nothing connected: the price says to connect ComfyUI first.+ expect((await ask()).error).toMatch(/Connect ComfyUI in Settings/);+ // A ComfyUI that answers: then the voice sample is what's missing.+ g.__fuobeComfyReach = { ok: true, at: Date.now(), url: "http://127.0.0.1:9" };+ const open = await ask();expect(open.error).toMatch(/narrator's voice/);expect(open.analysisPerMinute).toBe(0);} finally {+ g.__fuobeComfyReach = before;setSetting("demoMode", "auto");}// A length outside 30 s – 5 min is refused.diff --git a/tests/e2e/character-swap-studio.mjs b/tests/e2e/character-swap-studio.mjsindex ad1a5d07..be6e6313 100644--- a/tests/e2e/character-swap-studio.mjs+++ b/tests/e2e/character-swap-studio.mjs@@ -148,7 +148,7 @@ try {await page.getByRole("tab", { name: "Segments" }).click();await page.getByRole("button", { name: "Split", exact: true }).click();await page.getByRole("listitem", { name: "Segment 2" }).waitFor();- check("price shown before running", /Demo · free/.test(await text()));+ check("price shown before running", /Placeholder · free/.test(await text()));await page.getByRole("button", { name: "Queue all segments" }).click();await page.getByText("waits for the segment before").waitFor({ timeout: 20_000 });check("the continuing segment waits for the one before", true);diff --git a/tests/e2e/cinema-original.mjs b/tests/e2e/cinema-original.mjsindex 37dd9a6b..6912dd4c 100644--- a/tests/e2e/cinema-original.mjs+++ b/tests/e2e/cinema-original.mjs@@ -223,7 +223,7 @@ async function session(width, height, scheme) {const cast = await builder("Soul Cast: build a character");const castText = await cast.innerText();check(`${tag}: Soul Cast runs on Fuobe Soul, Realistic look, in the cloud`, /Fuobe Soul · Realistic look/.test(castText) && !/on your GPU/.test(castText), castText.match(/Fuobe[^\n]*/)?.[0] ?? "");- check(`${tag}: Soul Cast shows a price before running`, /Demo · free|Free|≈ \$/.test(castText));+ check(`${tag}: Soul Cast shows a price before running`, /Placeholder · free|Free|≈ \$/.test(castText));check(`${tag}: no sideways scroll in Soul Cast`, (await sideways()) <= 1);await shot("soul-cast");await page.keyboard.press("Escape");diff --git a/tests/e2e/cinema-path.mjs b/tests/e2e/cinema-path.mjsindex f6ae6fb5..28e5df78 100644--- a/tests/e2e/cinema-path.mjs+++ b/tests/e2e/cinema-path.mjs@@ -87,10 +87,10 @@ try {const keyframe = strip.getByRole("button", { name: "Keyframe", exact: true });const previewBtn = strip.getByRole("button", { name: "Preview" });assert.equal(await previewBtn.isDisabled(), true, "Preview waits for a second keyframe");- const film = page.getByRole("complementary").getByRole("button", { name: /^Film this path · Demo · free$/ });+ const film = page.getByRole("complementary").getByRole("button", { name: /^Film this path · Placeholder · free$/ });await film.waitFor();assert.equal(await film.isDisabled(), true, "Film waits for a path");- await page.getByRole("complementary").getByRole("button", { name: /^Capture · Demo · free/ }).waitFor();+ await page.getByRole("complementary").getByRole("button", { name: /^Capture · Placeholder · free/ }).waitFor();await noSideScroll(page, "desktop viewer");step("flying and + Keyframe / K add the pose as a chip");@@ -173,7 +173,7 @@ try {const p2 = await openScene(dark, "open");await p2.getByRole("button", { name: "Dolly in" }).click();await p2.getByText(/About 5\.1 s · 81 frames at 16 fps/).waitFor();- const openFilm = p2.getByRole("complementary").getByRole("button", { name: /^Film this path · Demo · free$/ });+ const openFilm = p2.getByRole("complementary").getByRole("button", { name: /^Film this path · Placeholder · free$/ });await shoot(p2, "path-desktop-dark-open");await openFilm.click();await p2.getByRole("complementary").getByRole("button", { name: /Rendering the path… \d+%/ }).waitFor({ timeout: 10_000 });@@ -213,7 +213,7 @@ try {await sheet.getByRole("button", { name: /^Keyframe 2: 5\.0 s/ }).waitFor();await sheet.getByRole("button", { name: "Tilted ring" }).click();await sheet.getByRole("button", { name: /^Keyframe 9: 5\.0 s · 360°/ }).waitFor();- await sheet.getByRole("button", { name: /^Film this path · Demo · free$/ }).waitFor();+ await sheet.getByRole("button", { name: /^Film this path · Placeholder · free$/ }).waitFor();await noSideScroll(p3, `phone ${scheme} sheet`);const sheetBox = await sheet.boundingBox();assert.ok(sheetBox.width <= 390, "the sheet fits the phone");diff --git a/tests/e2e/cinema-scene.mjs b/tests/e2e/cinema-scene.mjsindex 4f6b4033..f830f9b8 100644--- a/tests/e2e/cinema-scene.mjs+++ b/tests/e2e/cinema-scene.mjs@@ -74,13 +74,13 @@ try {await page.getByRole("button", { name: "Create 3D scene" }).first().click();const dialog = page.getByRole("dialog");await dialog.getByText("Cloud · Marigold V2 depth").waitFor();- await dialog.getByRole("button", { name: /Build 3D scene · Demo · free/ }).waitFor();+ await dialog.getByRole("button", { name: /Build 3D scene · Placeholder · free/ }).waitFor();await shoot(page, "scene-create-dialog");await dialog.getByRole("checkbox", { name: "Don't ask again at this price" }).click();await dialog.getByRole("button", { name: /Build 3D scene/ }).click();await page.locator("[data-sonner-toast]").filter({ hasText: "Your 3D scene is ready" }).getByRole("button", { name: "Open" }).click({ timeout: 90_000 });await page.getByText(/Point cloud from a depth map · \d+k points/).waitFor({ timeout: 60_000 });- await page.getByRole("button", { name: /^Capture · Demo · free/ }).last().waitFor();+ await page.getByRole("button", { name: /^Capture · Placeholder · free/ }).last().waitFor();step("the view flies and the frame follows the ratio");const canvas = page.locator("canvas[aria-roledescription='3D view']");@@ -115,9 +115,9 @@ try {await page.getByRole("button", { name: "Close the 3D scene" }).click();step("Don't ask again holds at this price: the next build names it in its toast, which can turn the question back on");- const quick = page.getByRole("button", { name: "Create 3D scene · Demo · free" }).last();+ const quick = page.getByRole("button", { name: "Create 3D scene · Placeholder · free" }).last();await quick.click({ force: true });- const built = page.locator("[data-sonner-toast]").filter({ hasText: "Demo · free · It appears next to the still" });+ const built = page.locator("[data-sonner-toast]").filter({ hasText: "Placeholder · free · It appears next to the still" });await built.getByRole("button", { name: "Ask first" }).click({ timeout: 30_000 });assert.equal(await page.getByRole("dialog").count(), 0, "no question while skipped");await quick.click({ force: true });diff --git a/tests/e2e/dop-flows.mjs b/tests/e2e/dop-flows.mjsindex 6a7cd774..bd044340 100644--- a/tests/e2e/dop-flows.mjs+++ b/tests/e2e/dop-flows.mjs@@ -31,7 +31,7 @@ async function uploadStart() {}const start = await uploadStart();-// Cloud prices show when a fal key is set (any key: nothing is sent to fal here); demo mode shows "Demo · free".+// Cloud prices show when a fal key is set (any key: nothing is sent to fal here); demo mode shows "Placeholder · free".const status = await (await fetch(`${app}/api/status`)).json().catch(() => ({}));const fal = !!status?.providers?.fal?.configured;if (!fal) console.log("note: no fal key on this server, so the cloud price checks are skipped (start it with FAL_KEY=anything to run them)");diff --git a/tests/e2e/genjutsu-original.mjs b/tests/e2e/genjutsu-original.mjsindex 107c4bd0..eacb4e56 100644--- a/tests/e2e/genjutsu-original.mjs+++ b/tests/e2e/genjutsu-original.mjs@@ -80,7 +80,7 @@ try {check(`${tag}: the licence line is in the picker`, /MiniMax H3 Community License — not licensed in the US, the EU, the UK and South Korea/.test(listed));check(`${tag}: each model's own licence (MIT for SCAIL-2, closed for partners)`, /SCAIL-2 weights: MIT/.test(listed) && /Closed model: pay per use/.test(listed));// The price (demo: no keys), the limits.- await page.getByText(/Demo · free|≈ \$|Price unknown/).first().waitFor({ timeout: 60_000 });+ await page.getByText(/Placeholder · free|≈ \$|Price unknown/).first().waitFor({ timeout: 60_000 });const body = await text();check(`${tag}: the limits are shown`, /One continuous shot: a hard cut breaks the swap/.test(body) && /The person must be visible in the part's first frame/.test(body));check(`${tag}: no Higgsfield anywhere`, !/higgsfield/i.test(body));diff --git a/tests/e2e/mixed-shorts-original.mjs b/tests/e2e/mixed-shorts-original.mjsindex 259945b1..d5b38d3b 100644--- a/tests/e2e/mixed-shorts-original.mjs+++ b/tests/e2e/mixed-shorts-original.mjs@@ -86,7 +86,7 @@ try {await settle();return opts;};- // The estimate (the price, "Demo · free" or "Free · your GPU"), not the trimmer's live length.+ // The estimate (the price, "Placeholder · free" or "Free · your GPU"), not the trimmer's live length.const cost = (scope) => page.locator(scope).locator('span[aria-live="polite"].font-mono').filter({ hasText: /Demo|Free|≈ \$|Price unknown/ }).first();const costShown = (scope) =>cost(scope)@@ -117,7 +117,7 @@ try {check(`${tag} · mixed: the Original's menu line shows its price`, mmOpts.some((o) => /Fuobe Mixed Media.*\$/.test(o)), mmOpts[0]);check(`${tag} · mixed: the Original's line names its recipe`, (await editor.innerText()).includes("Fuobe Original · every frame drawn again by Z-Image Turbo"));const mmCost = await costShown("#mm-editor");- check(`${tag} · mixed: the estimate shows before running (demo)`, /Demo · free/.test(mmCost), mmCost);+ check(`${tag} · mixed: the estimate shows before running (demo)`, /Placeholder · free/.test(mmCost), mmCost);check(`${tag} · mixed: frames counted before running (6 s × 8 FPS)`, /48 frames · 8 FPS/.test(await editor.innerText()));// The preview frame: one frame in the look (the Original's edit route), drawn as every frame will be.const preview = async (where) => {@@ -190,7 +190,7 @@ try {const body = await page.locator("body").innerText();check(`${tag} · shorts: the Original's line names its recipe`, body.includes("Fuobe Original · each segment's first frame is drawn in the look"));const shCost = await costShown("main");- check(`${tag} · shorts: the estimate shows before running (demo)`, /Demo · free/.test(shCost), shCost);+ check(`${tag} · shorts: the estimate shows before running (demo)`, /Placeholder · free/.test(shCost), shCost);await shot("shorts-cloud");check(`${tag} · shorts: nothing scrolls sideways (cloud)`, (await sideways()) <= 0, `${await sideways()} px`);await engine("Open source");diff --git a/tests/e2e/moss-image.mjs b/tests/e2e/moss-image.mjsindex 55e17a9c..fe87a1b2 100644--- a/tests/e2e/moss-image.mjs+++ b/tests/e2e/moss-image.mjs@@ -5,7 +5,7 @@// black-image catch shown whole; a cut note opened with "More" from the keyboard). A LoRA run's price is unknown, never// free (the preview API: no picker attaches a LoRA to MOSS yet). Each page at 1440 and 390 px, light and dark, without// sideways scroll. The prices follow the server, as /api/status says it runs: without a fal key the cloud runs are free-// demos, and without a reachable ComfyUI so are the open engine's (both "Demo · free", as every model in demo mode).+// demos, and without a reachable ComfyUI so are the open engine's (both "Placeholder · free", as every model in demo mode).// Usage: node tests/e2e/moss-image.mjs [appUrl] [--shots <dir>] [--fal] [--live] verify.sh runs it on each of its three// servers: demo mode, FAL_KEY=anything with --fal for the hosted price ($0.05, unknown with a LoRA), and the live ComfyUI// with --live for Free on your GPU. --fal and --live each fail the run when the server lacks a fal key or can't reach@@ -31,8 +31,8 @@ const fal = !!status.providers?.fal?.configured;const comfy = !!status.providers?.comfyui?.configured;// Demo mode (the default) runs a model whose providers aren't connected as a free placeholder; with it off, nothing does.const demo = status.demoMode !== "off";-if (!fal) console.log('note: no fal key on this server: the cloud composer shows "Demo · free" (start it with FAL_KEY=anything for the hosted price)');-if (!comfy) console.log('note: ComfyUI is unreachable from this server: the open engine shows "Demo · free" too (Free once it is reachable)');+if (!fal) console.log('note: no fal key on this server: the cloud composer shows "Placeholder · free" (start it with FAL_KEY=anything for the hosted price)');+if (!comfy) console.log('note: ComfyUI is unreachable from this server: the open engine shows "Placeholder · free" too (Free once it is reachable)');if (argv.includes("--fal")) check("server: a fal key is set (--fal), so the hosted price is checked", fal);if (argv.includes("--live")) check("server: ComfyUI is reachable (--live), so Free on your GPU is checked", comfy);@@ -115,7 +115,7 @@ try {const t = flat(await composer(page).innerText());check(`${tag} ${engine}: the composer now runs MOSS-Image`, /MOSS-Image/.test(t), t.slice(0, 100));const price = engine === "open" ? (comfy ? /\bFree\b/ : /Demo/) : fal ? /≈ \$0\.05\b/ : /Demo/;- check(`${tag} ${engine}: its price shows before the run`, price.test(t), (t.match(/Demo · free|Demo|≈ \$[\d.]+|\bFree\b/) ?? ["no price"])[0]);+ check(`${tag} ${engine}: its price shows before the run`, price.test(t), (t.match(/Placeholder · free|Demo|≈ \$[\d.]+|\bFree\b/) ?? ["no price"])[0]);if (engine === "open") {// Quality under Options, from the keyboard; on a phone Options is in the Settings sheet (a popover in a sheet).let scope = composer(page);diff --git a/tests/e2e/open-tools.mjs b/tests/e2e/open-tools.mjsindex 63895536..7b7c44f5 100644--- a/tests/e2e/open-tools.mjs+++ b/tests/e2e/open-tools.mjs@@ -6,8 +6,8 @@// at 1440 and 390 px, light and dark, without sideways scroll.// Usage: node tests/e2e/open-tools.mjs [appUrl] [--shots <dir>] (the app in demo mode; no run reaches a GPU or fal:// open-engine plans are previewed only). Exits 1 on a failed check. Open-engine prices say "Free" when the app reaches-// a ComfyUI and "Demo · free" when it doesn't (each check reads which from the page's own /api/status answer); cloud-// prices are fal's with a fal key (FAL_KEY=anything: nothing is sent) and "Demo · free" without.+// a ComfyUI and "Placeholder · free" when it doesn't (each check reads which from the page's own /api/status answer); cloud+// prices are fal's with a fal key (FAL_KEY=anything: nothing is sent) and "Placeholder · free" without.import fs from "node:fs";import path from "node:path";import { launch, root } from "./_browser.mjs";@@ -49,17 +49,17 @@ async function settled(query, count, timeoutMs = 60_000) {const status = (await api("/api/status")).body ?? {};const fal = !!status.providers?.fal?.configured;-if (!fal) console.log("note: no fal key on this server: cloud runs are demo runs and show \"Demo · free\" (start it with FAL_KEY=anything for hosted prices; nothing is sent)");+if (!fal) console.log("note: no fal key on this server: cloud runs are demo runs and show \"Placeholder · free\" (start it with FAL_KEY=anything for hosted prices; nothing is sent)");/**- * What an open-engine price says, by the composer's rule, for an /api/status answer: "Free" when the app reaches its- * ComfyUI (or demo mode is off, so nothing runs as a demo), else "Demo · free" (a run would be a demo run).+ * What an open-engine price says, by the composer's rule, for an /api/status answer: "Placeholder · free" while+ * placeholder results are on (Settings: every run is a placeholder then, ComfyUI connected or not), else "Free".*/const gpuPrice = (s) => {- const label = s?.providers?.comfyui?.configured || s?.demoMode === "off" ? "Free" : "Demo · free";- return { label, re: label === "Free" ? /\bFree\b/ : /Demo · free/ };+ const label = s?.demoMode === "on" ? "Placeholder · free" : "Free";+ return { label, re: label === "Free" ? /\bFree\b/ : /Placeholder · free/ };};if (gpuPrice(status).label !== "Free")- console.log("note: ComfyUI isn't reachable from this server: open-engine runs are demo runs and show \"Demo · free\" (with a ComfyUI it reaches they say \"Free\"; nothing is queued on it)");+ console.log("note: placeholder results are on (Settings): open-engine runs are placeholders and show \"Placeholder · free\" (with them off they say \"Free\"; nothing is queued on ComfyUI)");const photo = await upload("scripts/eval/fixtures/start-frame.png", "image/png", "angles.png");/** A silent 16-bit mono WAV `seconds` long (a voice track whose length the Lipsync composer reads from its header). */function wav(seconds, rate = 8000) {@@ -118,7 +118,7 @@ const open = async (page, url) => {return seen ?? status;};/** Wait until the composer shows a price (a cold dev server compiles the page first, and the engine is read after hydration). */-const priced = (page, re = /\bFree\b|Demo · free|\$\d/) =>+const priced = (page, re = /\bFree\b|Placeholder · free|\$\d/) =>page.waitForFunction((src) => new RegExp(src).test(document.querySelector("[data-composer]")?.textContent ?? ""), re.source, { timeout: 30_000 }).catch(() => {});const shoot = (page, name) => (shots ? page.screenshot({ path: path.join(shots, name) }) : undefined);/** Pick a model in the composer's model menu (search, then the item whose value ends with the id). */@@ -198,7 +198,7 @@ try {await priced(page);const t = await composerText(page);check("cloud: the Fuobe Angles app runs on Fuobe Angles", /Fuobe Angles/.test(t));- check(`cloud: its price shows before the run (${fal ? "fal's per-megapixel price" : "Demo · free"})`, fal ? /\$0\.0[34]/.test(t) : /Demo · free/.test(t), (t.match(/Demo · free|\$[\d.]+/) ?? ["no price"])[0]);+ check(`cloud: its price shows before the run (${fal ? "fal's per-megapixel price" : "Placeholder · free"})`, fal ? /\$0\.0[34]/.test(t) : /Placeholder · free/.test(t), (t.match(/Placeholder · free|\$[\d.]+/) ?? ["no price"])[0]);await shoot(page, "angles-cloud-1440.png");if (!fal) {// A demo run: the hosted route's own fields go with it.@@ -222,9 +222,9 @@ try {await page.waitForTimeout(800);const t = await composerText(page);check(- `${engine}: Fuobe Speak picked, priced before the run (${engine === "open" ? gpu.label : fal ? "fal's price" : "Demo · free"})`,- /Fuobe Speak/.test(t) && (engine === "open" ? gpu.re.test(t) : fal ? /\$0\.20/.test(t) || /\$\d/.test(t) : /Demo · free/.test(t)),- (t.match(/Demo · free|\bFree\b|\$[\d.]+(\/s)?/) ?? ["no price"])[0],+ `${engine}: Fuobe Speak picked, priced before the run (${engine === "open" ? gpu.label : fal ? "fal's price" : "Placeholder · free"})`,+ /Fuobe Speak/.test(t) && (engine === "open" ? gpu.re.test(t) : fal ? /\$0\.20/.test(t) || /\$\d/.test(t) : /Placeholder · free/.test(t)),+ (t.match(/Placeholder · free|\bFree\b|\$[\d.]+(\/s)?/) ?? ["no price"])[0],);await shoot(page, `speak-${engine}-1440.png`);await context.close();@@ -237,8 +237,8 @@ try {await priced(page);await page.waitForTimeout(1500);const t = await composerText(page);- const shown = (t.match(/Demo · free|\$[\d.]+/) ?? ["no price"])[0];- check(`cloud: Fuobe Speak with a 12 s voice is priced for 12 s (${fal ? "$2.40" : "Demo · free"})`, fal ? /\$2\.40?\b/.test(t) : /Demo · free/.test(t), shown);+ const shown = (t.match(/Placeholder · free|\$[\d.]+/) ?? ["no price"])[0];+ check(`cloud: Fuobe Speak with a 12 s voice is priced for 12 s (${fal ? "$2.40" : "Placeholder · free"})`, fal ? /\$2\.40?\b/.test(t) : /Placeholder · free/.test(t), shown);await shoot(page, "speak-voice-cloud-1440.png");await context.close();const { body } = await api("/api/generations?preview=1", { feature: "lipsync", modelId: "fuobe-speak", engine: "cloud", inputs: { images: [photo], audio: voice12 }, params: { sourceDuration: 40 } });@@ -310,7 +310,7 @@ try {await composer(page).locator("textarea, [contenteditable=true]").first().fill("A woman in a denim jacket on a rooftop at dusk");await priced(page, gpu.re);const t = await composerText(page);- check(`open: PixeletedFace on your GPU says ${gpu.label} (the mosaic too)`, /PixeletedFace/.test(t) && gpu.re.test(t), (t.match(/Demo · free|\bFree\b|\$[\d.]+/) ?? ["no price"])[0]);+ check(`open: PixeletedFace on your GPU says ${gpu.label} (the mosaic too)`, /PixeletedFace/.test(t) && gpu.re.test(t), (t.match(/Placeholder · free|\bFree\b|\$[\d.]+/) ?? ["no price"])[0]);await context.close();}diff --git a/tests/e2e/popcorn-evolution.mjs b/tests/e2e/popcorn-evolution.mjsindex 1b23a9ba..6aee9f15 100644--- a/tests/e2e/popcorn-evolution.mjs+++ b/tests/e2e/popcorn-evolution.mjs@@ -69,7 +69,7 @@ try {await page.waitForFunction(() => !document.body.innerText.includes("Uploading references"), null, { timeout: 30_000 }).catch(() => {});const direction = page.getByRole("textbox", { name: "Creative direction" });// A direction longer than the models take: the page says so as you type (the words stay out of the estimate).- await page.waitForFunction(() => /Demo · free|≈ \$|Free/.test(document.body.innerText), null, { timeout: 30_000 }).catch(() => {});+ await page.waitForFunction(() => /Placeholder · free|≈ \$|Free/.test(document.body.innerText), null, { timeout: 30_000 }).catch(() => {});await direction.fill("A night market in the rain. ".repeat(80));await page.waitForFunction(() => /Only the first 1,500 characters of the direction reach the model/.test(document.body.innerText), null, { timeout: 15_000 }).catch(() => {});check(`${tag}: a long direction is said to be cut`, /Only the first 1,500 characters of the direction reach the model/.test(await text()));@@ -80,8 +80,8 @@ try {await page.waitForFunction(() => (document.querySelector("#evolution-direction")?.value ?? "").length > 40, null, { timeout: 30_000 }).catch(() => {});const written = await direction.inputValue();check(`${tag}: the offline writer wrote the direction`, /reimagined from the ground up/.test(written) && /Written by Fuobe's offline writer/.test(await text()), JSON.stringify(written.slice(0, 50)));- await page.waitForFunction(() => /Demo · free|≈ \$|Free/.test(document.body.innerText), null, { timeout: 30_000 }).catch(() => {});- check(`${tag}: the price before it runs (a demo here)`, /Demo · free/.test(await text()) && /Fuobe Evolution · \d+(\.\d+)? s · 720p/.test(await text()));+ await page.waitForFunction(() => /Placeholder · free|≈ \$|Free/.test(document.body.innerText), null, { timeout: 30_000 }).catch(() => {});+ check(`${tag}: the price before it runs (a demo here)`, /Placeholder · free/.test(await text()) && /Fuobe Evolution · \d+(\.\d+)? s · 720p/.test(await text()));check(`${tag}: no sideways scroll (Evolution, set up)`, (await sideways()) <= 1, `${await sideways()} px`);await shot("evolution-setup");await page.getByRole("button", { name: "Evolve" }).click();@@ -137,8 +137,8 @@ try {check(`${tag}: a look is picked`, (await page.getByRole("button", { name: "Look: DigitalCam" }).count()) === 1);await page.waitForFunction(() => /Frame 1 on Fuobe Soul in the DigitalCam look/.test(document.body.innerText), null, { timeout: 15_000 }).catch(() => {});check(`${tag}: it says frame 1 is made on Fuobe Soul in the look`, /Frame 1 on Fuobe Soul in the DigitalCam look/.test(await text()));- await page.waitForFunction(() => /Demo · free/.test(document.body.innerText), null, { timeout: 15_000 }).catch(() => {});- check(`${tag}: the board's price before it runs (a demo here)`, /Demo · free/.test(await text()) && /4 frames/.test(await text()));+ await page.waitForFunction(() => /Placeholder · free/.test(document.body.innerText), null, { timeout: 15_000 }).catch(() => {});+ check(`${tag}: the board's price before it runs (a demo here)`, /Placeholder · free/.test(await text()) && /4 frames/.test(await text()));check(`${tag}: no sideways scroll (Storyboard)`, (await sideways()) <= 1, `${await sideways()} px`);await shot("storyboard-look");await page.getByRole("button", { name: "Generate storyboard" }).click();diff --git a/tests/e2e/skills-builder.mjs b/tests/e2e/skills-builder.mjsindex 9d35c6d4..b84e5a20 100644--- a/tests/e2e/skills-builder.mjs+++ b/tests/e2e/skills-builder.mjs@@ -163,7 +163,7 @@ try {const run = page.getByRole("dialog");check(`${tagLine}: the Run form has the words it was made from`, (await run.getByRole("textbox").first().inputValue()) === words.still, title);await run.getByRole("textbox").first().fill(`${tag} green ceramic vase, studio light`);- check(`${tagLine}: the run is priced first`, await seen(run.getByText(/Demo — no provider connected|Free on your GPU|on Cloud/), 30_000));+ check(`${tagLine}: the run is priced first`, await seen(run.getByText(/Placeholder · free|Free on your GPU|on Cloud/), 30_000));await run.getByRole("button", { name: /^Run/ }).click();check(`${tagLine}: Run starts it`, await seen(page.getByText("Started the run"), 30_000));const r = await api("GET", "/api/generations?limit=50&steps=1");diff --git a/tests/e2e/skills-run.mjs b/tests/e2e/skills-run.mjsindex a629ab27..243dc79b 100644--- a/tests/e2e/skills-run.mjs+++ b/tests/e2e/skills-run.mjs@@ -1,7 +1,7 @@// Skills W1 in a real browser (demo mode: no keys, ComfyUI unreachable). A skill with a recipe is seeded over the API;// its card says "Runs by itself"; /assist/skills?run=<name> opens the Run form, which asks for a free check first,// then runs it once from the form (a photo, a name, a shape) and three times from pasted CSV rows, each priced first-// ("Demo" here); a switched-off skill's form says so and switches it back on; the skill's dialog says where it was+// ("Placeholder · free" here); a switched-off skill's form says so and switches it back on; the skill's dialog says where it was// checked, and in amber that it needs a re-check after its route changed, and Re-check clears it. ⌘K lists// "Run <skill>…". At 1440 and 390 px, light and dark: nothing scrolls sideways, and on a phone the form fills the screen.// Usage: node tests/e2e/skills-run.mjs [appUrl] [--shots <dir>] (app running in demo mode). Exits 1 on a failed check.@@ -107,7 +107,7 @@ try {await dialog.getByLabel("Product name").fill("Arc floor lamp");await dialog.getByRole("radio", { name: "16:9" }).click();const priced = await dialog- .getByText(/Demo — no provider connected/)+ .getByText(/Placeholder · free/).waitFor({ timeout: 30_000 }).then(() => true).catch(() => false);@@ -133,7 +133,7 @@ try {await dialog.getByLabel("Rows to run").fill(`Product photo,Product name,Shape\n${photo},Desk lamp,1:1\n${photo},"Lamp, brass",9:16\n${photo},Floor lamp,16:9\n`);check(`${tag}: the rows are checked ("3 runs · all fine")`, await seen(dialog.getByText("3 runs · all fine")));const total = await dialog- .getByText(/Demo — no provider connected, free · 3 runs/)+ .getByText(/Placeholder · free · 3 runs/).waitFor({ timeout: 30_000 }).then(() => true).catch(() => false);diff --git a/tests/e2e/split-soundtrack.mjs b/tests/e2e/split-soundtrack.mjsindex fef7d490..8d1a752f 100644--- a/tests/e2e/split-soundtrack.mjs+++ b/tests/e2e/split-soundtrack.mjs@@ -68,8 +68,8 @@ try {check(true, `${label}: the cloud engine says Split soundtrack runs on your GPU`);await page.screenshot({ path: path.join(out, `split-cloud-${dname}-${theme}.png`), fullPage: true });await page.getByRole("button", { name: "Use open source" }).click();- await page.getByText(/Free · runs on your ComfyUI|Demo · free/).waitFor({ timeout: 20_000 });- const bar = await page.getByText(/Free · runs on your ComfyUI|Demo · free/).first().locator("..").innerText();+ await page.getByText(/Free · runs on your ComfyUI|Placeholder · free/).waitFor({ timeout: 20_000 });+ const bar = await page.getByText(/Free · runs on your ComfyUI|Placeholder · free/).first().locator("..").innerText();check(true, `${label}: the open engine prices it: ${bar.replace(/\s+/g, " ")}`);const picked = await page.getByRole("radio", { checked: true, name: /Fast \(DBS-BSRNN\)|Best \(DBS-TIGER\)/ }).innerText();check(/Fast|Best/.test(picked), `${label}: the host's model is preselected (${picked})`);@@ -125,7 +125,7 @@ try {check(await empty.isVisible(), `${dname}: a soundtrack removed while it uploads stays removed`);refusal = null;await page.locator('input[type="file"]').setInputFiles(wav);- await page.getByText(/Free · runs on your ComfyUI|Demo · free/).waitFor({ timeout: 30_000 });+ await page.getByText(/Free · runs on your ComfyUI|Placeholder · free/).waitFor({ timeout: 30_000 });check(true, `${dname}: a file is taken as usual afterwards`);await page.screenshot({ path: path.join(out, `split-after-refusal-${dname}.png`), fullPage: true });await ctx.close();@@ -140,7 +140,7 @@ try {const page = await ctx.newPage();await openRoute(page, `${app}/audio/split`);await page.locator('input[type="file"]').setInputFiles(file);- await page.getByText(/Free · runs on your ComfyUI|Demo · free/).waitFor({ timeout: 30_000 });+ await page.getByText(/Free · runs on your ComfyUI|Placeholder · free/).waitFor({ timeout: 30_000 });await page.getByRole("button", { name: "Split it" }).click();await page.getByRole("heading", { name: "Stems and mixer" }).waitFor({ timeout: RUN_MS });const tiles = page.getByRole("list", { name: "Stems" }).getByRole("listitem");diff --git a/tests/e2e/turnaround.mjs b/tests/e2e/turnaround.mjsindex 113d3268..43cf8139 100644--- a/tests/e2e/turnaround.mjs+++ b/tests/e2e/turnaround.mjs@@ -124,13 +124,13 @@ for (const [size, scheme] of [await open.click();const dialog = page.getByRole("dialog");await dialog.getByText(/^Views$/).waitFor();- const price = dialog.getByText(engine === "open" ? /Free · on your GPU|Demo · free/ : /Demo · free|≈ \$/);+ const price = dialog.getByText(engine === "open" ? /Free · on your GPU|Placeholder · free/ : /Placeholder · free|≈ \$/);await price.waitFor({ timeout: 30_000 });const text = await dialog.innerText();check(`${tag}: the five slots (Front, Right side, Back, Left side, Sheet)`, ["Front", "Right side", "Back", "Left side", "Sheet"].every((s) => text.includes(s)), text.slice(0, 200));check(`${tag}: the person's own left and right are explained`, /their right side is on your left/.test(text));const priceText = await price.innerText();- check(`${tag}: the price or GPU line shows before running`, (engine === "open" ? /Free · on your GPU|Demo · free/ : /Demo · free|≈ \$\d/).test(priceText), priceText);+ check(`${tag}: the price or GPU line shows before running`, (engine === "open" ? /Free · on your GPU|Placeholder · free/ : /Placeholder · free|≈ \$\d/).test(priceText), priceText);check(`${tag}: the consent line is asked for (photos someone brought)`, /I consent to this biometric data processing/.test(text));const make = dialog.getByRole("button", { name: /Make turnaround/ });check(`${tag}: Make turnaround waits for the consent line`, await make.isDisabled());@@ -195,7 +195,7 @@ for (const [size, scheme] of [await fly.click();const flyDialog = page.getByRole("dialog");await flyDialog.getByText(/^Fly around Ada Turn/).waitFor();- await flyDialog.getByText(engine === "open" ? /Free · on your GPU|Demo · free/ : /Demo · free|≈ \$/).waitFor({ timeout: 30_000 });+ await flyDialog.getByText(engine === "open" ? /Free · on your GPU|Placeholder · free/ : /Placeholder · free|≈ \$/).waitFor({ timeout: 30_000 });if (engine === "cloud") {await flyDialog.getByRole("radio", { name: "Camera path" }).click();const paths = flyDialog.getByRole("radiogroup", { name: "Path" });@@ -243,7 +243,7 @@ for (const [size, scheme] of [check(`${tag}: Soul Cast results offer "Turnaround video"`, true);await turn.click();const td = page.getByRole("dialog").filter({ hasText: /^Turnaround video/ });- await td.getByText(/Free · on your GPU|Demo · free/).waitFor({ timeout: 30_000 });+ await td.getByText(/Free · on your GPU|Placeholder · free/).waitFor({ timeout: 30_000 });check(`${tag}: no consent line for a Soul Cast character`, !/I consent to this biometric/.test(await td.innerText()));check(`${tag}: no sideways scroll over Soul Cast`, (await sideways(page)) <= 1);await shoot(page, `cast-${size}`);