commit 14cae07d455f382be9c6d0fc5b9cfa38dfe29882
parent 992c5b5bd825e4cc2087c4f71158d256136dbb65
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 9 Nov 2026 23:07:26 -0500
umtool: Rumble cites -- after a check, 'all' is the dead rows only; none dead says so (L6 review 2)
Every row only when no check has read any of them; a healthy row is never rewritten by the all press.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/umtool/components/projects/inspector/LinksInspector.tsx b/umtool/components/projects/inspector/LinksInspector.tsx
@@ -8,8 +8,8 @@ import { InspectorFrame, SaidLine, announceManifestChanged, call, refusal, useOn
// THE RUMBLE CITE FIX (umtool redesign L6, item 5; 4 and 8 Nov: a Rumble clip's QR named the URL-slug folder the
// corpus keeps it under, and the archive serves the EMBED id -- 15/15 dead on quartering-midterms): each clip of
// the cut that cites such a folder, with its published embed id read from the folder's metadata through L1's one
-// mapping, and "Use the published embed id" -- per row, and once for every dead Rumble row (every row when no
-// check has run). It writes `siteVideo` (a citeUrl naming the folder moves with it): POST /api/report/embed-ids,
+// mapping, and "Use the published embed id" -- per row, and once for every dead Rumble row (every row only when no
+// check has read any of them). It writes `siteVideo` (a citeUrl naming the folder moves with it): POST /api/report/embed-ids,
// one write, one undo point. No network; `umtool links <p>` checks the sites, `umtool links <p> --embed-ids` is
// this panel's twin. With `block`, only that clip's row.
@@ -33,7 +33,10 @@ export default function LinksInspector({ project, block = null }: InspectorProps
if (!view) return null;
const rows = block ? view.rows.filter((r) => r.clip === block) : view.rows;
const dead = rows.filter((r) => r.state === "dead");
- const allOf = dead.length ? dead : rows;
+ // Once a check has read these rows, "all" is the dead ones only (a row it found open is left as it is); with no
+ // check yet, every row.
+ const checked = rows.some((r) => r.state !== "unchecked");
+ const allOf = checked ? dead : rows;
const use = async (clips: string[]) => {
setBusy(true);
setSaid(null);
@@ -58,9 +61,11 @@ export default function LinksInspector({ project, block = null }: InspectorProps
kind="links"
title={`Rumble cites — ${rows.length} clip${rows.length === 1 ? "" : "s"} naming a folder id`}
aside={
- rows.length > 1 ? (
+ checked && rows.length && !dead.length ? (
+ <span className="text-[11.5px] text-muted" data-embed-no-dead="">no dead links at the last check</span>
+ ) : allOf.length > 1 ? (
<Button type="button" size="sm" variant="go" data-embed-use-all={allOf.length} disabled={busy} onClick={() => void use(allOf.map((r) => r.clip))}>
- {dead.length ? `Use the published embed id for all ${dead.length} dead` : `Use the published embed id for all ${rows.length}`}
+ {checked ? `Use the published embed id for all ${dead.length} dead` : `Use the published embed id for all ${rows.length}`}
</Button>
) : null
}
diff --git a/umtool/e2e/inspector-rumble-cite.spec.ts b/umtool/e2e/inspector-rumble-cite.spec.ts
@@ -1,5 +1,5 @@
import { test, expect as baseExpect } from "@playwright/test";
-import { readFileSync } from "node:fs";
+import { readFileSync, writeFileSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { openPanel } from "./panels";
@@ -46,6 +46,11 @@ test("one row: Use the published embed id -- siteVideo in the draft, the folder
await expect(panel.locator("[data-embed-row]")).toHaveCount(1);
expect(takeText()).toBe(take);
+ // A write without the token the panel read is refused, never blind.
+ const bare = await request.post("/api/report/embed-ids", { data: { project: P, clips: ["r02"] } });
+ expect(bare.status()).toBe(400);
+ expect(sv().r02).toBeNull();
+
// One press, one undo step.
const r = await request.post("/api/report/timeline", { data: { project: P, op: "undo" } });
expect(r.ok(), await r.text()).toBe(true);
@@ -66,3 +71,23 @@ test("every dead Rumble row in one press", async ({ page }) => {
await expect(panel.locator("[data-embed-none]")).toBeVisible();
expect(takeText()).toBe(take);
});
+
+test("a check that found the folder links open: no 'all' press, a row is fixed only by its own", async ({ page, request }) => {
+ await page.setViewportSize({ width: 1366, height: 768 });
+ // Back to the folder ids, then a check that read both links open.
+ const r = await request.post("/api/report/timeline", { data: { project: P, op: "undo" } });
+ expect(r.ok(), await r.text()).toBe(true);
+ expect(sv()).toEqual({ r01: null, r02: null, r03: null });
+ const file = path.join(DIR, "out", "links.json");
+ const doc = JSON.parse(readFileSync(file, "utf8")) as { links: { state: string; fix?: string; fixSiteVideo?: string; why?: string }[] };
+ doc.links = doc.links.map(({ fix: _f, fixSiteVideo: _s, why: _w, ...l }) => ({ ...l, state: "ok" }));
+ writeFileSync(file, JSON.stringify(doc, null, 2) + "\n");
+ await page.goto(urls.projectHref(P, { tab: "cut" }));
+ await openPanel(page, "options", "cut-project");
+ const panel = page.locator('[data-inspector="links"]');
+ await expect(panel.locator("[data-embed-row]")).toHaveCount(2);
+ await expect(panel.locator('[data-embed-row="r01"]')).toHaveAttribute("data-embed-state", "ok");
+ await expect(panel.locator("[data-embed-no-dead]")).toContainText("no dead links at the last check");
+ await expect(panel.locator("[data-embed-use-all]")).toHaveCount(0);
+ expect(sv()).toEqual({ r01: null, r02: null, r03: null });
+});