Archilyzer · Source

archilyzer

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

commit f3bdd0677d7cd766624df0e25c4db7865194d95f
parent cca70ad03add57bc3f327353ad0238187ebeab5c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun,  1 Nov 2026 01:55:14 -0400

umtool: a row's section is its deck section; flash-forward defaults to the start of the clip's own section; a take a render names says so on its card

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

Diffstat:
Mumtool/components/projects/TakesBench.tsx | 7+++++++
Mumtool/components/projects/TakesPage.tsx | 5++++-
Mumtool/components/projects/report/CutTab.tsx | 7++++---
Mumtool/components/projects/review/CutEditing.tsx | 2+-
Mumtool/e2e/cut-flash.spec.ts | 7++++---
Mumtool/e2e/take-housekeeping.spec.ts | 2++
6 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/umtool/components/projects/TakesBench.tsx b/umtool/components/projects/TakesBench.tsx @@ -52,6 +52,8 @@ export type Take = { draft?: boolean; /** The walk's last edit to its patch (later than builtAt: the render is older than the take). */ editedAt?: string | null; + /** What a running render names (takeHousekeeping.mjs renderHolds): it is rendering, or a render is made from it. */ + holds?: string[]; }; /** A take's work files, as `GET /api/report/takes/prune` measures them (lib/report/takePrune.mjs). */ @@ -693,6 +695,11 @@ function TakeCard({ picked </span> )} + {(t.holds ?? []).length > 0 && ( + <span data-take-held="" title={(t.holds ?? []).join("; ")} className={badgeVariants({ variant: "meter", size: "sm" })}> + {(t.holds ?? []).some((h) => h.startsWith("it is rendering")) ? "rendering now" : "a render is made from it"} + </span> + )} {superseded && ( <span data-take-superseded={superseded.by ?? ""} className={badgeVariants({ variant: "state", size: "sm" })}> superseded{superseded.by ? ` by ${superseded.by}` : ""} diff --git a/umtool/components/projects/TakesPage.tsx b/umtool/components/projects/TakesPage.tsx @@ -7,6 +7,7 @@ import { listTakes, readVerdicts } from "@/lib/report/takes.mjs"; import { pieceHrefOfProject } from "@/lib/pieces/article"; import type { ProjectRef } from "@/lib/project-types"; import { hashText, lastGroup, loadMontageStyles } from "@/lib/report/takeMaker.mjs"; +import { renderHolds } from "@/lib/report/takeHousekeeping.mjs"; import { fxPresetsFor } from "umtool-report-to-video/fx"; import NewTakePanel from "./NewTakePanel"; import TakesBench, { type Take, type TakeVerdict } from "./TakesBench"; @@ -35,7 +36,9 @@ export default async function TakesPage({ project }: { project: ProjectRef }) { } catch { effects = []; } - const takes = (listing.takes as Take[]).map((t) => ({ ...t, stale: t.baseHash ? t.baseHash !== current : null })); + // What a running render names (take housekeeping): the card says so, and relabel/delete refuse. + const holds = new Map(await Promise.all((listing.takes as Take[]).map(async (t) => [t.id, await renderHolds(project.dir, t.id)] as const))); + const takes = (listing.takes as Take[]).map((t) => ({ ...t, stale: t.baseHash ? t.baseHash !== current : null, holds: holds.get(t.id) ?? [] })); const byId = new Map(takes.map((t) => [t.id, t])); const panel = project.kind === "report-video" ? ( diff --git a/umtool/components/projects/report/CutTab.tsx b/umtool/components/projects/report/CutTab.tsx @@ -138,11 +138,12 @@ export default async function CutTab({ project, detail, search, tabHref }: Repor // opens each one, after the clip its marker follows. const sectionBars = (() => { const after = new Map<number, SectionInfo>(); - if (!deckOn(m?.render)) return { opening: null as SectionInfo | null, after }; + if (!deckOn(m?.render)) return { opening: null as SectionInfo | null, after, sectionOf: null as Map<string, number> | null }; const model = sectionModel(m); const words = (s: (typeof model.sections)[number]) => ({ ...s, words: sectionWords(s) }) as SectionInfo; model.placed.forEach((p: { pos: number }, i: number) => after.set(p.pos, words(model.sections[i + 1]))); - return { opening: model.sections.length > 1 ? words(model.sections[0]) : null, after }; + // Under the deck a row's § is its deck section (the markers), not the legacy `section` field. + return { opening: model.sections.length > 1 ? words(model.sections[0]) : null, after, sectionOf: model.sections.length > 1 ? (model.sectionOf as Map<string, number>) : null }; })(); const renderRow = (e: (typeof entries)[number], at: number) => { @@ -262,7 +263,7 @@ export default async function CutTab({ project, detail, search, tabHref }: Repor > bench → </Link> - <span className="micro">§{e.section ?? 0}</span> + <span className="micro" data-row-section={sectionBars.sectionOf?.get(e.id) ?? e.section ?? 0}>§{sectionBars.sectionOf?.get(e.id) ?? e.section ?? 0}</span> </span> </div> {(showAll || midSentence || e.proposed) && e.quote && ( diff --git a/umtool/components/projects/review/CutEditing.tsx b/umtool/components/projects/review/CutEditing.tsx @@ -56,7 +56,7 @@ export function FlashForwardForm({ const mine = secs.find((s) => s.clips.includes(clipId)); if (mine && secs.length > 1) { setWhere("section"); - setSection(String(Math.max(0, mine.index - 1))); + setSection(String(mine.index)); } }) .catch(() => {}); diff --git a/umtool/e2e/cut-flash.spec.ts b/umtool/e2e/cut-flash.spec.ts @@ -70,10 +70,11 @@ test("Flash-forward selection… copies the span earlier with its attribution an await page.locator('[data-action="flash-forward"]').click(); const form = page.getByTestId("flash-forward-form"); await expect(form).toBeVisible(); - // Its default: the start of the section before r002's (§0, the opening). + // Its default: the start of r002's own section (§1, after r001's boundary). await expect(page.getByTestId("ff-where-section")).toBeChecked(); + await expect(page.getByTestId("ff-section")).toHaveValue("1"); await page.getByTestId("ff-go").click(); - await expect.poll(() => clips().map((c) => c.id)).toEqual(["r002t", "r001", "r002", "r003"]); + await expect.poll(() => clips().map((c) => c.id)).toEqual(["r001", "r002t", "r002", "r003"]); const t = clip("r002t")!; expect(t.repeatOf).toBe("r002"); expect(t.start).toBeGreaterThanOrEqual(4.4); @@ -86,7 +87,7 @@ test("Flash-forward selection… copies the span earlier with its attribution an expect(String(t.citeUrl)).toMatch(new RegExp(`t=${Math.floor(Number(t.start))}$`)); expect(String(t.quote).length).toBeGreaterThan(0); expect(t.quote).not.toBe(clip("r002")!.quote); - // The marker stays after r001 (the copy went before it, into §0). + // The marker stays after r001: the copy opens §1. expect(read(MANIFEST).render.chrome.deck.markers[0].after).toBe("r001"); expect(clip("r002")!.cutStart).toBe(4); }); diff --git a/umtool/e2e/take-housekeeping.spec.ts b/umtool/e2e/take-housekeeping.spec.ts @@ -48,6 +48,8 @@ test("relabel a take; a take that is rendering is not relabelled", async ({ page expect(existsSync(path.join(DIR, "takes", "draft-10", "revisions"))).toBe(true); const busy = page.locator("[data-take='draft-12']"); + await expect(busy.locator("[data-take-held]")).toHaveText("rendering now"); + await expect(page.locator("[data-take='draft-11'] [data-take-held]")).toHaveText("a render is made from it"); await busy.locator('[data-action="relabel"]').click(); await busy.locator("[data-take-relabel]").fill("draft 12: renamed"); await busy.locator('[data-action="relabel-save"]').click();