commit 326d34ac796a16038bdeb7a0d02b3e6932b0bf13
parent 75ccbd94e9f74328deadcb3a0bb1eade148d66c0
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 11:11:08 -0400
plans: umtool redesign — P4b, as shipped (benches and the Media tab); CHANGELOG
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 144 insertions(+), 1 deletion(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,10 @@
# Changelog
## [Unreleased]
+- **umtool's benches are one shell.** The clip bench, the claim bench, the narration script, the takes and the drafts review share one frame that fits 1366×768 with no rail: a top bar (← the piece, which bench, **N of M**, ‹ prev / next ›, the keys), the work, a **verdict bar** asking ONE question with its consequence before you choose, and the source on the reader at the right. On the clip bench the transcript is the reader — the cited cue lit, its cite thread, **Copy citation**, **Play clip** — and a clip that ends mid-sentence asks "Extend c04 to the end of the sentence? It would end at 4:31:21 (+12.1 s), covering all of c05." with **Extend to 4:31:21** (or **Fetch to …** past what is fetched) and **Keep the cut here** (lockEnd) before the walk's **Yes, confirmed** / **No, note what is wrong**. The claim bench's context is its reader (`j`/`k` move the lit cue and seek the player) and **Save ruling** its verdict bar, saying what is still missing. Narration asks about the card in hand (`j`/`k`, `a` approve, `r` reject with its note); takes about the take being listened to (`n`/`p`, `l` like, `m` maybe, `x` no). Needs a restart of umtool.
+- **A report video's Media tab is one surface for every drafted field.** Each field is a line — its words, **where it came from** (the draft file, when, by what model, which attempt was kept, and the rule a refused attempt broke: "attempt 2 of 2 chosen · attempt 1 failed: ✕ text in quotation marks"), its review — with **Approve draft** and **Reject** (a note), the drafts kept aside with **Use this**, grouped by section (cut, on-screen, teaser, flips, threads, narration, YouTube), each headed by its **Draft with <model>**; **Approve all N**, **Draft everything** (the draft-all chain, on the model chosen) and section chips above. `j`/`k` light a field, `a` approves it, `r` rejects it. The on-screen panel moved here from Build, whole. A release-25 narration (no mark in the manifest) shows its `narration-draft.json` attempts too. Needs a restart of umtool.
+- **The drafts review is a bench: `/projects/<p>/review`.** The same field list, walked one field at a time: the verdict bar asks about the lit field ("Approve the drafted on-screen text of m01? A final build refuses it until it is approved."), the reader shows the clip it is drawn over with its cited cue lit. The Iterations tab's **Narrate**, media drafts and **Draft everything** are now a **Media drafts →** link to the iteration's video's Media tab.
+- **One job progress for chains, builds and editor jobs.** The state in words, the current step, a Meter bar and the spend so far, the step list, the log and **Cancel** where the job allows it — on the Media tab's drafts and Draft everything, the Build tab's build, the Iterations tab's jobs and the rail's Running rows.
- **umtool has Create: `/create`, "What are you making?"** One list of lines — Research a question · an article from a question or from a board · a video from an article, a board, a recording or a sweep report · a song — each opening its form under it, each a shell over a writer that already existed: a case (the board opens), a sweep (r27's new-article form, with the **estimate** said before Start: what earlier runs on that model spent, from the usage ledger, and the cap it stops at), a board's hand-off (its plan, then the confirm), the video chain over an article's iteration (its steps listed first), a project from a recording or a report on disk, a song. Keys: `j`/`k` the lines, Enter opens a form on its first field, Escape closes it back to the line. The policy is a chip — "Generation: balanced · Claude Code: sweeps · API: report revisions, research · local: video revisions, drafts" — linking Settings. The rail's **+ Create** is a link to it, ⌘K's create actions open its lines (`/create?make=…`), and Work has one **+ Create**. Needs a restart of umtool.
- **The editor's "Make a video" lands on Create.** `/?from=<channel>/<id>` (VideoPanel, VideoNavStrip) now redirects to `/create?from=…`, which opens "Video from a recording" prefilled; `/articles/new` redirects to `/create?make=article`. The Inbox no longer carries the new-project form.
- **Settings · generation, `/settings/generation`.** The generation policy — routes per task, the presets, the models (the extractor among them), the caps, whether the API key's file is there (its path, never the key) — moved here from the new-article form, written through the editor's settings action as before; beside it the day's API spend job by job (task, article and iteration, the models, what it cost) and the last seven days, from the editor's usage ledger.
diff --git a/plans/umtool-redesign.md b/plans/umtool-redesign.md
@@ -357,7 +357,8 @@ P0 design ─► P1 foundation ─┬─► P3 inbox/work/tools/URLs ─┬─
| P4a-2 article-rooted merge | `ux/p4a2` | shipped on the branch |
| P4a-3 song pieces | — | after P4a-2 |
| R3 transparent runs | `ux/r3` → `main` `6362cf40` | LIVE 2026-10-14 (editor HqcZW4aJ…, umtool 85Ultdj2…) |
-| P4b, P6 | — | after P4a / all |
+| P4b benches + Media | `ux/p4b` | shipped on the branch |
+| P6 | — | after all |
### P2a, as shipped
@@ -1939,3 +1940,141 @@ the r28 session: editor built (53 s) and restarted (`scripts/r3-editor-{build,re
`UV_THREADPOOL_SIZE=16` ok, no ZodError, 0 queued before and after), umtool built (77 s) and restarted. Live:
`/research/runs`, `/research/runs/piratesoftware-ai-friends/1` (the real turns.jsonl fallback, the question as title),
`/research`, `/work`, `/` 200; editor 200.
+
+### P4b, as shipped
+
+**What.** The human-piloted walks are one bench shell, a report video's drafted fields are one Media surface, and
+every job umtool shows is one `JobProgress`. Built on P4a-2's piece frame (`ux/p4a2` `d84cf4d7`); no URL moved.
+
+- **The bench shell** (`components/projects/bench/BenchShell.tsx`, no hooks, server- and client-safe):
+ - `BenchFrame` (the viewport; below `lg` one scrolling column), `BenchTop` (canvas `.benchtop`, one row: the mark
+ linking home, a Breadcrumb nav — "projects /" from `xl`, **← the piece** (`data-bench-back`, its Cut, Media or
+ Overview through `pieceHrefOfProject`), the bench's place — the bench's kind (`data-bench-kind`), **N of M**
+ (`data-bench-pos`), ‹ prev / next › (`data-bench-nav`, a bench's own attributes kept: the clip bench's
+ `data-clip-nav`), the key legend (`data-bench-keys`) and the status `.micro`; it IS the head:
+ `data-app-header="bench"`); `BenchBody` (the work column with the verdict bar at its foot, the reader on the
+ right at `minmax(320px, 28%)`); `VerdictBar` (canvas `.verdictbar`: the question, the consequence in bold
+ (`data-verdict-question`, `data-verdict-consequence`), the actions).
+ - **Clip** (`ClipBench` keeps its internals; its return is re-laid onto the shell): the transcript pane is the
+ reader (`ReaderPane`: the source, channel · date · transcript length, the cite thread, the same cue rows — click
+ to play, dimmed to fetch, peek further — with the **cited cue lit** until something plays, **Copy citation** in
+ the house format, **Play clip**, the window file as fine print). The verdict bar asks ONE question: a clip that
+ ends mid-sentence (and is not locked) asks "Extend c04 to the end of the sentence?" with what it would do
+ ("It would end at 0:09.00 (+3.0 s), covering all of s02." — a sibling inside the extension is *covered*, one
+ across its end *overlapped*, past the cache "past what is fetched"), **Extend to m:ss** (saves the window) or
+ **Fetch to m:ss**, and **Keep the cut here** (lockEnd); otherwise "Is c04 what the report says it is?" with what
+ a confirmation does. **Yes, confirmed** / **No, note what is wrong** (`y`/`x`) are always there; the filled one
+ is the question's first action. The position and prev/next moved to the top bar; the picture column scrolls on
+ its own before the picture drops under 200 px; the answer column is 20–23 rem.
+ - **Claim**: the ±90 s context is the reader (cues as a lit list, `j`/`k` from anywhere, the cue the cite starts
+ in lit, a light seeks the player), **Save ruling** is the verdict bar's action with what is missing ("it stays
+ blocking") or that every field is set; "as recorded" stays under the player.
+ - **Narration**: the verdict bar asks about the card in hand (focused, else the first not approved): **Approve**
+ (`a`) its words as saved, **Reject with a note** (`r`, the cursor to its note); `j`/`k` move between cards (the
+ card in hand wears the Signal edge).
+ - **Takes**: about the take being listened to — "Is <take> the take for <group>?" — **Like / Maybe / No** (`l`,
+ `m`, `x`), `n`/`p` move the listening; "0 of 4 judged, 4 to go".
+ - **Review**: below.
+- **`ReaderPane`, additive** (P1's primitive): `bodyProps` (a handle and a ref on the scrolling body), `bare`
+ (children without the reader-text column), `onLight`, `global` (j/k from anywhere), a cue's `attrs`.
+- **The Media tab** (`components/projects/MediaDrafts.tsx`; `report/MediaTab.tsx` reads; canvas "Piece · Media"):
+ - every field `draftsView()` lists — the drafted ones and a narration written by hand — as ONE lit list grouped
+ by its section (the address's task: cut, on-screen, teaser, flips, threads, narration, YouTube), each line
+ `data-draft-row` with its words, its **provenance** (`lib/report/draft-provenance.mjs`, unit-tested: the draft
+ file, when, by what model, "attempt 2 of 2 chosen", each refused attempt's `hard` rules in the reject colour,
+ soft flags, "repaired" when narrate's repair made the value, its review state), **Approve draft** / **Reject**
+ with the note (`data-draft-action`, toggling as r28's did), the alternatives with **Use this**; a field that is
+ the operator's with a draft kept aside is its own line;
+ - release 25's `narration-draft.json` (units at the top level, keyed by card id, no model) is read as well as
+ release 28's `units[].target`; two files claiming one field: the one the mark's task wrote;
+ - each section is headed by what it writes, what it holds and its **Draft with <model>** (`DraftPanel.tsx`'s
+ `DraftControl`: the button, the model, force, the entries, the job on `EditorJobProgress`, the last run) — only
+ on a project made from a done iteration; otherwise the line why, and only the narration's head (its bench link);
+ - above: the counts (Meter), "drafts are steps on <article> i<n>", **Review drafts — N** (the bench), the Draft
+ everything model and **Draft everything** (opens the draft-all chain panel and starts it), **Approve all N**,
+ the final gate's line (`data-drafts-gate`), section chips (`data-media-chip`) that narrow the list;
+ - keys: `j`/`k` light a field, `a` approves it, `r` rejects it (the cursor to its note first) — from the list or
+ the page, never from another control on the tab. Signal: the lit field's **Approve draft** only;
+ - then **OnscreenSection, whole** (moved from Build; `SECTION_TAB.onscreen` is `media`) and `YoutubeSection`.
+- **The review bench** (`ReviewPage.tsx` → `MediaReview`): the same field list in the shell, one field at a time —
+ the verdict bar asks about the lit field ("Approve the drafted on-screen text of m01? A final build refuses it
+ until it is approved."; the field's Approve draft is an outline there, the bar's is the filled one), the reader
+ shows the clip it is drawn over (its cues ±20 s, the cite's cue lit, Copy citation) or says it has no source
+ window. `DraftsReview.tsx` is gone; `/browse/<p>/review` (r28's hard-coded link) rides P3's redirect to it.
+- **The Iterations tab's media drafts** (Narrate, the task select, Draft, Draft everything) are a **Media drafts →**
+ link (`data-media-link`) to the iteration's video's Media tab (`IterationRow.projectId`, new: the project dir
+ under `REPORTS_ROOT`); its job view is `EditorJobProgress`.
+- **One `JobProgress`** (`components/ui/job-progress.tsx`): the state in words, the current step, the Meter bar
+ (only with a fraction), the spend in Meter, the step list (✓ ▸ ✕ –, each step's own data attributes kept:
+ `data-chain-step`/`data-step-status`, the build's `data-step`/`data-step-state`), children, the log, **Cancel**
+ where the job allows it; `useEditorJob` + `EditorJobProgress` follow an editor job every 2 s (queue words and
+ progress from `lib/running.mjs`, spend from the log's `~$`). Used by the chain panel (Make the video, Draft
+ everything: "running: 6/15 draft the cut…", "5/15 steps"), the build chain, the Media tab's drafts, the
+ Iterations tab's jobs; the rail's Running row uses its two small parts (`components/shell/JobProgress.tsx`
+ re-exports them).
+- **Signal-outline (`primary`) buttons** in the benches, the on-screen panel, the badges and the takes are outlines
+ (a pressed toggle wears the panel ground); the filled action per screen is the verdict bar's or the lit field's.
+
+| sha | what |
+|---|---|
+| `71e1eeb4` | `components/ui/job-progress.tsx`; ChainPanel, ReportBuildChain and the Iterations tab's job view on it; the rail's parts re-exported |
+| `4d5a49bb` | the bench shell; clip, claim, narration, takes on it; ReaderPane's additive props; `lib/report/draft-provenance.mjs` + test |
+| `456f987d` | the Media tab (`MediaDrafts`), `DraftControl`, the review bench, on-screen moved to Media, the Iterations tab's link, `IterationRow.projectId`, `SECTION_TAB.onscreen` |
+| `1eb35db7` | `e2e/bench-shell.spec.ts`, piece.spec's Media test, media-surfaces / article-iterations onto the Media tab, `fixtures/bench-shell-fixture.mjs`; primary → outline |
+| `1d55a5a4` | the chain's progress over all its steps; the bench specs through the href builders |
+| `3e988fd7` | the Media tab's `a`/`r` from the list only |
+
+**Gates.**
+
+| Gate | Result |
+|---|---|
+| repo-wide `tsc --noEmit` | clean (umtool typecheck clean at every commit) |
+| umtool unit (`node --test umtool/lib/*.test.mjs umtool/lib/*/*.test.mjs umtool/report-to-video/*.test.mjs`) | 849 tests, 847 pass, 2 skipped, 0 fail (new: `draft-provenance.test.mjs` 3; `tabs.test.mjs` onscreen → media) |
+| `pnpm --filter umtool test` | 24/24 |
+| `pnpm run test:scripts` (reads the capped build's traces) | 1000 tests, 998 pass, 2 skipped, 0 fail |
+| capped umtool `next build` (corpus linked, `MemoryMax=5G`) | exit 0, compiled 15.9 s, 54 s wall, 1.46 GB max RSS; the link removed |
+| full umtool e2e (`3e988fd7`, one run) | **443 tests: 437 passed, 0 failed, 6 skipped** (the song-data capability skips), 8.7 min |
+
+**Spec churn.** New `e2e/bench-shell.spec.ts` (5): the clip bench at 1366×768 (the top bar — home, the piece's Cut,
+"Clip bench", "1 of 2", no prev, next s02, the keys —, no rail; the extension question and its exact consequence,
+**Extend to 0:09.00** the filled action, Yes as an outline, Keep the cut here; the reader's lit cited cue, Copy
+citation, "cites 0:03"; the correction box on screen; no page scroll either way); `n`/`p` and the walk's question on
+s02; the claim bench (reader, cited cue lit, `j` from the page, Save ruling); the review bench (three fields, the
+question and consequence on m01, its provenance, `j` → m02, `a` approves it, `j` → the narration with "no source
+window", `r` to its note); narration and takes in the shell. `piece.spec` +1 (15): the Media tab on
+`media-tab-fixture` (Media 2, three rows, provenance words for m01 and the release-25 narration, one filled Approve,
+the narration chip, approve one, **Approve all 2**, the gate passes, on-screen here and not on Build).
+`media-surfaces`: the region "Media drafts", the cut's field line (provenance, approve), YouTube's alternative in its
+section, Draft everything from i2's Media tab (reached by the Iterations tab's link). `article-iterations`: narrate
+from the Media tab's narration section, the step then done on the Iterations tab. `claim-bench`, `clip-bench`,
+`draft-review`, `onscreen`, `takes` open their pages through `urls.*Href`. New fixtures
+(`fixtures/bench-shell-fixture.mjs`): `bench-shell-fixture` (read-only), `media-tab-fixture`,
+`media-review-fixture`. No `data-testid` renamed; `data-draft-badge` stays the in-place badge's (OnscreenSection,
+StructureEditors), the list's lines are `data-draft-row`.
+
+**Screenshots** (job scratch `p4b-shots/final/`, dev server on the e2e fixture): the clip bench (s01), the claim bench
+(k01), the Media tab with drafts (media-tab-fixture), the review bench, the narration bench — 1366×768 and 1440×900,
+dark and light — and `JobProgress` mid-run: a section's Draft with queued on the editor's lane (both sizes, both
+themes) and Draft everything at step 6 of 15 (light, 1440×900). Against the canvas: the bench's one-row top bar, the
+verdict bar's question + bold consequence + filled first action, the reader on the right with the lit cue and the
+cite thread; the Media list's `170px | words + provenance | actions` lines with the Signal edge on the lit field,
+the chips, Draft everything / Approve all at the top right. Differences: the clip bench keeps its answer column
+(attribution, on-screen, notes) between the work and the reader, and its player is the cached window's `<video>`
+rather than the canvas's timeline strip; the Media tab's chips filter rather than switch, and Thumbnail (a canvas
+chip) is not a drafted field. **Keyboard-only** (dev, 1366×768): the top bar's stops (home, projects, ← the piece,
+next) then the work, each with the 2 px Signal ring; the review list's lit line takes its dashed mark, its Approve
+draft, Reject and note the ring; `j`/`k` move the verdict bar's field; `--glide` is 0 s under reduced motion.
+
+**Found and left.**
+- **Merge c04 + c05 and Park** (the canvas's other two clip-bench actions) are not built: merging two timeline
+ entries and parking one clip are new writes; the bar states the overlap instead ("covering all of c05"), and
+ **Extend** saves the longer window without dropping the covered clip.
+- The clip bench's own key hint paragraph under the waveform stays (its internals); the top bar's legend is the
+ short form.
+- Narration and takes have no reader: neither has a cited source window (a card narrates the report, a take is our
+ render).
+- The Media tab's count in the tab bar is the drafted fields (P4a-1's); the list also holds narrations written by
+ hand, so "Media 2" can sit over three lines.
+- `IterationsTab`'s **Use this iteration** and **New iteration**'s submit are still P1's `primary` (not the media
+ drafts part of that file).
+- Draft everything's spend is what the chain's log says (`~$`); a chain's ledger total is the Running row's.