commit 8d9409448f390dadca468379e71ad93ca6f0d2e4
parent 6747f87e29cb9e7ee581becd075529acb2df9e85
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 2 Nov 2026 05:51:30 -0500
umtool research: the verify panel's status follows a save; the e2e spec waits out a cold window read
After Save as corrected the status buttons still showed the row's old status; they now show what
was saved. The capture table's dates no longer wrap. case-stages.spec: leads.json read only once
it exists, a reload before reading the verify panel again (another #stage on the same page only
scrolls), and 20 s for the first window read of a busy machine.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/umtool/components/research/stages/EvidencePanel.tsx b/umtool/components/research/stages/EvidencePanel.tsx
@@ -178,7 +178,7 @@ export default function EvidencePanel({ caseId, initial }: { caseId: string; ini
</a>
{r.slug && <span className="block text-[11px] text-muted">into {r.slug}</span>}
</TD>
- <TD className="font-mono text-[12px]">{iso(r.captureTs) || iso(r.at) || "—"}</TD>
+ <TD className="whitespace-nowrap font-mono text-[12px]">{iso(r.captureTs) || iso(r.at) || "—"}</TD>
<TD>
<span className={badgeVariants({ variant: STATE_BADGE[r.state], size: "sm" })}>{r.state}</span>
{r.message && r.state !== "excluded" && <span className="block text-[11.5px] text-muted">{r.message}</span>}
diff --git a/umtool/components/research/stages/VerifyPanel.tsx b/umtool/components/research/stages/VerifyPanel.tsx
@@ -129,6 +129,8 @@ export default function VerifyPanel({ caseId, initial }: { caseId: string; initi
try {
const r = await call<{ view: VerifyView }>(caseStageApi(caseId, "verify"), { method: "POST", body: { row: row.row, note, ...patch } });
setView(r.view);
+ // The status buttons show what was saved (a correction by hand is "corrected").
+ setStatus(patch.status);
} catch (e) {
setError((e as Error).message);
} finally {
diff --git a/umtool/e2e/case-stages.spec.ts b/umtool/e2e/case-stages.spec.ts
@@ -1,5 +1,5 @@
import { test, expect, type Page } from "@playwright/test";
-import { mkdirSync, readFileSync } from "node:fs";
+import { existsSync, mkdirSync, readFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { EXCLUDED_URL, FORUM, PAGES, PRIVATE_NAME, STAGES_CASE, TARGET_URL, nameHash } from "./fixtures/case-stages-fixture.mjs";
@@ -69,7 +69,8 @@ test("the pipeline lists the stages; verify shows both tracks side by side, and
await expect(detail.locator("[data-quote]")).toContainText(EN_REWRITE.en);
const orig = detail.locator('[data-track="en-orig"]');
const en = detail.locator('[data-track="en"]');
- await expect(orig).toContainText("original audio captions");
+ // The window is read from the corpus on first view: give it the time a cold shard read takes on a busy machine.
+ await expect(orig).toContainText("original audio captions", { timeout: 20_000 });
await expect(orig).toContainText(EN_REWRITE.orig);
await expect(en).toContainText(EN_REWRITE.en);
await expect(en.locator("[data-lit]")).toHaveText([EN_REWRITE.en]);
@@ -81,6 +82,7 @@ test("the pipeline lists the stages; verify shows both tracks side by side, and
await detail.getByRole("button", { name: "Save as corrected" }).click();
await expect(list.locator('[data-finding="f1"]')).toHaveAttribute("data-status", "corrected");
await expect(detail.locator("[data-original]")).toHaveText(`The reader wrote: “${EN_REWRITE.en}” (host)`);
+ await expect(detail.getByRole("group", { name: "Verify status" }).getByRole("button", { name: "Corrected", exact: true })).toHaveAttribute("aria-pressed", "true");
await expect(detail.locator("[data-quote]")).toContainText(EN_REWRITE.orig);
await expect(orig.locator("[data-track-holds]")).toHaveText("holds the quote");
const f1 = findings().find((r) => r.row === "f1");
@@ -119,7 +121,7 @@ test("the audio check transcribes the window through the editor, while paused, a
await list.locator('[data-finding="f3"]').click();
const f3 = page.locator('[data-verify-detail="f3"]');
await expect(f3.locator("[data-forum-hint]")).toContainText("First seen on a forum");
- await expect(f3.locator('[data-track="post"]')).toContainText("forum post #3 by deckhand");
+ await expect(f3.locator('[data-track="post"]')).toContainText("forum post #3 by deckhand", { timeout: 20_000 });
await f3.getByRole("group", { name: "Verify status" }).getByRole("button", { name: "Quarantined", exact: true }).click();
await f3.getByRole("button", { name: "Save status" }).click();
await expect(list.locator('[data-finding="f3"]')).toHaveAttribute("data-status", "quarantined");
@@ -146,7 +148,7 @@ test("leads: counted by post, a private name withheld; never-archive feeds a has
// A role, then never-archive: withheld, its name a hash in the case's private names.
await table.getByLabel("Role of x:@tidewatcher").fill("the account the forum blames");
await table.getByLabel("Role of x:@tidewatcher").blur();
- await expect.poll(() => read("leads.json")).toContain("the account the forum blames");
+ await expect.poll(() => (existsSync(path.join(CASE_DIR, "leads.json")) ? read("leads.json") : "")).toContain("the account the forum blames");
await table.getByLabel("Disposition of x:@tidewatcher").selectOption("never-archive");
await expect(leads.locator('p[role="status"]')).toContainText("kept as a hash");
await expect(table.locator('[data-lead="x:@tidewatcher"]')).toHaveCount(0);
@@ -210,7 +212,8 @@ test("evidence: an excluded target, a capture at a date, a forum attachment mark
await shot(page, "evidence-captures", "evidence");
// The finding says it everywhere it shows: its verify row, and the export (lane A's) with its Evidence section.
- await page.goto(researchCasePipelineHref(STAGES_CASE, "verify"));
+ // A new frame of the page (going to another #stage on the same page would only scroll).
+ await page.reload();
await expect(stage(page, "verify").locator('[data-finding="f3"] [data-evidence-label]')).toHaveText("forum attachment, post #3, unverified");
await page.getByRole("button", { name: "Export the report" }).click();
await expect(page.locator("#stage-export [data-stage-state]")).toHaveAttribute("data-stage-state", "done", { timeout: 30_000 });