Archilyzer · Source

archilyzer

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

commit 36b2aa5cd968638550683383d795ddd00ea9d7a7
parent 6998ddd8159e0391fd777de781029068baf71a9f
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Tue, 10 Nov 2026 18:19:11 -0500

umtool: the workspace's adders refuse while a version shows -- AddPanels reads the one read-only flag through its context (useWorkspaceReadOnly, provided but read by nothing until now) and says READ_ONLY_SAID instead of the clip, post and card adders; `?mode=present&take=v1&block=+` mounted them over a version (L7b re-review nits: AddPanels not gated, useWorkspaceReadOnly unused)

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

Diffstat:
Mumtool/components/projects/workspace/Workspace.tsx | 12+++++++++++-
Mumtool/e2e/review-pass.spec.ts | 7+++++++
2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/umtool/components/projects/workspace/Workspace.tsx b/umtool/components/projects/workspace/Workspace.tsx @@ -21,7 +21,7 @@ import GeneratedBanner from "@/components/notes/GeneratedBanner"; import PresentView, { type PresentPayload } from "../present/PresentView"; import ReviewPass, { useReviewPass } from "./ReviewPass"; import ReadinessBar, { type Readiness } from "./ReadinessBar"; -import { READ_ONLY_SAID, WorkspaceReadOnly, workspaceReadOnly } from "./readOnly"; +import { READ_ONLY_SAID, WorkspaceReadOnly, useWorkspaceReadOnly, workspaceReadOnly } from "./readOnly"; // --------------------------------------------------------------------------- // THE WORKSPACE (umtool redesign L7a): a report video's ONE screen, at its own @@ -833,6 +833,16 @@ export default function Workspace({ /** +: what is added to the cut -- a clip (found, in/out on its cues), posts, a teaser or closing card. */ function AddPanels({ project, after, channels }: { project: string; after: string | null; channels: string[] }) { + // Every adder writes the draft: none while a version shows (readOnly.ts; the + is hidden then, but `?block=+` + // still selects it). + const readOnly = useWorkspaceReadOnly(); + if (readOnly) { + return ( + <p className="m-0 px-3 py-2 text-[12px] text-muted" data-ws-add-read-only=""> + {READ_ONLY_SAID} + </p> + ); + } return ( <div className="space-y-3 px-3 py-2" data-ws-add=""> <div className="flex items-baseline gap-2 border-b border-seam pb-1.5"> diff --git a/umtool/e2e/review-pass.spec.ts b/umtool/e2e/review-pass.spec.ts @@ -247,6 +247,13 @@ test("a version's review pass is read-only: watched and noted, never marked -- O expect(res.headers()["location"]).toBe(urls.versionReviewHref(P, "v1")); }); +test("a version's address that selects the + (present mode keeps the inspector mounted) shows no adder: read-only", async ({ page }) => { + await page.goto(urls.workspaceHref(P, { mode: "present", take: "v1", block: "+" })); + await expect(page.locator("[data-workspace]")).toHaveAttribute("data-ws-read-only", "", { timeout: 20_000 }); + await expect(page.locator("[data-ws-add-read-only]")).toHaveCount(1); + await expect(page.locator("[data-ws-add]")).toHaveCount(0); +}); + test("on a phone (390 px) the pass is a sheet under the viewer, its answers in reach", async ({ page }) => { await page.setViewportSize({ width: 390, height: 844 }); await page.goto(urls.workspaceHref(P, { mode: "review" }));