Archilyzer · Source

archilyzer

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

commit 132b2c2a945bf0a217c36ff660ded3136020e33d
parent 90ad30ef4870edf37eace205d44159a24a63d885
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Wed, 14 Oct 2026 01:05:53 -0400

umtool: the compare page on AppShell, each side's head a panel rather than a second <header>

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

Diffstat:
Mumtool/app/articles/[report]/compare/page.tsx | 27+++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/umtool/app/articles/[report]/compare/page.tsx b/umtool/app/articles/[report]/compare/page.tsx @@ -1,6 +1,8 @@ import Link from "next/link"; import { notFound } from "next/navigation"; -import BrowseHeader from "@/components/BrowseHeader"; +import AppShell from "@/components/shell/AppShell"; +import { ARTICLES_KEY } from "@/lib/articles/key.mjs"; +import { articleHref, articlesHref } from "@/lib/hrefs"; import { badgeVariants } from "@/components/ui/badge"; import { isReportId } from "yt-dlp-transcript-common/lib/report/schema"; import { readCompareSide, type CompareSide } from "@/lib/articles/compare"; @@ -24,13 +26,15 @@ function Side({ side, other, both }: { side: CompareSide; other: CompareSide; bo const otherCut = new Set((other.cut?.entries ?? []).map((e) => `${e.type}:${e.id}:${e.narration ?? e.quote ?? ""}`)); return ( <section aria-label={side.label} data-side={side.n} className="min-w-0 space-y-3"> - <header className="space-y-1 border-b border-[var(--color-line)] pb-2"> + {/* The side's head: which iteration, by whom, at what spend -- a Panel, + not a page header (the page has one, the shell's). */} + <div className="space-y-1 rounded-[3px] border border-seam bg-panel px-4 py-3"> <div className="flex flex-wrap items-baseline gap-2"> <h2 className="font-mono text-[16px]">{side.label}</h2> <span className="text-[12px] text-[var(--color-dim)]">{side.kind}</span> <span className="font-mono text-[12px]">{side.model}</span> <span className={badgeVariants({ variant: side.status === "done" ? "on" : side.status === "failed" ? "blocking" : "open", size: "sm" })}>{side.status}</span> - <span className="num ml-auto text-[12px] text-[var(--color-meter)]">${side.usd.toFixed(2)}</span> + <span className="num ml-auto font-mono text-[12px] text-meter">${side.usd.toFixed(2)}</span> </div> <p className="text-[12px] text-[var(--color-dim)]"> {side.parent !== null ? `of i${side.parent}` : "first sweep"} @@ -39,7 +43,7 @@ function Side({ side, other, both }: { side: CompareSide; other: CompareSide; bo {side.minutes !== null ? ` · ${side.minutes.toFixed(1)} min` : ""} </p> {(side.feedback ?? side.question) && <p className="text-[13px]">{side.feedback ? `“${side.feedback}”` : side.question}</p>} - </header> + </div> <div className="text-[12px]" data-ops-applied={side.applied.length} data-ops-refused={side.refused.length}> <div className="micro"> @@ -49,12 +53,12 @@ function Side({ side, other, both }: { side: CompareSide; other: CompareSide; bo <ul className="mt-1 space-y-0.5 font-mono text-[11px]"> {side.applied.map((o) => ( <li key={`a${o.index}`} data-op="applied"> - <span className="text-[var(--color-good)]">✓</span> {o.index} {o.op} <span className="text-[var(--color-dim)]">{o.detail}</span> + <span className="text-kept">✓</span> {o.index} {o.op} <span className="text-[var(--color-dim)]">{o.detail}</span> </li> ))} {side.refused.map((o) => ( <li key={`r${o.index}`} data-op="refused"> - <span className="text-[var(--color-bad)]">✗</span> {o.index} {o.op} <span className="text-[var(--color-dim)]">{o.detail}</span> + <span className="text-reject">✕</span> {o.index} {o.op} <span className="text-[var(--color-dim)]">{o.detail}</span> {o.why && <div className="pl-4 font-sans text-[var(--color-bad)]">{o.why}</div>} </li> ))} @@ -153,7 +157,14 @@ export default async function ComparePage({ const a = num(sp.a); const b = num(sp.b); const [left, right] = a && b ? await Promise.all([readCompareSide(report, a), readCompareSide(report, b)]) : [null, null]; - const header = <BrowseHeader active="articles" crumbs={[{ href: "/articles", label: "articles" }, { href: `/articles/${report}?tab=iterations`, label: report }, { label: "compare" }]} />; + const iterations = articleHref({ site: ARTICLES_KEY, id: report }, { tab: "iterations" }); + const header = ( + <AppShell + active="articles" + crumbs={[{ href: articlesHref(), label: "articles" }, { href: iterations, label: report }, { label: "compare" }]} + meta={left && right ? `${left.label} and ${right.label}` : undefined} + /> + ); if (!left || !right) { return ( <div className="flex h-full flex-col"> @@ -161,7 +172,7 @@ export default async function ComparePage({ <main className="deck-main flex-1 p-4"> <p role="alert" className="text-[12px] text-[var(--color-bad)]"> {!a || !b ? "name two iterations: ?a=<n>&b=<n>" : `no iteration ${!left ? `i${a}` : `i${b}`}`} —{" "} - <Link href={`/articles/${report}?tab=iterations`} className="ink-link"> + <Link href={iterations} className="ink-link"> the iterations </Link> </p>