commit bd7c3b96ab2eeb4d14eee7e1eda51e167a702e42
parent a0d4fdc65937495a153a10b459380ed0c6e78404
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 6 Nov 2026 00:16:33 -0500
umtool: the files route serves the instruments' preview pages
serve.mjs's LAYER_REGIONS named the preview projects it serves; the dial's,
the odometer's, the trail's and the dial finale's were "not found", so Play's
layer and the module panel's preview had no page (instruments.spec.ts).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/umtool/lib/report/serve.mjs b/umtool/lib/report/serve.mjs
@@ -979,7 +979,9 @@ 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"]);
+// The measure's instruments too (dial, odometer, trail; the dial's finale, a window named
+// `dial-finale-preview` by its module -- never confused with the dial's `dial-preview-<segment>`).
+export const LAYER_REGIONS = Object.freeze(["pair", "status", "chapter", "stats", "threads", "flips", "fx", "dial", "odometer", "trail", "dial-finale"]);
/** The project name a layer preview is served under, or null when `head` is not one. */
export function layerPreviewOf(head, segmentIds = []) {
diff --git a/umtool/report-to-video/instruments.test.mjs b/umtool/report-to-video/instruments.test.mjs
@@ -304,3 +304,10 @@ test("a loss goal resolved against its run's start reads as both", () => {
const { schedule } = cut();
assert.match(dialHtml(schedule, RENDER, { fonts }), /GOAL 250 ยท LOSE 50/);
});
+
+test("the files route serves the instruments' preview projects by name", async () => {
+ const { layerPreviewOf } = await import("../lib/report/serve.mjs");
+ for (const n of ["dial-preview", "odometer-preview", "trail-preview", "dial-finale-preview"]) assert.equal(layerPreviewOf(n, []), n);
+ assert.equal(layerPreviewOf("dial-preview-c01", ["c01"]), "dial-preview-c01");
+ assert.equal(layerPreviewOf("dial-preview-zz", ["c01"]), null);
+});