Archilyzer · Source

archilyzer

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

commit e579610c89dfcd6fc8f3c86b73ccb0dd0057a70a
parent c06a08f4db6d938594f92ab9bccbf2cebd665c7c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Thu, 12 Nov 2026 02:18:26 -0500

umtool e2e: the Inbox spec's first look at the list after a Park, Mark done, Reactivate, Mute, Unmute or Undo waits 20 s -- the write had landed and the refresh was asked for, the server was slow for those seconds

Co-Authored-By: Claude <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 1+
Mumtool/e2e/inbox.spec.ts | 26+++++++++++++++++++-------
2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## [Unreleased] +- **umtool e2e: the Inbox spec waits for the list after a Park, Mute or Undo.** Three runs failed where the list had not changed 5 seconds after Reactivate, Unmute or Undo. In each the write had been saved and the page's refresh had been asked for; the server was slow for those seconds (a neighbouring suite was building) and the check gave up first. The first look at the list after such a write now waits up to 20 seconds. Nothing in the app changed: the lifecycle and the mutes are read from disk on every render, and the rail's count is memoised for 10 seconds by design and cleared by those writes. - **umtool: the trail no longer draws a 0 lb point for a row with no number.** A measure event whose value was empty was read as 0 and plotted at the foot of the trail. Such a row is now left off; a real 0 is still drawn. - **umtool: `posts attach` finds captures in the archive too.** On a project with its own channels tree (a `.shadow-channels`), `umtool posts attach` and `posts repeats` looked for a post's capture only there, so media captured into the real archive's `channels/<slug>/posts-media/<id>/` was not seen. They now look in the project's tree first and then the archive's, as the other readers do. The archive is only read: the files are copied into the project as before. `--dry-run` prints which tree each file would come from. - **umtool: an entry's chapter name is set from a terminal.** An entry's `chapter` names it in the chapter list (the YouTube text, `umtool export --format chapters`) in place of its on-screen title, and it could only be written by editing the manifest by hand. `umtool set <p> <entry> chapter='The weigh-in'` writes it for any entry (a clip, a post item, a still), `chapter=` clears it, and `--take <t>` writes it on that take alone. One line, at most 100 characters. diff --git a/umtool/e2e/inbox.spec.ts b/umtool/e2e/inbox.spec.ts @@ -32,6 +32,15 @@ const setLife = (request: APIRequestContext, piece: string, state: string) => request.post("/api/pieces/lifecycle", { data: { piece, state } }); const card = (page: Page, piece: string, kind: string) => page.locator(`[data-lit-line][data-piece='${piece}'][data-card='${kind}']`); +// A WRITE, THEN THE LIST AGAIN. Park, Mark done, Reactivate, Mute, Unmute and Undo POST, then router.refresh(): the +// list changes when the refreshed page has been rendered and streamed whole. Three failures of this spec (11 Nov: +// :122 Reactivate, :178 Unmute, and Undo after Mark done) were all that step late, not wrong: the POST had answered +// 200 and the refresh's request had gone out and been answered, the lifecycle and the mutes are read from disk on +// every render (never memoised), and in the one trace that shows it a HEAD of the same page, sent in the same +// second, took 5.8 s to answer -- the server was that slow for those seconds (another suite's build beside it) and +// the default 5 s expect gave up first. So the FIRST look at the list after such a write waits this long. +const SETTLES = { timeout: 20_000 }; + test.beforeAll(async ({ playwright }) => { test.setTimeout(WARM_TIMEOUT); await warm(playwright, ["/", "/?hidden=1", "/api/browse/decisions", "/api/rail", "/settings/system", "/projects"]); @@ -95,6 +104,7 @@ test("j lights the next card, and only the lit card's action wears Signal", asyn }); test("Park hides a piece's calls, Undo brings them back; Show hidden lists them with Reactivate", async ({ page, request }) => { + test.slow(); // room for SETTLES on a loaded machine try { await page.goto(urls.homeHref()); const ready = card(page, ZETA, "iteration-ready"); @@ -104,12 +114,12 @@ test("Park hides a piece's calls, Undo brings them back; Show hidden lists them await ready.click(); await ready.locator("[data-lifecycle-to=parked]").click(); await expect(page.locator(`[data-undo='${ZETA}']`)).toContainText("Parked"); - await expect(page.locator(`[data-lit-line][data-piece='${ZETA}']`)).toHaveCount(0); + await expect(page.locator(`[data-lit-line][data-piece='${ZETA}']`)).toHaveCount(0, SETTLES); await expect(page.locator("[data-inbox-count]")).not.toHaveAttribute("data-inbox-count", String(before)); await expect(page.locator("[data-show-hidden]")).toContainText(/^Show hidden \d+$/); await page.locator(`[data-undo='${ZETA}']`).getByRole("button", { name: "Undo" }).click(); - await expect(ready).toBeVisible(); + await expect(ready).toBeVisible(SETTLES); await expect(page.locator("[data-inbox-count]")).toHaveAttribute("data-inbox-count", String(before)); // Parked again, it is listed under Hidden, and Reactivate is its action. @@ -119,7 +129,7 @@ test("Park hides a piece's calls, Undo brings them back; Show hidden lists them await expect(hidden).toBeVisible(); await hidden.click(); await hidden.locator("[data-lifecycle-to=active]").click(); - await expect(page.locator(`[data-group=hidden] [data-lit-line][data-piece='${ZETA}']`)).toHaveCount(0); + await expect(page.locator(`[data-group=hidden] [data-lit-line][data-piece='${ZETA}']`)).toHaveCount(0, SETTLES); await expect(card(page, ZETA, "iteration-ready")).toBeVisible(); } finally { await setLife(request, ZETA, "active"); @@ -127,6 +137,7 @@ test("Park hides a piece's calls, Undo brings them back; Show hidden lists them }); test("Mark done on a piece that looks done takes it off the Inbox; Undo puts it back", async ({ page, request }) => { + test.slow(); // room for SETTLES on a loaded machine try { await page.goto(urls.homeHref()); const done = page.locator(`[data-group=ready-to-finish] [data-piece='${ALPHA}'][data-card='looks-done']`); @@ -134,15 +145,16 @@ test("Mark done on a piece that looks done takes it off the Inbox; Undo puts it await done.click(); await done.locator("[data-lifecycle-to=done]").click(); await expect(page.locator(`[data-undo='${ALPHA}']`)).toContainText("Marked done"); - await expect(done).toHaveCount(0); + await expect(done).toHaveCount(0, SETTLES); await page.locator(`[data-undo='${ALPHA}']`).getByRole("button", { name: "Undo" }).click(); - await expect(done).toBeVisible(); + await expect(done).toBeVisible(SETTLES); } finally { await setLife(request, ALPHA, "active"); } }); test("Mute is the server's: the card leaves, its rows stay hidden-by-muted, Muted N lists it with Unmute", async ({ page, request }) => { + test.slow(); // room for SETTLES on a loaded machine const rows = async () => ((await (await request.get("/api/browse/decisions")).json()) as { items: { piece?: string; kind: string; hidden: boolean; hiddenBy?: string }[]; muted: number }) try { @@ -153,7 +165,7 @@ test("Mute is the server's: the card leaves, its rows stay hidden-by-muted, Mute await ready.click(); await ready.locator("[data-mute=mute]").click(); await expect(page.locator(`[data-undo='${ZETA}']`)).toContainText("Muted"); - await expect(ready).toHaveCount(0); + await expect(ready).toHaveCount(0, SETTLES); // Never dropped: every row is still in the API, hidden, and says why. const after = await rows(); @@ -175,7 +187,7 @@ test("Mute is the server's: the card leaves, its rows stay hidden-by-muted, Mute await expect(muted).toHaveAttribute("data-muted", ""); await muted.click(); await muted.locator("[data-mute=unmute]").click(); - await expect(muted).toHaveCount(0); + await expect(muted).toHaveCount(0, SETTLES); await expect(page.locator(`[data-group=review] [data-lit-line][data-piece='${ZETA}'][data-card='iteration-ready']`)).toBeVisible(); expect((await rows()).items.filter((d) => d.piece === ZETA && d.kind === "iteration-ready").every((d) => !d.hidden)).toBe(true); } finally {