commit b3311c5b841b32f50a9c3ac705c1163064391385
parent f2eb3019e1467e612c717a818e267a5f12617519
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 6 Nov 2026 00:05:43 -0500
umtool: Play serves the measure extras' pages; a racy step in the chat panel spec
The files route serves a single layer's preview only for the regions in
serve.mjs LAYER_REGIONS, a hand list: Play's iframe of each measure extra's
page was a 404 and never posted ready (play-measure.spec.ts). The five are
listed, and layerPreview.test.mjs now holds every module that declares
`play` to being served.
modules.spec.ts, the chat module: a save reloads the panel and the reload
resets the card's draft, so a fill that lands before it is wiped and Save
stays disabled (failed 2 of 3 runs here; the panel is heavier with five more
modules). The step fills until the draft holds.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/umtool/e2e/modules.spec.ts b/umtool/e2e/modules.spec.ts
@@ -125,7 +125,12 @@ test("the chat module's settings are saved through the panel and refused with th
await expect(card.getByTestId("module-status-chat")).toHaveText("saved");
await expect.poll(() => readManifest().render.chrome.chat.position).toBe("left");
// A value the build would refuse is refused with its sentence, the manifest untouched.
- await card.getByTestId("module-field-chat-lines").fill("99");
+ // (The save reloads the panel, and the reload resets the card's draft: a fill
+ // that lands before it is wiped. Fill until the draft holds.)
+ await expect(async () => {
+ await card.getByTestId("module-field-chat-lines").fill("99");
+ await expect(card.getByTestId("module-save-chat")).toBeEnabled({ timeout: 1_000 });
+ }).toPass({ timeout: 15_000 });
await card.getByTestId("module-save-chat").click();
await expect(card.getByTestId("module-errors-chat")).toContainText("render.chrome.chat.lines");
expect(readManifest().render.chrome.chat.position).toBe("left");
diff --git a/umtool/lib/report/layerPreview.test.mjs b/umtool/lib/report/layerPreview.test.mjs
@@ -40,8 +40,11 @@ test("each layer composed alone: a whole page once, a window page per window, a
assert.ok(calls.every((c) => c.schedule === schedule && c.manifestPath === "/p/video.manifest.json"));
});
-test("the files route serves a layer's project by its name, a window's only for the cut's own entry", () => {
+test("the files route serves a layer's project by its name, a window's only for the cut's own entry", async () => {
assert.equal(layerPreviewOf("pair-preview"), "pair-preview");
+ // Every module Play draws as a layer is served by the files route (its iframe would be a 404 otherwise).
+ const { playModules } = await import("umtool-report-to-video/modules");
+ for (const m of playModules()) assert.equal(layerPreviewOf(`${m.region}-preview`), `${m.region}-preview`, m.id);
assert.equal(layerPreviewOf("chapter-preview-b", ["a", "b"]), "chapter-preview-b");
assert.equal(layerPreviewOf("chapter-preview-zz", ["a", "b"]), null);
assert.equal(layerPreviewOf("chapter-preview-..", [".."]), null);
diff --git a/umtool/lib/report/serve.mjs b/umtool/lib/report/serve.mjs
@@ -979,7 +979,8 @@ export function previewDirFor(projectDir, variant, rest, segmentIds) {
// ---------------------------------------------------------------------------
/** The regions whose pages the panel previews alone. */
-export const LAYER_REGIONS = Object.freeze(["pair", "status", "chapter", "stats", "threads", "flips", "fx"]);
+// (Every module that declares `play` must be here, or Play's iframe of its page is a 404: the measure extras too.)
+export const LAYER_REGIONS = Object.freeze(["pair", "status", "chapter", "stats", "threads", "flips", "fx", "diet", "peak", "goals", "promise", "streak"]);
/** The project name a layer preview is served under, or null when `head` is not one. */
export function layerPreviewOf(head, segmentIds = []) {