Skip to content

armgit / fuobe

Public Imported from GitHub
0

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.

Canvas: boards with a Restore & colourise node save again

Claudeafc18f36e49e
diff --git a/src/server/canvas.ts b/src/server/canvas.ts
index 529c2f70..84ece4c3 100644
--- a/src/server/canvas.ts
+++ b/src/server/canvas.ts
@@ -112,6 +112,7 @@ const NODE_TYPES = [
"clone-voice",
"translate",
"concat",
+ "restore",
"table",
"layout",
"camera-path",
diff --git a/tests/canvas-split.test.ts b/tests/canvas-split.test.ts
index d045e2ce..92a4faff 100644
--- a/tests/canvas-split.test.ts
+++ b/tests/canvas-split.test.ts
@@ -8,6 +8,7 @@ import {
describeNode,
edgeStem,
modelChoices,
+ NODE_SPECS,
OUT,
outputHandles,
outputLabel,
@@ -36,6 +37,7 @@ const { db } = await import("@/server/db");
const list = await import("@/app/api/canvases/route");
const one = await import("@/app/api/canvases/[id]/route");
const run = await import("@/app/api/canvases/[id]/run/route");
+const { parseGraph } = await import("@/server/canvas");
beforeAll(() => setSetting("demoMode", "auto"));
@@ -124,6 +126,14 @@ describe("edges carry their stem into the next node's chain", () => {
});
});
+describe("saving a board", () => {
+ it("every node type can be saved", () => {
+ for (const type of Object.keys(NODE_SPECS) as CanvasNode["type"][]) {
+ expect(parseGraph({ nodes: [{ id: "n", type, position: at(0), data: {} }], edges: [] }), type).not.toBeNull();
+ }
+ });
+});
+
describe("a board whose DBS step runs (demo mode)", () => {
const req = (method: string, body?: unknown) => new Request("http://localhost/api/canvases", { method, headers: { "Content-Type": "application/json" }, body: body === undefined ? undefined : JSON.stringify(body) });
// eslint-disable-next-line @typescript-eslint/no-explicit-any