commit c403eb8ed65d693f53ce2133f9b29ae323500b7c
parent 89965e5cdc26fae5daffdb75fbc170f7886dc298
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 02:40:03 -0400
umtool e2e: claim-bench, deck and article-notes read the Inbox
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
3 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/umtool/e2e/article-notes.spec.ts b/umtool/e2e/article-notes.spec.ts
@@ -204,12 +204,13 @@ test("open notes are open decisions, linked to the note; ?note= opens on it", as
const id = JSON.parse(readFileSync(NOTES, "utf8")).notes[0].id;
await page.goto("/sites?notes=open");
- await expect(page.locator("[data-article='priv/polemic-alpha'] [data-open-notes]")).toHaveAttribute("data-open-notes", "1");
+ await expect(page.locator("[data-piece='a:priv/polemic-alpha']")).toHaveAttribute("data-open-notes", "1");
- await page.goto("/browse/decisions?kind=open-note");
- const row = page.locator("[data-project='sites/priv/polemic-alpha'] [data-decision='open-note']");
+ // The Inbox's Notes card for the article, its one action the note.
+ await page.goto("/");
+ const row = page.locator("[data-group=notes] [data-piece='a:priv/polemic-alpha'][data-card='open-note']");
await expect(row).toContainText("For the inbox.");
- await row.getByRole("link").click();
+ await row.locator("[data-action-link]").click();
await expect(page).toHaveURL(new RegExp(`/sites/priv/polemic-alpha\\?note=${id}`));
await expect(page.locator(`[data-note-card='${id}']`)).toHaveAttribute("aria-current", "true");
});
diff --git a/umtool/e2e/claim-bench.spec.ts b/umtool/e2e/claim-bench.spec.ts
@@ -48,14 +48,23 @@ const tokenFor = async (
return (await r.json()) as { token: string; gaps: string[]; cues: unknown[]; at: number };
};
-test("an unadjudicated claim is one BLOCKING row, naming the fields it lacks", async ({ page }) => {
- await page.goto("/browse/decisions");
- const row = page.getByText(/no ruling on/).first();
- await expect(row).toBeVisible();
+// The decision list became the Inbox (P3, one card per piece and kind); the
+// rows themselves are the decisions API's, one per decision.
+const rows = async (request: import("@playwright/test").APIRequestContext) =>
+ ((await (await request.get("/api/browse/decisions")).json()) as {
+ items: { kind: string; project: string; target: string; severity: string; why: string }[];
+ }).items.filter((d) => d.project === PROJECT);
+
+test("an unadjudicated claim is one BLOCKING row, naming the fields it lacks", async ({ request, page }) => {
+ const k03 = (await rows(request)).filter((d) => d.kind === "claim-unadjudicated" && d.target === "k03");
+ expect(k03).toHaveLength(1);
+ expect(k03[0].severity).toBe("blocking");
+ expect(k03[0].why).toMatch(/no ruling on/);
// All six, because nobody has touched k03.
- await expect(row).toContainText("scope");
- await expect(row).toContainText("population");
- await expect(row).toContainText("valueKind");
+ for (const f of ["scope", "population", "valueKind"]) expect(k03[0].why).toContain(f);
+ // The Inbox carries them as one Blocking card on the project's piece.
+ await page.goto("/");
+ await expect(page.locator(`[data-group=blocking] [data-piece='p:${PROJECT}'][data-card='claim-unadjudicated']`)).toBeVisible();
});
test("the claim page opens on the quote inside its context, not on the quote alone", async ({ page }) => {
@@ -128,10 +137,11 @@ test("a stale token is a 409, never a silent overwrite", async ({ request }) =>
expect(readClaim("k01").scope).toBe("media");
});
-test("a fired predicate is an OPEN row, in plain words", async ({ page }) => {
- await page.goto("/browse/decisions");
+test("a fired predicate is an OPEN row, in plain words", async ({ request }) => {
// k02 is `derived`, so the sum is ours and the inbox has to say so.
- await expect(page.getByText(/our sum, not his figure/)).toBeVisible();
+ const fired = (await rows(request)).filter((d) => /our sum, not his figure/.test(d.why));
+ expect(fired.length).toBeGreaterThan(0);
+ expect(fired.every((d) => d.severity === "open")).toBe(true);
});
test("the context read is ±90s around the cite, not the clip's window", async ({ request }) => {
diff --git a/umtool/e2e/deck.spec.ts b/umtool/e2e/deck.spec.ts
@@ -33,17 +33,16 @@ const decisions = async (
// 1. The decisions inbox.
// ---------------------------------------------------------------------------
-// A STATIC segment inside app/browse/[song]/'s territory. When this regresses
-// the page still renders perfectly on its own and only the URL stops working,
-// so it is worth an assertion of its own.
-test("/browse/decisions is not swallowed by the [song] route", async ({ page }) => {
+// The decision list became the Inbox (P3): /browse/decisions redirects to /,
+// before the /browse catch-all could make it a project called "decisions".
+test("/browse/decisions is the Inbox, and deck's calls are on it", async ({ page }) => {
const res = await page.goto("/browse/decisions");
expect(res?.status()).toBe(200);
- await expect(page.getByRole("navigation", { name: "Breadcrumb" })).toContainText("decisions");
- // If the catch-all had swallowed it, this would be a 404 for a project called
- // "decisions". A decision's `project` is a PATH now, so the suffix identifies
- // the song without hard-coding how deep the fixture nests it.
- await expect(page.locator("[data-project$='/deck']")).toBeVisible();
+ await expect(page).toHaveURL(/\/$/);
+ await expect(page.getByRole("navigation", { name: "Breadcrumb" })).toContainText("Inbox");
+ // A piece id names the project by its PATH, so the suffix identifies the
+ // song without hard-coding how deep the fixture nests it.
+ await expect(page.locator("[data-piece$='/deck']").first()).toBeVisible();
});
test("deck's open decisions are exactly the three that were seeded", async ({ request }) => {