Archilyzer · Source

archilyzer

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

commit 4b03991fd2d15d9f22d51e87c85d0d62a4c1e064
parent b9d1ecff9ea4e6196acf9f9c4810cc98fab6841c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 14 Oct 2026 03:30:44 -0400

umtool: the rail and lists stop prefetching; a lit line keeps its own focus mark

Every page is dynamic, so each prefetch was a full render: the rail alone set
off five per page view (the Inbox's inbox read among them), and Work's rows and
chips dozens. The global focus ring stays unlayered (it outranks the inputs'
outline-none) but no longer covers a lit line's dashed outline; the reader's
ring colour is a variable it sets. Specs: three assertions follow the moved
links, and two release-28 specs open the verdict bench from /tools and read
the new article's row on Work.

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

Diffstat:
Mumtool/app/globals.css | 15+++++++++++----
Mumtool/app/work/page.tsx | 4++--
Mumtool/components/AppNav.tsx | 18+++++++++++-------
Mumtool/components/dashboard/InboxList.tsx | 2+-
Mumtool/components/dashboard/ToolList.tsx | 2+-
Mumtool/components/shell/AppHeader.tsx | 2+-
Mumtool/components/shell/AppRail.tsx | 4++--
Mumtool/e2e/article-iterations.spec.ts | 15++++++++-------
Mumtool/e2e/article-new.spec.ts | 2+-
Mumtool/e2e/clip-bench.spec.ts | 2+-
Mumtool/e2e/deliver.spec.ts | 2+-
Mumtool/e2e/shell.spec.ts | 15+++++++++++++++
Mumtool/e2e/verdict-bench.spec.ts | 2+-
Mumtool/lib/hrefs.test.mjs | 4++--
14 files changed, 58 insertions(+), 31 deletions(-)

diff --git a/umtool/app/globals.css b/umtool/app/globals.css @@ -312,8 +312,15 @@ body { -webkit-font-smoothing: antialiased; } -:focus-visible { - outline: 2px solid var(--signal); +/* The focus ring: 2px Signal on every control. UNLAYERED on purpose, so it + beats the `outline-none` utilities two dozen inputs carry (each would lose + its ring in a layer) -- and for the same reason it must name what it is not + for: a lit line's focus mark is its own quiet dashed outline (the components + layer, `.lit-line:focus-visible`), which an unlayered rule would always + override whatever its specificity. On the reader the ring is the reader's + teal (`--focus-ring`, set by `.reader`). */ +:focus-visible:not(.lit-line) { + outline: 2px solid var(--focus-ring, var(--signal)); outline-offset: 2px; } @@ -639,8 +646,8 @@ canvas.grabbable { .reader .micro { color: var(--reader-dim); } - .reader :focus-visible { - outline-color: var(--reader-signal); + .reader { + --focus-ring: var(--reader-signal); } .reader .lit-head { background: var(--reader-signal); diff --git a/umtool/app/work/page.tsx b/umtool/app/work/page.tsx @@ -250,7 +250,7 @@ function Row({ r }: { r: WorkRow }) { > <div className="flex min-w-0 items-center gap-2"> <div className="min-w-0 flex-1"> - <Link href={r.href} className="block truncate font-medium text-inherit hover:underline" data-piece-link=""> + <Link href={r.href} prefetch={false} className="block truncate font-medium text-inherit hover:underline" data-piece-link=""> {r.title} </Link> <small className="block truncate font-mono text-[11px] text-muted-2">{r.id}</small> @@ -289,7 +289,7 @@ function Row({ r }: { r: WorkRow }) { function Chip({ href, on, label, n }: { href: string; on: boolean; label: string; n?: number }) { return ( - <Link href={href} aria-current={on ? "true" : undefined} className={badgeVariants({ variant: on ? "on" : "neutral" })}> + <Link href={href} prefetch={false} aria-current={on ? "true" : undefined} className={badgeVariants({ variant: on ? "on" : "neutral" })}> {label} {n !== undefined && <span className="font-mono text-[11px] text-meter">{n}</span>} </Link> diff --git a/umtool/components/AppNav.tsx b/umtool/components/AppNav.tsx @@ -26,6 +26,10 @@ import RailCount from "./shell/RailCount"; // (the `song ▸` group, at /tools/song/<pile>), faces, sources -- so moving // between tools is one click; /tools lists them all from anywhere. // +// The rail's links do not prefetch: every page here is dynamic and reads the +// disk, so a prefetch is a full render -- five of them (the Inbox's inbox read +// among them) on every page view, for places you are not going to. +// // `active` is the key a page passes. The old keys still light the right place, // so a page nobody has touched yet (release 28's among them) is not unlit: // `home` and `decisions` are the Inbox; `browse`, `articles` and every project @@ -69,36 +73,36 @@ export default function AppNav({ active }: { active: string }) { const songActive = SONG_ITEMS.some((it) => it.label === active) || active === "song"; return ( <nav className="app-places grid gap-px px-2 py-1 text-[13.5px]" aria-label="Main"> - <Link href={homeHref()} data-place="inbox" aria-current={current("inbox", ["inbox", "home"])}> + <Link href={homeHref()} prefetch={false} data-place="inbox" aria-current={current("inbox", ["inbox", "home"])}> <span>Inbox</span> <RailCount which="inbox" /> </Link> - <Link href={researchHref()} data-place="research" aria-current={current("research", ["research"])}> + <Link href={researchHref()} prefetch={false} data-place="research" aria-current={current("research", ["research"])}> Research </Link> - <Link href={workHref()} data-place="work" aria-current={current("work", ["work"])}> + <Link href={workHref()} prefetch={false} data-place="work" aria-current={current("work", ["work"])}> <span>Work</span> <RailCount which="work" /> </Link> - <Link href={toolsHref()} data-place="tools" aria-current={current("tools", ["tools"])}> + <Link href={toolsHref()} prefetch={false} data-place="tools" aria-current={current("tools", ["tools"])}> Tools </Link> {place === "tools" && ( <div className="app-sub" data-rail-sub="tools"> {TOOL_ITEMS.slice(0, 2).map((it) => ( - <Link key={it.href} href={it.href} aria-current={it.label === active ? "page" : undefined}> + <Link key={it.href} href={it.href} prefetch={false} aria-current={it.label === active ? "page" : undefined}> {it.label} </Link> ))} <NavGroup label="song" items={SONG_ITEMS} active={active} on={songActive} /> {TOOL_ITEMS.slice(2).map((it) => ( - <Link key={it.href} href={it.href} aria-current={it.label === active ? "page" : undefined}> + <Link key={it.href} href={it.href} prefetch={false} aria-current={it.label === active ? "page" : undefined}> {it.label} </Link> ))} </div> )} - <Link href={systemHref()} data-place="settings" aria-current={current("settings", ["settings", "system"])}> + <Link href={systemHref()} prefetch={false} data-place="settings" aria-current={current("settings", ["settings", "system"])}> Settings </Link> </nav> diff --git a/umtool/components/dashboard/InboxList.tsx b/umtool/components/dashboard/InboxList.tsx @@ -186,7 +186,7 @@ function Card({ card: c, muted, onMute }: { card: InboxCard; muted: boolean; onM ) : c.finish && c.piece ? ( <LifecycleButton piece={c.piece} title={c.title} from={c.lifecycle} to="done" label="Mark done" variant="outline" size="md" className="lit-go" /> ) : ( - <Link href={c.action.href} data-action-link="" className={cn(buttonVariants({ variant: "outline", size: "md" }), "lit-go")}> + <Link href={c.action.href} prefetch={false} data-action-link="" className={cn(buttonVariants({ variant: "outline", size: "md" }), "lit-go")}> {c.action.label} </Link> )} diff --git a/umtool/components/dashboard/ToolList.tsx b/umtool/components/dashboard/ToolList.tsx @@ -22,7 +22,7 @@ export default function ToolList({ groups }: { groups: { title: string; tools: T <LitGroup key={g.title} title={g.title} count={g.tools.length} className="mt-[18px] first:mt-0"> {g.tools.map((t) => ( <LitLine key={t.href} id={t.testid} data-tool-entry={t.testid} className="grid grid-cols-[180px_minmax(0,1fr)_auto] items-baseline gap-x-3.5"> - <Link href={t.href} className="font-medium text-inherit hover:underline"> + <Link href={t.href} prefetch={false} className="font-medium text-inherit hover:underline"> {t.name} </Link> <span className="truncate text-[12.5px]">{t.what}</span> diff --git a/umtool/components/shell/AppHeader.tsx b/umtool/components/shell/AppHeader.tsx @@ -51,7 +51,7 @@ export default function AppHeader({ )} > {bench && ( - <Link href="/" aria-label="umtool home" className="shrink-0"> + <Link href="/" prefetch={false} aria-label="umtool home" className="shrink-0"> <Mark size={18} /> </Link> )} diff --git a/umtool/components/shell/AppRail.tsx b/umtool/components/shell/AppRail.tsx @@ -31,7 +31,7 @@ export default async function AppRail({ active }: { active: string }) { const running = runningActivity(); return ( <div className="app-rail" data-app-rail=""> - <Link href={homeHref()} aria-label="umtool home" className="flex items-center gap-[9px] px-4 pb-3.5 pt-4 no-underline"> + <Link href={homeHref()} prefetch={false} aria-label="umtool home" className="flex items-center gap-[9px] px-4 pb-3.5 pt-4 no-underline"> <Mark /> <Wordmark /> </Link> @@ -57,7 +57,7 @@ export default async function AppRail({ active }: { active: string }) { <span className="font-mono normal-case tracking-normal text-meter">{running ? 1 : 0}</span> </h2> {running ? ( - <Link href={running.href} data-running={running.id} className="grid grid-cols-[1fr_auto] gap-x-2 gap-y-0.5 px-5 text-[12px] text-text-2 no-underline hover:text-text"> + <Link href={running.href} prefetch={false} data-running={running.id} className="grid grid-cols-[1fr_auto] gap-x-2 gap-y-0.5 px-5 text-[12px] text-text-2 no-underline hover:text-text"> <span className="truncate">{running.label}</span> {running.progress && ( <span className="font-mono text-[11px] text-muted-2"> diff --git a/umtool/e2e/article-iterations.spec.ts b/umtool/e2e/article-iterations.spec.ts @@ -24,20 +24,21 @@ const stubAsked = (route: string) => test.beforeAll(async ({ playwright }) => { test.setTimeout(WARM_TIMEOUT); - await warm(playwright, ["/articles", "/articles/zeta", "/api/articles/iterations?article=zeta", "/api/articles/policy"]); + await warm(playwright, ["/work?kind=article", "/articles/zeta", "/api/articles/iterations?article=zeta", "/api/articles/policy"]); }); test.afterAll(() => rmSync(path.join(FIXTURE, "articles", ARTICLE), { recursive: true, force: true })); const card = (page: Page, n: number) => page.locator(`[data-iteration='${n}']`); -test("an article in the making: listed as such on /articles, and opened on its iterations", async ({ page }) => { +test("an article in the making: listed as such on Work, and opened on its iterations", async ({ page }) => { + // /articles is Work's articles since P3: zeta is a piece at the Research stage. await page.goto("/articles"); - // Not a row of the store's table: the registry does not list it yet. - await expect(page.locator("[data-article='articles/zeta']")).toHaveCount(0); - const row = page.locator("[data-pending-article='zeta']"); - await expect(row).toContainText("i4 failed"); + const row = page.locator("[data-lit-line][data-piece='a:articles/zeta']"); + await expect(row).toHaveAttribute("data-status", "in the making"); + await expect(row).toHaveAttribute("data-stage", "research"); await row.getByRole("link", { name: "zeta" }).click(); - await expect(page).toHaveURL(/\/articles\/zeta\?tab=iterations$/); + await expect(page).toHaveURL(/\/articles\/zeta$/); + await expect(page.getByRole("link", { name: "iterations", exact: true })).toHaveAttribute("aria-current", "page"); await page.goto("/articles/zeta"); await expect(page.locator("[data-article-meta] [data-status]")).toHaveAttribute("data-status", "pending"); diff --git a/umtool/e2e/article-new.spec.ts b/umtool/e2e/article-new.spec.ts @@ -111,5 +111,5 @@ test("a new article: question, channels, the local pipeline — its first iterat await expect(first).toHaveAttribute("data-status", "done", { timeout: 20_000 }); await page.goto("/articles"); - await expect(page.locator(`[data-pending-article='${ARTICLE}']`)).toHaveAttribute("data-status", "done"); + await expect(page.locator(`[data-lit-line][data-piece='a:articles/${ARTICLE}']`)).toHaveAttribute("data-status", "in the making"); }); diff --git a/umtool/e2e/clip-bench.spec.ts b/umtool/e2e/clip-bench.spec.ts @@ -1276,7 +1276,7 @@ test("a clip lists the other clips cut from its recording", async ({ page, reque await expect(row).toContainText("next in cut"); await expect(row.getByRole("link", { name: "c02" })).toHaveAttribute( "href", - `/browse/${PROJECT}/clip/c02`, + `/projects/${PROJECT}/clip/c02`, ); // A band per sibling on the rail, labelled, so where the cut already reaches // is visible against the window being dragged. diff --git a/umtool/e2e/deliver.spec.ts b/umtool/e2e/deliver.spec.ts @@ -84,7 +84,7 @@ test("a confirmed clip with no cached window is listed as not fetched, not cut", await expect(notFetched.locator('[data-not-fetched-id="a03"]')).toBeVisible(); await expect(notFetched.locator('[data-not-fetched-id="a03"]')).toHaveAttribute( "href", - `/browse/${PROJECT}/clip/a03`, + `/projects/${PROJECT}/clip/a03`, ); // And it is NOT in the cut list, which is the distinction the two headings // exist to make. diff --git a/umtool/e2e/shell.spec.ts b/umtool/e2e/shell.spec.ts @@ -184,6 +184,21 @@ test("j and k move the lit line, and focus goes with it", async ({ page }) => { await expect(list.locator("[data-lit-line][data-lit]")).toHaveCount(1); await expect(lines.nth(1)).toHaveAttribute("tabindex", "0"); await expect(lines.nth(0)).toHaveAttribute("tabindex", "-1"); + // The lit line is its own focus mark: a quiet dashed outline, never the + // 2px Signal ring every other control wears. + const outline = await lines.nth(1).evaluate((el) => { + const cs = getComputedStyle(el); + return `${cs.outlineStyle} ${cs.outlineWidth}`; + }); + expect(outline).toBe("dashed 1px"); + await page.keyboard.press("Tab"); + const ring = await page.evaluate(() => { + const cs = getComputedStyle(document.activeElement!); + return `${cs.outlineStyle} ${cs.outlineWidth}`; + }); + expect(ring).toBe("solid 2px"); + await page.keyboard.press("Shift+Tab"); + await expect(lines.nth(1)).toBeFocused(); // The head sits on the lit line. const line = await lines.nth(1).boundingBox(); await expect.poll(async () => Math.round((await list.locator(".lit-head").boundingBox())?.y ?? -1)).toBe(Math.round(line!.y)); diff --git a/umtool/e2e/verdict-bench.spec.ts b/umtool/e2e/verdict-bench.spec.ts @@ -33,7 +33,7 @@ test.afterAll(async ({ request }) => { }); test("the run: each model's tile against the baseline, the matrix, the items with disagreements first, the filters", async ({ page }) => { - await page.goto("/articles"); + await page.goto("/tools"); await page.getByRole("link", { name: "verdict bench" }).click(); await expect(page).toHaveURL(/\/bench$/); await expect(page.locator(`[data-bench-run="${BENCH_RUN}"]`)).toHaveAttribute("data-status", "done"); diff --git a/umtool/lib/hrefs.test.mjs b/umtool/lib/hrefs.test.mjs @@ -39,7 +39,7 @@ test("empty, null and false values are left out; true is 1", () => { assert.equal(H.workHref({}), "/work"); assert.equal(H.workHref({ kind: "", state: undefined, q: "x y" }), "/work?q=x+y"); assert.equal(H.projectHref("p", { all: false }), "/projects/p"); - assert.equal(H.projectsHref({ kind: "song", new: false }), "/projects?kind=song"); + assert.equal(H.projectsHref({ kind: "k1", new: false }), "/projects?kind=k1"); assert.equal(H.projectsHref({ new: true }), "/projects?new=1"); assert.equal(H.homeHref({ hidden: true }), "/?hidden=1"); }); @@ -54,7 +54,7 @@ test("articles open in the store or on their site", () => { test("the places: Inbox, Work (and the lists it replaced), Settings", () => { assert.equal(H.decisionsHref({ severity: "blocking" }), "/"); - assert.equal(H.browseHref({ kind: "song" }), "/work?kind=song"); + assert.equal(H.browseHref({ kind: "k1" }), "/work?kind=k1"); assert.equal(H.articlesHref({ status: "draft" }), "/work?kind=article&status=draft"); assert.equal(H.systemHref(), "/settings/system"); assert.equal(H.researchHref(), "/research");