Archilyzer · Source

archilyzer

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

commit 3116621d62cc913c8694d130350af794d67a544a
parent 33707841f6545bbd23b46d0d5bec0cbb49de747d
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 10 Nov 2026 16:06:09 -0500

umtool: ?tab=build and ?tab=media 307 to Deliver, not 308 (that content moves again); an article piece's own Build and Media are never redirected -- redirects.spec rows for both -- L7b review item 9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Diffstat:
Mumtool/components/projects/ReportProject.tsx | 16+++++++---------
Mumtool/docs/knobs.md | 4++--
Mumtool/e2e/redirects.spec.ts | 26+++++++++++++++++++++++---
Mumtool/lib/pieces/tabs.mjs | 4++--
4 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/umtool/components/projects/ReportProject.tsx b/umtool/components/projects/ReportProject.tsx @@ -2,7 +2,7 @@ import AppShell from "@/components/shell/AppShell"; import PieceFrame from "@/components/piece/PieceFrame"; import { readPieceFrame } from "@/lib/pieces/frame"; import Link from "next/link"; -import { permanentRedirect } from "next/navigation"; +import { permanentRedirect, redirect } from "next/navigation"; import { projectHref, projectsHref, workspaceHref } from "@/lib/hrefs"; import { projectNoteTab } from "@/lib/pieces/article"; import { PIECE_FOLDED, PIECE_TABS, PIECE_VIEWS, PIECE_VIEW_IDS, tabOf } from "@/lib/pieces/tabs.mjs"; @@ -59,17 +59,15 @@ export default async function ReportProject({ } const m = detail.manifest; - // The tabs that folded (L7b: Build and Media into Deliver) and the workspace's own tab are other addresses now: - // a 308, the rest of the query kept (`note` last). + // The tabs that folded (L7b: Build and Media into Deliver): a 307, the rest of the query kept (`note` last) -- + // temporary, since that content will move again (an article piece keeps its own Build and Media: never here). + // The workspace's own tab is its address for good: a 308. const folded = search.tab ? (PIECE_FOLDED as Record<string, string>)[search.tab] : undefined; - if (folded || search.tab === "workspace") { + if (folded) { const { tab: _t, note, ...rest } = search; - permanentRedirect( - folded - ? projectHref(project.id, { ...(rest as Record<string, string>), tab: folded, note: note ?? null }) - : workspaceHref(project.id), - ); + redirect(projectHref(project.id, { ...(rest as Record<string, string>), tab: folded, note: note ?? null })); } + if (search.tab === "workspace") permanentRedirect(workspaceHref(project.id)); const tab = tabOf(search, { noteTab: !search.tab ? await projectNoteTab(project.dir, search.note) : null }); const frame = await readPieceFrame(project); // The head's one primary row (lane/ui-simplify): Play the newest take, on every tab, and the status line diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -727,8 +727,8 @@ either with `&take=<version>` for a saved version, read-only (L7b). Each mode is | Was | Now | |---|---| -| Build (the build chain, the final mp4) | on **Deliver**, above its own panels — `?tab=build` 308s there | -| Media (the drafted fields, the upload's text, the on-screen panel, the review and narration links) | on **Deliver** — `?tab=media` 308s there | +| Build (the build chain, the final mp4) | on **Deliver**, above its own panels — `?tab=build` 307s there (temporary: this content moves again) | +| Media (the drafted fields, the upload's text, the on-screen panel, the review and narration links) | on **Deliver** — `?tab=media` 307s there | | Overview (the Next card, the piece's decisions and their settles, the stats, the article and its iterations, the README) | still `?tab=overview`, a view out of the tab bar (**Piece ▾ → Overview**, the piece head's ⋯): the workspace does not hold it yet | | Cut (the timeline as a list and its every tool: fetch windows, candidates, groups, prep, voices, removed clips …) | still `?tab=cut`, **Piece ▾ → The cut as a list**: its tools have no home in the workspace yet | diff --git a/umtool/e2e/redirects.spec.ts b/umtool/e2e/redirects.spec.ts @@ -112,9 +112,7 @@ for (const [old, now] of [ [urls.takeWalkHref(W, "v1"), urls.workspaceHref(W, { mode: "review", take: "v1" })], [urls.takeWalkHref(W, "short", { all: true }), urls.workspaceHref(W, { mode: "review", take: "short" })], [urls.barePlayHref(W), urls.workspaceHref(W)], - // The tabs that folded into Deliver, the rest of the query kept (note last); the workspace's own tab. - [urls.projectHref(W, { tab: "build" }), urls.projectHref(W, { tab: "deliver" })], - [urls.projectHref(W, { tab: "media", note: "n1" }), urls.projectHref(W, { tab: "deliver", note: "n1" })], + // The workspace's own tab. [urls.projectHref(W, { tab: "workspace" }), urls.workspaceHref(W)], ] as const) { test(`L7b: ${old} → ${now} (308)`, async ({ request }) => { @@ -146,3 +144,25 @@ test("L7b: what the workspace does not hold yet is not redirected", async ({ req expect(res.status(), href).toBeLessThan(400); } }); + +// The tabs that folded into Deliver: a 307 (that content moves again), the rest of the query kept, note last. An +// article piece keeps its own Build and Media tabs: its `?tab=build` is not redirected at all. +for (const [old, now] of [ + [urls.projectHref(W, { tab: "build" }), urls.projectHref(W, { tab: "deliver" })], + [urls.projectHref(W, { tab: "media", note: "n1" }), urls.projectHref(W, { tab: "deliver", note: "n1" })], +] as const) { + test(`L7b: ${old} → ${now} (307)`, async ({ request }) => { + const res = await request.get(old, { maxRedirects: 0 }); + expect(res.status(), old).toBe(307); + expect(parts(res.headers()["location"]), old).toEqual(parts(now)); + expect((await request.get(old)).status(), `${old} lands`).toBe(200); + }); +} + +test("L7b: an article piece's ?tab=build and ?tab=media are its own tabs, never redirected", async ({ request }) => { + for (const tab of ["build", "media"]) { + const href = urls.articleHref({ site: "articles", id: "zeta" }, { tab }); + const res = await request.get(href, { maxRedirects: 0 }); + expect(res.status(), href).toBe(200); + } +}); diff --git a/umtool/lib/pieces/tabs.mjs b/umtool/lib/pieces/tabs.mjs @@ -114,7 +114,7 @@ export function stepOfPiece({ kind, reached }) { * * What the seven tabs before it held, and where it is now: * Build, Media folded into Deliver (PIECE_FOLDED): the build chain and the final mp4, the drafted fields, - * the upload's text and the on-screen panel are what ships -- `?tab=build|media` 308s there + * the upload's text and the on-screen panel are what ships -- `?tab=build|media` 307s there (temporary: it moves again) * Overview, Cut addressable VIEWS still (PIECE_VIEWS), out of the tab bar, under the workspace: the piece's * decisions, README and iterations, and the cut as a list with its every tool (fetch windows, * candidates, groups, prep …) have no home in the workspace yet. The workspace's Piece ▾ and @@ -136,7 +136,7 @@ export const PIECE_VIEWS = [ ]; export const PIECE_VIEW_IDS = PIECE_VIEWS.map((t) => t.id); -/** The tabs that folded into another (L7b): their address 308s to it, the rest of the query kept. */ +/** The tabs that folded into another (L7b): their address 307s to it (temporary), the rest of the query kept. */ export const PIECE_FOLDED = { build: "deliver", media: "deliver" }; /**