Archilyzer · Source

archilyzer

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

commit 769dac3e904f3400223a3d3856b2de197680393d
parent 6bf33f953ef3ea1c1faf2f12263a25cb78b06ef5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu,  1 Oct 2026 13:21:27 -0400

umtool e2e: the posts spec's timings at the fixture's 0.2 s crossfade

c01's two posts share the 5.3 s before its leave (2.65 s each), p-late
appears 4 s before c02's; the cut is 13.6 s with the holds.

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

Diffstat:
Mumtool/e2e/onscreen-posts.spec.ts | 45++++++++++++++++++++++++---------------------
1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/umtool/e2e/onscreen-posts.spec.ts b/umtool/e2e/onscreen-posts.spec.ts @@ -15,12 +15,15 @@ import { deckGeometry, postWindows, postsGeometry, shiftedFootage } from "umtool // the posts back to automatic and shown, and the deck back to its defaults, // through the routes before it starts. // -// With the defaults (posts.seconds 4, hold 2.5, shift on) the estimate is: -// c01 0 → 5.5 3 s clip + a 2.5 s hold; p-early at 0, p-mid at 2.5 -// c02 5 → 10.5 3 s clip + a 2.5 s hold; p-late at 6 -// k01 10 → 13 the card +// With the defaults (posts.seconds 4, hold 2.5, shift on) and the fixture's +// 0.2 s crossfade, the estimate is: +// c01 0 → 5.5 3 s clip + a 2.5 s hold; two posts in 5.3 s share it, +// p-early at 0, p-mid at 2.65 +// c02 5.3 → 10.8 3 s clip + a 2.5 s hold; p-late at 6.6, 4 s before +// its leave at 10.6 +// k01 10.6 → 13.6 the card // and the footage moves aside as each clip's first post appears (c01 at 0, -// c02 at 6), with the posts column at the frame's right edge. +// c02 at 6.6), with the posts column at the frame's right edge. // // The posts region's COMPOSITION is compose-chrome's (`region: "posts"`): the // preview test asserts every window composes and its page reports @@ -273,19 +276,19 @@ test("the preview composes the posts region per window and overlays it while the // start and the total measured with the holds. expect(pv.schedule.segments.map((s) => [s.id, s.start, s.duration, s.hold ?? 0])).toEqual([ ["c01", 0, 5.5, 2.5], - ["c02", 5, 5.5, 2.5], - ["k01", 10, 3, 0], + ["c02", 5.3, 5.5, 2.5], + ["k01", 10.6, 3, 0], ]); - expect(pv.schedule.total).toBe(13); + expect(pv.schedule.total).toBe(13.6); expect(pv.schedule.posts.map((p) => [p.id, p.segment, p.appear, p.out])).toEqual([ - ["p-early", "c01", 0, [5, 5.5]], - ["p-mid", "c01", 2.5, [5, 5.5]], - ["p-late", "c02", 6, [10, 10.5]], + ["p-early", "c01", 0, [5.3, 5.5]], + ["p-mid", "c01", 2.65, [5.3, 5.5]], + ["p-late", "c02", 6.6, [10.6, 10.8]], ]); - expect(pv.posts.windows.map(({ from, to }) => [from, to])).toEqual([[0, 5.5], [6, 10.5]]); + expect(pv.posts.windows.map(({ from, to }) => [from, to])).toEqual([[0, 5.5], [6.6, 10.8]]); // The footage makes room: one move per carrying clip, and the column at the frame's edge. const render = readManifest().render; - expect(pv.schedule.moves?.map((m) => [m.segment, m.at, m.seconds])).toEqual([["c01", 0, 0.6], ["c02", 6, 0.6]]); + expect(pv.schedule.moves?.map((m) => [m.segment, m.at, m.seconds])).toEqual([["c01", 0, 0.6], ["c02", 6.6, 0.6]]); expect(pv.schedule.moves?.[0].from).toEqual(deckGeometry(render).footage); expect(pv.schedule.moves?.[0].to).toEqual(shiftedFootage(render)); expect(pv.posts.geometry).toEqual(postsGeometry(render)); @@ -307,15 +310,15 @@ test("the preview composes the posts region per window and overlays it while the await expect(page.locator("[data-posts-window]")).toHaveCount(2); // The scrubber runs the held length, and the window marks sit on its clock. - await expect(page.getByTestId("onscreen-scrubber")).toHaveAttribute("max", "13"); - await expect(page.getByTestId("onscreen-time")).toContainText("/ 0:13.0"); - for (const [seg, from, to] of [["c01", 0, 5.5], ["c02", 6, 10.5]] as const) { + await expect(page.getByTestId("onscreen-scrubber")).toHaveAttribute("max", "13.6"); + await expect(page.getByTestId("onscreen-time")).toContainText("/ 0:13.6"); + for (const [seg, from, to] of [["c01", 0, 5.5], ["c02", 6.6, 10.8]] as const) { const style = await page.locator(`[data-posts-window="${seg}"]`).evaluate((el) => [ parseFloat((el as HTMLElement).style.left), parseFloat((el as HTMLElement).style.width), ]); - expect(style[0]).toBeCloseTo((from / 13) * 100, 2); - expect(style[1]).toBeCloseTo(((to - from) / 13) * 100, 2); + expect(style[0]).toBeCloseTo((from / 13.6) * 100, 2); + expect(style[1]).toBeCloseTo(((to - from) / 13.6) * 100, 2); } // A held segment shows its hold: a hatched tail, hold/duration of its block. @@ -349,7 +352,7 @@ test("the preview composes the posts region per window and overlays it while the expect(Math.abs(box.width / frame.width - pv.posts.geometry.width / W)).toBeLessThan(0.01); // The backdrop moves inside the window: the window mark put the scrubber at - // 8.25, past c02's move (6 → 6.6), so the footage is all the way aside... + // 8.7, past c02's move (6.6 → 7.2), so the footage is all the way aside... const from = pv.schedule.moves![1].from; const to = pv.schedule.moves![1].to; const backdrop = page.getByTestId("onscreen-backdrop-frame"); @@ -361,12 +364,12 @@ test("the preview composes the posts region per window and overlays it while the // ...its box's left edge where the build puts it (in frame pixels)... expect((aside[2] / aside[4]) * W + aside[0] * from.x).toBeCloseTo(to.x, 0); // ...half way through the move at its middle, on the smoothstep curve... - await seek(page, 6.3); + await seek(page, 6.9); await expect(backdrop).toHaveAttribute("data-move-progress", "0.5"); const half = (await backdropMatrix(page))!; expect(half[0]).toBeCloseTo((1 + to.width / from.width) / 2, 3); // ...in its box before the move... - await seek(page, 5.9); + await seek(page, 6.5); await expect(page.getByTestId("onscreen-current")).toHaveText("c02"); await expect(backdrop).toHaveAttribute("data-move-progress", "0"); expect((await backdropMatrix(page))?.[0] ?? 1).toBeCloseTo(1, 3);