commit 98681685effecbcb5ca9c1b6a803cc4280c0a4fd
parent 687dd44992c86efb182b46f270293c4f3be90384
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 19 Oct 2026 17:46:56 -0400
Merge r36/e2e-fixes: clip labels in the generation line, kind from the scaffold, a project's own clip window first
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
7 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/umtool/e2e/create.spec.ts b/umtool/e2e/create.spec.ts
@@ -78,7 +78,7 @@ test("the lines, grouped Research · Article · Video · Song; the policy chip l
await expect(line(page, "video-report")).toContainText(/ · \d+ found/);
const chip = page.locator("[data-policy-chip]");
await expect(chip).toHaveAttribute("data-policy-chip", "balanced");
- await expect(chip).toHaveText("Generation: balanced · Claude Code: sweeps · API: report revisions, research, frames · local: video revisions, drafts, verdicts");
+ await expect(chip).toHaveText("Generation: balanced · Claude Code: sweeps · API: report revisions, research, frames · local: video revisions, drafts, verdicts, clip labels");
await expect(chip).toHaveAttribute("href", urls.generationPolicyHref());
const rail = page.locator("[data-app-rail]");
await expect(rail.locator("[data-rail-create]")).toHaveAttribute("aria-current", "page");
diff --git a/umtool/e2e/settings.spec.ts b/umtool/e2e/settings.spec.ts
@@ -50,7 +50,7 @@ test("/settings lists generation and system; both light Settings", async ({ page
test("generation: presets write their routes, a route alone makes it custom, caps are the editor's to refuse; the key is a file", async ({ page }) => {
await page.goto(urls.generationPolicyHref());
await expect(page.locator("[data-policy-summary]")).toHaveText(
- "Generation: balanced · Claude Code: sweeps · API: report revisions, research, frames · local: video revisions, drafts, verdicts",
+ "Generation: balanced · Claude Code: sweeps · API: report revisions, research, frames · local: video revisions, drafts, verdicts, clip labels",
);
const policy = page.getByRole("region", { name: "generation policy" });
await expect(policy).toHaveAttribute("data-policy-preset", "balanced");
diff --git a/umtool/lib/clips/cited.ts b/umtool/lib/clips/cited.ts
@@ -1,3 +1,4 @@
+import path from "node:path";
import {
fetchClip,
validateFetchClipArgs,
@@ -59,8 +60,14 @@ async function projectPlay(t: CitedTarget): Promise<CitedPlay | null> {
const r = await resolveClip(t.project, t.clip).catch(() => null);
if (!r || "error" in r) return null;
const cache = await projectCache(r.project, r.manifest);
- const windows = (await windowsFor(r.project, { ...r.clip, start: t.from, end: t.to }, cache)) as { name: string; from: number; to: number }[];
- const win = windows.find((w) => w.from <= t.from + WIN_EPS && w.to >= t.to - WIN_EPS);
+ const windows = (await windowsFor(r.project, { ...r.clip, start: t.from, end: t.to }, cache)) as { name: string; path?: string; from: number; to: number }[];
+ // The project's OWN window first: a corpus window is shared by every project and
+ // another one's fetch can be wider (clip-bench's after-only fetch leaves vid1's
+ // 0-14), which would play instead of the cache this project counts on.
+ const own = (w: { path?: string }) => (w.path && path.resolve(w.path).startsWith(path.resolve(r.project.dir) + path.sep) ? 0 : 1);
+ const win = windows
+ .filter((w) => w.from <= t.from + WIN_EPS && w.to >= t.to - WIN_EPS)
+ .sort((a, b) => own(a) - own(b))[0];
if (!win) return null;
return {
kind: "window",
diff --git a/umtool/lib/create/policy.mjs b/umtool/lib/create/policy.mjs
@@ -28,6 +28,7 @@ const TASK_WORD = {
threads: "threads drafts",
youtube: "YouTube drafts",
social: "social post drafts",
+ "clips-suggest": "clip labels",
};
/**
diff --git a/umtool/lib/projects/scaffold.mjs b/umtool/lib/projects/scaffold.mjs
@@ -540,6 +540,7 @@ export async function scaffoldReportVideo({ root, slug, title, from = null, site
return {
dir,
+ kind: "report-video",
id: slug,
title: finalTitle,
from: src,
diff --git a/umtool/lib/report/clipsNew.mjs b/umtool/lib/report/clipsNew.mjs
@@ -173,7 +173,7 @@ export async function planClipsNew(body, { reportsRoot = REPORTS_ROOT, channelsD
const msg = e instanceof Error ? e.message : String(e);
throw new ClipsNewError(msg, /already exists/.test(msg) ? 409 : 400);
}
- project = { id: r.id, dir: r.dir, kind: "report-video" };
+ project = { id: r.id, dir: r.dir, kind: r.kind };
created = true;
notes.push(...r.notes);
if (req.wordsPath) {
diff --git a/umtool/lib/report/look.test.mjs b/umtool/lib/report/look.test.mjs
@@ -46,7 +46,7 @@ const read = async (dir) => JSON.parse(await readFile(path.join(dir, MANIFEST_NA
test("updateRender: the look's keys only, null removes one, the build's checks refuse a bad value", async () => {
const p = await project({ transition: 0.4, crf: 21 });
try {
- assert.deepEqual(LOOK_KEYS, ["headerHeight", "footerHeight", "qr", "transition", "transitionStyle", "loudness", "captions", "room"]);
+ assert.deepEqual(LOOK_KEYS, ["headerHeight", "footerHeight", "qr", "transition", "transitionStyle", "loudness", "captions", "room", "slide"]);
const token = await manifestToken(p.dir);
const r = await updateRender(p.dir, {
headerHeight: 0, footerHeight: 0, qr: false, transition: 0.5, transitionStyle: "fadeblack",