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
Composer: the blocker line folds back, waits for the full catalog, and the arrow reads
Claude9ef3402f9847
diff --git a/src/components/cinema/prompt-bar.tsx b/src/components/cinema/prompt-bar.tsxindex 52b392d2..c15927c8 100644--- a/src/components/cinema/prompt-bar.tsx+++ b/src/components/cinema/prompt-bar.tsx@@ -827,7 +827,7 @@ export function PromptBar(props: PromptBarProps) {aria-label={plan.outputs > 1 ? `Generate ${plan.outputs}` : "Generate"}aria-disabled={!!blocker || undefined}aria-describedby={blocker ? blockerId : undefined}- className={cn("size-10 shrink-0 rounded-full", blocker && "bg-primary/55 hover:bg-primary/65")}+ className={cn("size-10 shrink-0 rounded-full", blocker && "bg-primary/70 hover:bg-primary/80")}>{busy ? <Loader2 className="size-4 animate-spin" /> : <ArrowUp className="size-4" />}</Button>diff --git a/src/components/marketing/marketing-studio.tsx b/src/components/marketing/marketing-studio.tsxindex 9da31801..98d80808 100644--- a/src/components/marketing/marketing-studio.tsx+++ b/src/components/marketing/marketing-studio.tsx@@ -488,7 +488,7 @@ export function MarketingStudio({ models }: { models: Record<string, ModelInfo>onClick={() => void generate()}aria-label={template ? "Recreate template" : "Generate"}aria-disabled={!!blocker || busy}- className={cn("grid size-10 shrink-0 place-items-center rounded-full text-primary-foreground transition-colors", blocker ? "bg-primary/55 hover:bg-primary/65" : "bg-primary hover:bg-primary/90")}+ className={cn("grid size-10 shrink-0 place-items-center rounded-full text-primary-foreground transition-colors", blocker ? "bg-primary/70 hover:bg-primary/80" : "bg-primary hover:bg-primary/90")}>{busy ? <Loader2 className="size-4 animate-spin" /> : <ArrowUp className="size-4" />}</button>diff --git a/src/components/studio/composer.tsx b/src/components/studio/composer.tsxindex c54576fd..913041e2 100644--- a/src/components/studio/composer.tsx+++ b/src/components/studio/composer.tsx@@ -241,7 +241,8 @@ export function Composer({ docked }: { docked: boolean }) {const promptMissing =!config.promptOptional && !opts.promptless && !opts.promptOptional && preset?.userPrompt !== "none" && preset?.userPrompt !== "optional" && !draft.prompt.trim() && !draft.params.shots?.some((s) => s.prompt.trim());const blocker = blockerFor({- loading: !catalog.ready ? "Loading models…" : presetLoading ? "Loading presets…" : null,+ // A model outside the studio's slice (remembered, or handed over) is known once the full catalog arrives: loading until then, not "Pick a model".+ loading: !catalog.ready || (!model && !catalog.complete) ? "Loading models…" : presetLoading ? "Loading presets…" : null,model: !!model,engineError,missing,@@ -333,7 +334,20 @@ export function Composer({ docked }: { docked: boolean }) {const tile = root.current?.querySelector<HTMLElement>(`[data-slot-key="${key}"]`);const control = tile?.matches("button") ? tile : tile?.querySelector<HTMLButtonElement>('button[aria-label$=": upload"]');pulseSlot(root.current, key);- control?.click();+ // The focus moves into the tile (the press itself didn't take it), so leaving the composer folds it again.+ const target = control ?? tile?.querySelector<HTMLElement>("button");+ if (target) {+ target.focus({ preventScroll: true });+ control?.click();+ return;+ }+ // Nothing to focus: the next press outside the composer folds it.+ const fold = (e: PointerEvent) => {+ if (root.current?.contains(e.target as Node) || root.current?.contains(document.activeElement)) return;+ document.removeEventListener("pointerdown", fold, true);+ setFocused(false);+ };+ document.addEventListener("pointerdown", fold, true);};// A blocker toast goes away once it's out of date: the photo attached, the prompt typed (or the next blocker is a different one).@@ -675,8 +689,8 @@ export function Composer({ docked }: { docked: boolean }) {onClick={submit}disabled={create.isPending || signature.lock.isPending}aria-label={blocker ? `Generate — ${blocker.message}` : "Generate"}- // Blocked, it stays the brand colour (paler): pressing it still says what's missing and points at it.- className={cn("size-10 shrink-0 rounded-full", blocker && "bg-primary/55 hover:bg-primary/65")}+ // Blocked, it stays the brand colour (paler, the arrow still 3:1 or more): pressing it still says what's missing and points at it.+ className={cn("size-10 shrink-0 rounded-full", blocker && "bg-primary/70 hover:bg-primary/80")}>{create.isPending || signature.lock.isPending ? <Loader2 className="size-4 animate-spin" /> : <ArrowUp className="size-4" />}</Button>diff --git a/tests/e2e/composer-flows.mjs b/tests/e2e/composer-flows.mjsindex 65b8d372..8ca38bd8 100644--- a/tests/e2e/composer-flows.mjs+++ b/tests/e2e/composer-flows.mjs@@ -6,6 +6,9 @@// 3. A pasted image attaches once and stops spinning; one removed while it uploads stays removed.// 4. A clip dropped on an Image tile is refused.// 5. Phone (390 px): the composer toolbar fits on every studio, the Settings chip is in view, no sideways scroll.+// 6. A blocked Generate says why in a line under the composer on a phone; a tap opens the missing tile's file+// picker (focus inside the composer), and the line moves on to the next input. A desktop composer shows the+// line only while its tiles are folded away.//// Playwright: the `playwright` (or `playwright-core`) package if it resolves, else the global install at// /opt/node22/lib/node_modules. Chromium: $CHROMIUM_PATH, else the newest /opt/pw-browsers/chromium-*.@@ -183,6 +186,55 @@ async function ready(page, url) {await ctx.close();}+// 6. The blocker line.+{+ const lineText = (page) => page.evaluate(() => document.querySelector("[data-composer] [aria-live=polite] button")?.textContent?.trim() ?? "");+ const ctx = await browser.newContext({ viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true });+ const page = await ctx.newPage();+ await ready(page, "/apps/app-face-swap");+ await page.waitForTimeout(800);+ const first = await lineText(page);+ check("phone: a blocked Generate says why under the composer", /^Add an? /.test(first), first || "no line");+ const png = Buffer.from(+ await page.evaluate(() => {+ const c = document.createElement("canvas");+ c.width = 160;+ c.height = 120;+ const x = c.getContext("2d");+ x.fillStyle = "#cc6633";+ x.fillRect(0, 0, 160, 120);+ return c.toDataURL("image/png").split(",")[1];+ }),+ "base64",+ );+ if (first) {+ const [chooser] = await Promise.all([+ page.waitForEvent("filechooser", { timeout: 5000 }).catch(() => null),+ page.locator("[data-composer] [aria-live=polite] button").first().tap(),+ ]);+ const inside = await page.evaluate(() => !!document.activeElement?.closest("[data-composer]"));+ check("…a tap on it opens that tile's file picker", !!chooser && inside, `picker: ${!!chooser}, focus in the composer: ${inside}`);+ if (chooser) {+ await chooser.setFiles({ name: "photo.png", mimeType: "image/png", buffer: png });+ await page.waitForFunction((was) => (document.querySelector("[data-composer] [aria-live=polite] button")?.textContent?.trim() ?? "") !== was, first, { timeout: 30_000 }).catch(() => {});+ const next = await lineText(page);+ check("…and once it's filled the line names the next input", next !== first && /^Add an? /.test(next), `"${first}" → "${next}"`);+ }+ }+ await ctx.close();++ const desk = await browser.newPage({ viewport: { width: 1440, height: 900 } });+ await ready(desk, "/apps/app-face-swap");+ await desk.waitForTimeout(800);+ const m = await desk.evaluate(() => {+ const tiles = [...document.querySelectorAll("[data-composer] [data-slot-key]")].some((t) => t.getBoundingClientRect().width > 0);+ const line = document.querySelector("[data-composer] [aria-live=polite] p");+ return { tiles, line: !!line && line.getBoundingClientRect().height > 0 };+ });+ check("desktop: the line shows only while the tiles are folded away", m.line === !m.tiles, `tiles shown: ${m.tiles}, line shown: ${m.line}`);+ await desk.close();+}+await browser.close();console.log(failures.length ? `\n${failures.length} check(s) failed: ${failures.join(", ")}` : "\nAll composer checks passed.");process.exit(failures.length ? 1 : 0);