From 75837df82e8324ff36f013ebbf1c2e8abfbeba56 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sun, 6 Sep 2026 23:29:20 +0300 Subject: [PATCH] app: Generate All says so when every scene is excluded Found by the adversarial pass on the exclude commit: every other early-return in generateAll() says something (empty load, cancelled, N failed) except this one -- excluding every scene made the button do nothing with no feedback, indistinguishable from a hang. --- app/boot.js | 2 +- app/tests-layout/generate_all.spec.js | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/boot.js b/app/boot.js index 34d35caf..c8acb3d7 100644 --- a/app/boot.js +++ b/app/boot.js @@ -151,7 +151,7 @@ async function start() { // 5" while two of the five were never going to run reads as a wrong // number, not as a batch that respected the exclude. const scenes = project.scenes.filter((s) => !s.excluded); - if (!scenes.length) return; + if (!scenes.length) { page.transport.say("Every scene is excluded -- nothing to generate."); return; } generateAllBtn.setDisabled(true); batchCancelled = false; page.transport.hold(`Generating scene 1 of ${scenes.length}…`); diff --git a/app/tests-layout/generate_all.spec.js b/app/tests-layout/generate_all.spec.js index cee42ab6..b24c96e6 100644 --- a/app/tests-layout/generate_all.spec.js +++ b/app/tests-layout/generate_all.spec.js @@ -87,6 +87,24 @@ test("an excluded scene is skipped, and does not count toward the total", async .toBeVisible({ timeout: 15000 }); }); +test("excluding every scene says so instead of doing nothing silently", async ({ page }) => { + await app(page); + await page.evaluate(() => { + const { project } = window.FunPack; + while (project.scenes.length < 2) project.addScene(); + for (const s of project.scenes) project.setScene(s.id, "excluded", true); + }); + + const btn = page.getByRole("button", { name: "Generate All" }); + await btn.click(); + + await expect(page.locator(".cx-panel-status", { hasText: /every scene is excluded/i })) + .toBeVisible(); + // Nothing was ever started -- the button was never disabled by a batch + // that had nothing to run. + await expect(btn).toBeEnabled(); +}); + test("a second click while a batch is already running does not start an overlapping one", async ({ page }) => { await app(page); await page.evaluate(() => {