commit d03323da4bfaf555d09111af80d4823968b9302a
parent 59f7747edc9c623ceb370ade77eb8f9c8dd2e820
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Thu, 5 Nov 2026 10:19:47 -0500
umtool tests: a pause put in on a take's read (--in-take: the take picks it, the project's manifest untouched) and the bench's pause after (Preview writes nothing, Apply picks a new take, its later words moved on)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/umtool/e2e/post-narration.spec.ts b/umtool/e2e/post-narration.spec.ts
@@ -46,7 +46,7 @@ test.beforeEach(() => {
copyFileSync(`${MANIFEST}.pristine`, MANIFEST);
rmSync(path.join(DIR, "revisions"), { recursive: true, force: true });
rmSync(path.join(DIR, "notes.json"), { force: true });
- for (const f of ["take-2.orpheus-zac.wav", "take-2.recorded-operator.wav", "take-3.recorded-operator.wav", "take-2.convert-zac.wav", "take-3.convert-zac.wav"]) rmSync(path.join(DIR, "narration", "posts", "11", f), { force: true });
+ for (const f of ["take-2.orpheus-zac.wav", "take-2.recorded-operator.wav", "take-3.recorded-operator.wav", "take-2.convert-zac.wav", "take-3.convert-zac.wav", "take-2.pause-orpheus.wav"]) rmSync(path.join(DIR, "narration", "posts", "11", f), { force: true });
rmSync(path.join(DIR, "narration", "posts", "11", "take-2.recorded-operator.parts"), { recursive: true, force: true });
rmSync(path.join(DIR, "narration", "posts", "11", ".trash"), { recursive: true, force: true });
rmSync(path.join(DIR, "narration", "posts", "11", ".recording-operator"), { recursive: true, force: true });
@@ -327,6 +327,34 @@ test("A WORD ZOOM: Get word timings (the editor's transcription), click a word -
await page.locator("[data-play-toggle]").click();
});
+test("PAUSE AFTER (operator, 5 Nov: a countdown read in one breath): Get word timings, then Options -> Re-join the read: pause after speaks=0.5, Preview writes nothing, Apply makes a new take, picked, its later words 0.5 s on", async ({ page }) => {
+ await page.setViewportSize({ width: 1500, height: 1100 });
+ await page.goto(urls.postBenchHref(PROJECT, "p-11"));
+ const zoom = page.locator('[data-post-zoom-panel="p-11"]');
+ await zoom.locator("[data-post-zoom-get-words]").click();
+ await expect(zoom.locator("[data-post-zoom-words-state]")).toHaveText(/the take is timed \(5 words\)/, { timeout: 20_000 });
+ await page.reload();
+ const opts = page.locator('[data-panel-id="post-reread"]');
+ await opts.locator("summary").click();
+ const row = opts.locator("[data-post-reread-pause-row]");
+ await expect(row.locator("[data-post-reread-pause-needs-words]")).toHaveCount(0);
+ await row.locator("[data-post-reread-pause]").fill("speaks=0.5");
+ await row.locator("[data-post-reread-pause-preview]").click();
+ const status = page.locator("[data-post-narration-status]");
+ await expect(status).toContainText('would pause after "speaks" (word 3');
+ expect(narr("p-11").takes).toHaveLength(1);
+ await row.locator("[data-post-reread-pause-go]").click();
+ await expect(status).toContainText("a new take, picked", { timeout: 20_000 });
+ const n = narr("p-11") as { takes: Array<Take & { words?: Array<{ w: string; start: number }>; steps?: Array<{ op: string }> }>; pick?: number };
+ expect(n.takes).toHaveLength(2);
+ expect(n.pick).toBe(1);
+ expect(n.takes[1].file).toMatch(/take-2\.pause-orpheus\.wav$/);
+ expect(n.takes[1].steps?.[0]?.op).toBe("pause");
+ expect(n.takes[1].seconds).toBeGreaterThan(2.4);
+ expect(n.takes[1].words?.[3].start).toBeCloseTo((n.takes[0].words?.[3].start ?? 0) + 0.5, 2);
+ expect(n.takes[1].words?.[2].start).toBe(n.takes[0].words?.[2].start);
+});
+
test("READ-FOLLOW (operator, 3 Nov: \"highlight the current paragraph and panning down as needed\"): a long post read part by part -- the second block brightens at its part's start, the others dim, and the card pans so a late block is in view; the bench shows the block map", async ({ page }) => {
// p-13 made long: ten paragraphs, a take read paragraph by paragraph (a part every 2 s of the take).
const para = (i: number) => `Paragraph ${i + 1} begins here and it goes on for a while, ${"saying the same kind of thing again and again, ".repeat(3)}until it ends with mark ${i + 1}.`;
diff --git a/umtool/lib/report/takeScope.test.mjs b/umtool/lib/report/takeScope.test.mjs
@@ -175,6 +175,24 @@ test("reread --in-take: the new read's file lands in the project's dir under a f
assert.ok(await stat(path.join(a.dir, n.takes[1].file)));
});
+test("reread --pause --in-take: the paused read lands in the project's dir, the take picks it with its words moved on, the project keeps its pick", { skip: !haveFfmpeg && "needs ffmpeg" }, async () => {
+ const words = [{ w: "That", start: 3.6, end: 3.8 }, { w: "is", start: 3.85, end: 3.95 }, { w: "exactly", start: 4.0, end: 4.4 }, { w: "what", start: 4.6, end: 4.8 }];
+ const it = narrated("1", "2026-10-30T10:00:00.000Z");
+ it.narration.takes[0].words = words;
+ const a = await project("scope-pause", [it]);
+ await tone(path.join(a.dir, "narration/posts/1/take-1.orpheus-thread.wav"));
+ const before = await text(a);
+ assert.equal((await take("scope-pause", "--id", "t1", "--label", "T", "--draft")).code, 0);
+ const r = await posts("reread", "scope-pause", "p-1", "--pause", "exactly=0.5", "--in-take", "t1");
+ assert.equal(r.code, 0, r.err + r.out);
+ assert.equal(await text(a), before, "the project's manifest untouched");
+ const n = (await resolveTakeManifest(a.dir, "t1")).manifest.timeline[0].narration;
+ assert.equal(n.pick, 1);
+ assert.match(n.takes[1].file, /^narration\/posts\/1\/take-2\.pause-orpheus\.wav$/);
+ assert.deepEqual(n.takes[1].words.map((w) => w.start), [3.6, 3.85, 4.0, 5.1]);
+ assert.ok(await stat(path.join(a.dir, n.takes[1].file)));
+});
+
test("--import-item: an item of another project cloned into the take with its narration and pick, its files HARD-LINKED in, the authors' pictures; placed; again: unchanged; the source and the project untouched", async () => {
const src = await project("imp-src", [narrated("10", "2026-10-30T12:30:00.000Z"), narrated("11", "2026-10-30T12:40:00.000Z"), narrated("12", "2026-10-30T12:50:00.000Z")], {
postAvatars: { neighbour_one: { src: "posts-media/_avatars/neighbour_one.jpg", source: "archive" } },