Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit dd4a6b6cdbdf90756a491008dab298f538baf2e3
parent b13fe06f277bd573fb1136315c6dd684e012a62b
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon,  2 Nov 2026 17:03:36 -0500

umtool e2e: reel-play -- the walk on the clip bench's parts (the master's waveform, zoom, nudges and a drag held to the segment, tighten, undo, Confirm, Back) and a beat's gap (Alt + drag, Cut gap, Play skips it, the clock counts kept seconds, undo)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mumtool/e2e/reel-play.spec.ts | 90++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 76 insertions(+), 14 deletions(-)

diff --git a/umtool/e2e/reel-play.spec.ts b/umtool/e2e/reel-play.spec.ts @@ -17,11 +17,13 @@ import * as urls from "./urls"; // reel-none-fixture its one take a draft with no master. // // The reel's Play (from the master, the crossfade, the clock against the -// limit, a note on a beat), its walk (handles and nudges on the master's -// frames, written in source seconds through the one writer, an undo point per -// write, Confirm walks on, Back to the reel), Cut the trailer as a job with -// the result's local path, and the no-master state. Fixture: -// e2e/fixtures/reel-fixture.mjs. +// limit, a note on a beat), its walk -- the reel's own editor on the clip +// bench's parts (lane/reel-bench): the master's waveform and zoom, nudges and +// a drag held to what the master rendered, written in source seconds through +// the one writer, tighten, an undo point per write, Confirm walks on, Back to +// the reel -- a beat's gap (Alt + drag, Cut gap; Play skips it and counts kept +// seconds), Cut the trailer as a job with the result's local path, and the +// no-master state. Fixture: e2e/fixtures/reel-fixture.mjs. // --------------------------------------------------------------------------- const HERE = path.dirname(fileURLToPath(import.meta.url)); @@ -103,7 +105,7 @@ test("the Trailer page lists the reels; a reel plays from the take's rendered ma await expect(page.locator("[data-reel-walk]")).toHaveAttribute("data-reel-beat", "2"); }); -test("the walk: in/out on the master's frames, written in source seconds through the one writer; each write an undo point; Confirm walks on; Back to the reel", async ({ page }) => { +test("the walk is the reel's own editor on the clip bench's parts: the master's waveform and zoom, nudges and a drag held to what the master rendered, saved in source seconds; tighten; undo; Confirm walks on; Back to the reel", async ({ page }) => { await page.setViewportSize({ width: 1366, height: 1000 }); await page.goto(urls.reelWalkHref(PROJECT, { beat: 2 })); const walk = page.locator("[data-reel-walk]"); @@ -111,31 +113,51 @@ test("the walk: in/out on the master's frames, written in source seconds through await expect(walk).toHaveAttribute("data-reel-dirty", "0"); await expect(page.locator("[data-reel-source-edges]")).toHaveText("source 0:05.00 – 0:06.50"); await expect(page.locator("[data-reel-beat-quote]")).toContainText("the words of c03"); - await expect(page.locator("[data-reel-handle]")).toHaveCount(2); + await expect(page.locator("[data-reel-limits]")).toContainText("0:04.75–0:06.75"); + // The master's waveform (its envelope, on the clip's source clock), over the seconds its segment plays. + const box = page.locator("[data-wave-box]"); + await expect(box).toHaveAttribute("data-wave-vis", "4.75-6.75"); + await expect(page.locator("[data-reel-walk-video]")).toHaveAttribute("src", /\/api\/report\/file\?.*path=takes%2Fdraft-1%2Fout%2Freel-fixture\.mp4/); + await expect(page.locator("[data-playback]")).toHaveAttribute("data-audio-state", "ready", { timeout: 15_000 }); - // ] twice: the in edge 0.1 s later; . with Shift: the out edge 0.5 s later -- held to the clip's cut (6.75). + // The zoom: z closer (the ruler and the overview), f back to the whole segment. + await page.keyboard.press("z"); + await expect(box).not.toHaveAttribute("data-wave-vis", "4.75-6.75"); + await expect(page.locator("[data-zoom-overview]")).toHaveCount(1); + await page.keyboard.press("f"); + await expect(box).toHaveAttribute("data-wave-vis", "4.75-6.75"); + + // ] twice: the in edge 0.1 s later; . with Shift: the out edge 0.5 s later -- held to the segment (6.75), and said. await page.keyboard.press("]"); await page.keyboard.press("]"); await page.keyboard.press("Shift+."); await expect(walk).toHaveAttribute("data-reel-dirty", "1"); await expect(page.locator("[data-reel-source-edges]")).toHaveText("source 0:05.10 – 0:06.75"); + await expect(page.locator("[data-reel-limit-hit='end']")).toContainText("the end of what the master rendered for c03"); await page.keyboard.press("Enter"); await expect.poll(() => beatsOf()[1]).toEqual({ id: "c03", start: 5.1, end: 6.75 }); await expect(walk).toHaveAttribute("data-reel-dirty", "0"); - await expect(page.locator("[data-reel-msg]")).toContainText("saved — beat 2 5.1–6.75"); + await expect(page.locator("[data-reel-msg]")).toContainText("saved beat 2: edges"); - // A handle dragged: the in edge back to the segment's start (the clip's cut, 4.75). - const track = await page.locator("[data-reel-track]").boundingBox(); - const h = await page.locator("[data-reel-handle='from']").boundingBox(); - await page.mouse.move(h!.x + h!.width / 2, h!.y + h!.height / 2); + // The in handle dragged on the waveform past the segment's start: held at 4.75. + const wb = (await box.boundingBox())!; + const xOf = (t: number) => wb.x + ((t - 4.75) / 2) * wb.width; + await page.mouse.move(xOf(5.1), wb.y + wb.height / 2); await page.mouse.down(); - await page.mouse.move(track!.x + 2, h!.y + h!.height / 2, { steps: 5 }); + await page.mouse.move(wb.x - 20, wb.y + wb.height / 2, { steps: 6 }); await page.mouse.up(); await expect(page.locator("[data-reel-source-edges]")).toHaveText("source 0:04.75 – 0:06.75"); await page.locator("[data-reel-save]").click(); await expect.poll(() => beatsOf()[1]).toEqual({ id: "c03", start: 4.75, end: 6.75 }); await page.screenshot({ path: test.info().outputPath("reel-walk.png") }); + // Tighten to the sentence is the clip bench's own button, over the clip's words: it says what it did. + await page.locator("[data-tighten]").click(); + await expect(page.locator("[data-reel-msg]")).toContainText(/tightened|already tight|not tightened/); + // A tighten that moved the edges is a write of its own: U takes it back. + await page.waitForTimeout(300); + if (JSON.stringify(beatsOf()[1]) !== JSON.stringify({ id: "c03", start: 4.75, end: 6.75 })) await page.keyboard.press("u"); + await expect.poll(() => beatsOf()[1]).toEqual({ id: "c03", start: 4.75, end: 6.75 }); // U: the last write undone, then the one before. await page.keyboard.press("u"); await expect.poll(() => beatsOf()[1]).toEqual({ id: "c03", start: 5.1, end: 6.75 }); @@ -158,6 +180,46 @@ test("the walk: in/out on the master's frames, written in source seconds through await expect(page.locator("[data-beat='2'] [data-beat-verdict='confirmed']")).toHaveCount(1); }); +test("a beat's gap: Alt + drag on the master's waveform, Cut gap writes it in source seconds, the reel's Play skips it and its clock counts kept seconds; undo takes it back", async ({ page }) => { + await page.setViewportSize({ width: 1366, height: 1000 }); + await page.goto(urls.reelWalkHref(PROJECT, { beat: 2 })); + const box = page.locator("[data-wave-box]"); + await expect(box).toHaveAttribute("data-wave-vis", "4.75-6.75"); + const wb = (await box.boundingBox())!; + const xOf = (t: number) => wb.x + ((t - 4.75) / 2) * wb.width; + const y = wb.y + wb.height / 2; + await page.keyboard.down("Alt"); + await page.mouse.move(xOf(5.5), y); + await page.mouse.down(); + await page.mouse.move(xOf(5.8), y, { steps: 5 }); + await page.mouse.up(); + await page.keyboard.up("Alt"); + await expect(page.locator("[data-gap-cut]")).toBeVisible(); + await page.keyboard.press("g"); + await expect.poll(() => (beatsOf()[1] as { gaps?: { from: number; to: number }[] }).gaps?.length ?? 0).toBe(1); + const g = (beatsOf()[1] as { gaps: { from: number; to: number }[] }).gaps[0]; + expect(Math.abs(g.from - 5.5)).toBeLessThan(0.03); + expect(Math.abs(g.to - 5.8)).toBeLessThan(0.03); + await expect(page.locator("[data-reel-walk]")).toHaveAttribute("data-reel-gaps", `${g.from}-${g.to}`); + await expect(page.locator("[data-gaps-summary]")).toContainText("1 gap"); + await expect(page.locator("[data-reel-msg]")).toContainText("one beat of jump cuts"); + + // Play the reel: 3.8 s less the gap's seconds, and it plays through, skipping it. + await page.goto(urls.reelPlayHref(PROJECT)); + const cut = g.to - g.from; + const total = 3.8 - cut; + await expect(page.locator("[data-reel-clock]")).toHaveText(`0:00.0 / 0:0${total.toFixed(1)}`); + await page.locator("[data-reel-toggle]").click(); + await expect(root(page)).toHaveAttribute("data-reel-beat", "3", { timeout: 15_000 }); + await expect(root(page)).toHaveAttribute("data-reel-state", "paused", { timeout: 15_000 }); + expect(Number(await root(page).getAttribute("data-reel-t"))).toBeGreaterThan(total - 0.2); + + // Back on the walk, U takes the gap back. + await page.goto(urls.reelWalkHref(PROJECT, { beat: 2 })); + await page.keyboard.press("u"); + await expect.poll(() => beatsOf()[1]).toEqual({ id: "c03", start: 5, end: 6.5 }); +}); + test("Cut the trailer: a job on the runner, its log, the result playing on the page with its local path; a new reel", async ({ page }) => { await page.setViewportSize({ width: 1366, height: 1000 }); await page.goto(urls.trailerHref(PROJECT, { reel: "teaser" }));