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.

Originals O13: a browser check for Evolution, Storyboard looks and the Effects 2.0 chains; the intensity's hint under its control, each chain described by its effect

Claudebd37d3f5fe2b
diff --git a/src/components/evolution/evolution-tool.tsx b/src/components/evolution/evolution-tool.tsx
index f99e61f0..ffb1881d 100644
--- a/src/components/evolution/evolution-tool.tsx
+++ b/src/components/evolution/evolution-tool.tsx
@@ -131,7 +131,8 @@ export function EvolutionTool({ tabs }: { tabs?: React.ReactNode }) {
.then((r) => {
if (!r) return;
const ratio = size.width && size.height ? size.width / size.height : undefined;
- setRun({ final: r.final.id, ids: r.items.map((g) => g.id), before: clip!.preview, start: range!.startTime, ratio, direction: r.direction, by: r.by });
+ // A direction the writer filled in and you sent as it was is still the writer's.
+ setRun({ final: r.final.id, ids: r.items.map((g) => g.id), before: clip!.preview, start: range!.startTime, ratio, direction: r.direction, by: body.direction ? (by ?? "you") : r.by });
if (!direction.trim()) {
setDirection(r.direction);
setBy(r.by);
@@ -232,8 +233,11 @@ export function EvolutionTool({ tabs }: { tabs?: React.ReactNode }) {
</div>
<Panel className="space-y-4 lg:sticky lg:top-[112px]">
- <Field label="How much should change?" hint={INTENSITIES.find((i) => i.id === intensity)?.hint}>
+ <Field label="How much should change?">
<Segmented label="How much should change?" value={intensity} onChange={setIntensity} options={INTENSITIES.map((i) => ({ value: i.id, label: i.label }))} />
+ <p className="text-[12px] text-muted-foreground" aria-live="polite">
+ {INTENSITIES.find((i) => i.id === intensity)?.hint}
+ </p>
</Field>
<Field label="Creative direction" htmlFor="evolution-direction" hint={by ? BY[by] : "Optional: left empty, it's written for you when you start"}>
diff --git a/src/lib/catalog/canvas.ts b/src/lib/catalog/canvas.ts
index a5b64170..b9983a62 100644
--- a/src/lib/catalog/canvas.ts
+++ b/src/lib/catalog/canvas.ts
@@ -1997,7 +1997,8 @@ function effectChainTemplate(c: (typeof EFFECT_CHAINS)[number]): CanvasTemplate
return {
id: `effect-chain-${slugOf(c.effect)}`,
name: c.effect,
- description: "A photo, its scene set by an image edit, then animated with the effect",
+ // What the effect does, in the catalog's words (the section's note says how the chain works).
+ description: getPreset(`effect-${slugOf(c.effect)}`)?.description ?? "A photo, its scene set by an image edit, then animated with the effect",
icon: c.icon,
hue: c.hue,
group: EFFECT_CHAIN_GROUP,
diff --git a/tests/e2e/popcorn-evolution.mjs b/tests/e2e/popcorn-evolution.mjs
new file mode 100644
index 00000000..3b09eb94
--- /dev/null
+++ b/tests/e2e/popcorn-evolution.mjs
@@ -0,0 +1,144 @@
+// Build plan O13, browser check: Video tools → Evolution, the Storyboard's Soul looks and the Canvas picker's
+// Effects 2.0 chains, at 1440 and 390 px, light and dark, in demo mode (no keys, ComfyUI and Ollama unreachable).
+// Evolution: a clip goes in, Low / Medium / High, the direction written by the offline writer, the price before it
+// runs (a demo), a run that finishes with a before / after; the open engine says "on your GPU". Storyboard: the look
+// chip starts at "No look", a look is picked, the board's price is shown, a board in that look is made. Canvas: the
+// Effects 2.0 chains have their own section and one opens as a canvas with the edit and the effect. Nothing scrolls
+// sideways. Usage: node tests/e2e/popcorn-evolution.mjs [appUrl] [--shots <dir>]. Exits 1 on a failed check.
+import fs from "node:fs";
+import path from "node:path";
+import { launch, root } from "./_browser.mjs";
+
+const argv = process.argv.slice(2);
+const app = (argv.find((a) => !a.startsWith("--") && argv[argv.indexOf(a) - 1] !== "--shots") ?? "http://localhost:3000").replace(/\/$/, "");
+const shots = argv.includes("--shots") ? argv[argv.indexOf("--shots") + 1] : undefined;
+if (shots) fs.mkdirSync(shots, { recursive: true });
+
+const failures = [];
+const check = (label, ok, extra = "") => {
+ console.log(`${ok ? "ok " : "FAIL"} ${label.padEnd(72)}${extra ? ` ${extra}` : ""}`);
+ if (!ok) failures.push(label);
+};
+
+const clipFile = path.join(root, "scripts/eval/fixtures/walk-6s.mp4");
+const refFile = path.join(root, "scripts/eval/fixtures/references/warm-1.png");
+
+const browser = await launch();
+try {
+ for (const [width, height] of [
+ [1440, 900],
+ [390, 844],
+ ]) {
+ for (const scheme of ["light", "dark"]) {
+ const tag = `${width} ${scheme}`;
+ const context = await browser.newContext({ viewport: { width, height }, colorScheme: scheme, ...(width < 500 ? { isMobile: true, hasTouch: true } : {}) });
+ await context.addInitScript(() => {
+ try {
+ localStorage.setItem("fuobe.engine", "cloud");
+ } catch {}
+ });
+ const page = await context.newPage();
+ const shot = async (name) => shots && (await page.screenshot({ path: path.join(shots, `${name}-${width}-${scheme}.png`), fullPage: true }));
+ const sideways = () => page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
+ const text = () => page.evaluate(() => document.body.innerText);
+
+ // ---- Evolution
+ await page.goto(`${app}/video-tools/evolution`, { waitUntil: "load", timeout: 180_000 });
+ await page.getByRole("heading", { name: "Take a clip further" }).waitFor({ timeout: 120_000 });
+ check(`${tag}: Evolution is a Video tools tab`, (await page.getByRole("link", { name: "Evolution" }).count()) + (await page.getByRole("tab", { name: "Evolution" }).count()) > 0);
+ check(`${tag}: no sideways scroll (Evolution, empty)`, (await sideways()) <= 1, `${await sideways()} px`);
+ await page.locator('input[type="file"]').first().setInputFiles(clipFile);
+ const change = page.getByRole("radiogroup", { name: "How much should change?" });
+ await change.waitFor({ timeout: 60_000 });
+ check(`${tag}: Low / Medium / High, Medium first`, (await change.getByRole("radio").allInnerTexts()).join("|") === "Low|Medium|High" && (await change.getByRole("radio", { name: "Medium" }).getAttribute("aria-checked")) === "true");
+ await page.getByRole("radio", { name: "High" }).click();
+ check(`${tag}: the intensity says what stays`, /Only the motion and timing stay/.test(await text()));
+ // A reference, then the writer.
+ await page.locator('input[type="file"][accept="image/*"][multiple]').setInputFiles(refFile);
+ await page.waitForFunction(() => !document.body.innerText.includes("Uploading references"), null, { timeout: 30_000 }).catch(() => {});
+ await page.getByRole("button", { name: "Write it for me" }).click();
+ const direction = page.getByRole("textbox", { name: "Creative direction" });
+ 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()));
+ 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();
+ await page.getByRole("heading", { name: /^Evolution · / }).waitFor({ timeout: 30_000 }).catch(() => {});
+ const done = await page
+ .getByRole("slider", { name: /Compare the original and the result/ })
+ .waitFor({ timeout: 120_000 })
+ .then(() => true)
+ .catch(() => false);
+ check(`${tag}: the run finishes with a before / after`, done);
+ check(`${tag}: the run says who wrote its direction`, /Written by Fuobe's offline writer:/.test(await text()));
+ await shot("evolution-done");
+ // The open engine: free, segments, the GPU line.
+ await page.getByRole("radiogroup", { name: "Engine" }).getByRole("radio", { name: "Open source" }).click();
+ await page.waitForFunction(() => /segments|Needs a 24 GB GPU/.test(document.body.innerText), null, { timeout: 30_000 }).catch(() => {});
+ check(`${tag}: open engine: 480p first, the GPU line`, (await page.getByRole("radiogroup", { name: "Resolution" }).getByRole("radio", { name: "480p" }).getAttribute("aria-checked")) === "true" && /Needs a 24 GB GPU/.test(await text()));
+ check(`${tag}: no sideways scroll (Evolution, open)`, (await sideways()) <= 1, `${await sideways()} px`);
+ await page.getByRole("radiogroup", { name: "Engine" }).getByRole("radio", { name: "Cloud" }).click();
+
+ // ---- Storyboard
+ await page.goto(`${app}/storyboard`, { waitUntil: "load", timeout: 180_000 });
+ await page.getByRole("heading", { name: "Tell it frame by frame" }).waitFor({ timeout: 120_000 });
+ const chip = page.getByRole("button", { name: "Look: No look" });
+ await chip.waitFor({ timeout: 30_000 });
+ check(`${tag}: the look chip starts at No look`, (await chip.count()) === 1);
+ await page.getByRole("textbox", { name: "Your story" }).fill("a girl waits at a rainy bus stop, the bus arrives, she looks back");
+ await chip.click();
+ // DigitalCam is a Soul look (the picker opens on Soul 2.0): a search looks through both.
+ await page.getByRole("textbox", { name: "Search looks" }).fill("DigitalCam");
+ const pick = page.getByRole("button", { name: "DigitalCam" }).first();
+ await pick.waitFor({ timeout: 30_000 });
+ await pick.click();
+ await page.getByRole("button", { name: "Look: DigitalCam" }).waitFor({ timeout: 15_000 }).catch(() => {});
+ 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()));
+ check(`${tag}: no sideways scroll (Storyboard)`, (await sideways()) <= 1, `${await sideways()} px`);
+ await shot("storyboard-look");
+ await page.getByRole("button", { name: "Generate storyboard" }).click();
+ const board = await page
+ .getByRole("button", { name: "Open frame 1" })
+ .first()
+ .waitFor({ timeout: 90_000 })
+ .then(() => true)
+ .catch(() => false);
+ check(`${tag}: a board in the look is made (demo)`, board && /Fuobe Soul/.test(await text()));
+ check(`${tag}: no sideways scroll (Storyboard with a board)`, (await sideways()) <= 1, `${await sideways()} px`);
+
+ // ---- Canvas: Effects 2.0 chains
+ await page.goto(`${app}/canvas?tab=templates`, { waitUntil: "load", timeout: 180_000 });
+ const section = page.getByRole("heading", { name: "Effects 2.0 chains" });
+ await section.waitFor({ timeout: 120_000 });
+ const cards = await page.locator("section", { has: section }).getByRole("button", { name: "Use template" }).count();
+ check(`${tag}: the Effects 2.0 chains have their own section`, cards >= 10, `${cards} cards`);
+ check(`${tag}: the chain cards name their models`, /Qwen-Image-Edit 2511 \(hosted\) · Fuobe DoP/.test(await text()));
+ check(`${tag}: no sideways scroll (templates)`, (await sideways()) <= 1, `${await sideways()} px`);
+ await shot("canvas-templates");
+ if (width >= 1000 && scheme === "light") {
+ const card = page.locator("article", { hasText: "Agamemnon" });
+ await card.getByRole("button", { name: "Use template" }).click();
+ await page.waitForURL(/\/canvas\/[^?]+/, { timeout: 60_000 });
+ await page.getByText("Set the scene").first().waitFor({ timeout: 60_000 }).catch(() => {});
+ check(`${tag}: a chain opens as a canvas: the edit, then the effect`, /Set the scene/.test(await text()) && /Agamemnon/.test(await text()));
+ await shot("canvas-chain");
+ }
+ await context.close();
+ }
+ }
+} finally {
+ await browser.close();
+}
+
+if (failures.length) {
+ console.log(`\n${failures.length} check(s) failed`);
+ process.exit(1);
+}
+console.log("\nall checks passed");