Archilyzer · Source

archilyzer

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

commit 6393bc99d01e486b15c82cc91f187d17607dd2e6
parent c95672e1da588b5958038dc6210f095f446a9067
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Mon,  9 Nov 2026 14:50:06 -0500

umtool: basic mode and quick clip -- the e2e spec, its fixture, the docs

basic-mode.spec.ts: the Look panel's Basic | Deck switch writes render.mode (read back
from the manifest, and away again); Play of a basic cut is the bare footage (no deck,
the teaser left out); Play's Copy share line copies the platform page and the archive
moment; POST /api/report/quick-clip ends done against the stub editor (the window
asked of it, rendered basic as the take `clip`), and the take panel copies its share
line. The stub's fetch-windows door serves the fixture's basicyt channel.

knobs.md: render.mode and render.basic.fade, "Basic output (the footage alone)", the
share line, quick clip, the Rumble mapping's three callers, the built-in presets
(ember-deck and basic added) and preset apply --replace; cli.md: clip, share, preset
apply --replace, look mode=. The look's key list in videoOps' refusal sentence.

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

Diffstat:
Mcommon/lib/report/draft/videoOps.test.ts | 2+-
Mumtool/docs/cli.md | 8+++++---
Mumtool/docs/knobs.md | 48+++++++++++++++++++++++++++++++++++++++++++++---
Aumtool/e2e/basic-mode.spec.ts | 140+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aumtool/e2e/fixtures/basic-mode-fixture.mjs | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mumtool/e2e/fixtures/editor-stub-fetch-windows.mjs | 3++-
Mumtool/e2e/fixtures/make-fixture.mjs | 4++++
7 files changed, 252 insertions(+), 8 deletions(-)

diff --git a/common/lib/report/draft/videoOps.test.ts b/common/lib/report/draft/videoOps.test.ts @@ -169,7 +169,7 @@ test("the look ops (release 38): look, slide and room through the look's own rul assert.match(r.applied[1]!.warnings![0]!, /the slide's knobs show once the join style is blur slide/); assert.deepEqual( r.refused.map((x) => x.why), - ["render.transition must be a number of seconds from 0 (a hard cut) to 3", '"chrome" is not a look setting (headerHeight, footerHeight, qr, transition, transitionStyle, loudness, captions, room, slide, blur, intro, format, vertical)'], + ["render.transition must be a number of seconds from 0 (a hard cut) to 3", '"chrome" is not a look setting (headerHeight, footerHeight, qr, transition, transitionStyle, loudness, captions, room, slide, blur, intro, format, vertical, mode, basic)'], ); assert.equal((manifest.render as { transition: number }).transition, 0.4, "the input is not touched"); }); diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md @@ -27,7 +27,7 @@ Inbox cannot disagree about what is wrong with one. | `window <project> <clip> --verdict confirmed\|incorrect [--correction T]` · `window <project> <clip> --reject <why> [--note T]` | what the walk said: `--reject` is the walk's **Reject ▾** kept in place (`not-matching`/`wrong-speaker`: incorrect, the note its correction; `irrelevant`/`repeats`/`weak`/`privacy`/`other`: rejected, the note its `rejectNote`); `umtool timeline <p> reject` takes it out ([report-video.md](report-video.md#verdict--what-the-walk-said)) | | `window <project> <clip> --walk-note T` · `--star` / `--no-star` · `--repeat-of <clip>` | what the walk said that is not a verdict: an editorial note (not a correction) and the ★ favourite, a trailer candidate (`trailer <project> --candidates [--json]` lists them as beats); a deliberate repeat ([knobs.md](knobs.md#a-clip)) | | `tighten <project> [--json] [--all] [--no-measure]` · `tighten <project> --apply <clip>[,<clip>…]` | the Cut tab's **Propose tight windows**: each clip to its sentence (the sentences its cut touches, else the whole ones inside its window) and each edge into its pause (the build's measured silences and the gaps between the recording's timed words, ≤ 1 s, inside the cached window) — before → after with the seconds, the clips that would change (`--all`: every clip); prints only. `--apply` writes the named rows through the window writer (the token, the cite that follows the edge); a lock is kept (it is against `resolve-windows`, not a person) ([knobs.md](knobs.md#tighten-to-the-sentence-snap-to-a-pause)) | -| `links <project> [--json] [--fix]` | do the clip QRs open on their sites? `corpus.json` → the channel's manifest → `slugToPage` → the shard's record, one request at a time, shards from the cue cache; recorded in `out/links.json`, which `check` reads (`link-dead` blocking, `links-unverified`, `links-unchecked`); `--fix` rewrites a Twitch id the site serves as `v<id>`; **exit 1** when a link is dead ([knobs.md](knobs.md#do-the-qr-links-open)). The same record dates each site's deploy: a cited video newer than it is `site-deploy-behind` ([knobs.md](knobs.md#the-sites-the-links-depend-on)) | +| `links <project> [--json] [--fix]` | do the clip QRs open on their sites? `corpus.json` → the channel's manifest → `slugToPage` → the shard's record, one request at a time, shards from the cue cache; recorded in `out/links.json`, which `check` reads (`link-dead` blocking, `links-unverified`, `links-unchecked`); `--fix` rewrites a Twitch id the site serves as `v<id>`, and a Rumble folder id (the URL slug) as the embed id the site serves (the clip gets `siteVideo`); **exit 1** when a link is dead ([knobs.md](knobs.md#do-the-qr-links-open)). The same record dates each site's deploy: a cited video newer than it is `site-deploy-behind` ([knobs.md](knobs.md#the-sites-the-links-depend-on)) | | `link-policy <project> [--via <site id \| https://…>] [--direct <slug,…>] [--clear] [--fix] [--json]` | the project's **link policy** (`provenance.linkPolicy`): cite via site X, these channels direct. With no flag, prints it and every clip whose QR breaks it; `--fix` rewrites each one that has a fix through the window writer; new clips are written by it. **Exit 1** when a clip still breaks it ([knobs.md](knobs.md#the-link-policy)) | | `patch-markers <project> [<file>.patch.json] [--fix] [--json]` | take patches whose deck markers name a clip not in the cut (a take made with one is refused); `--fix` gives each the `after` of the cut's marker of the same label; **exit 1** when one is left ([knobs.md](knobs.md#take-patches-follow-a-removal)) | | `quote-check <project> [--clips a,b] [--pad S] [--json]` · `quote-check <project> --status` | **is each clip's quote in the seconds it plays?** The cut ±15 s of the source the render would cut it from, transcribed by the editor (`pnpm ops transcribe`, words on — its transcription lane), the quote found in those words and in the cues: `ok`, `moved` (heard more than 0.5 s from where the cues have it), `not-found`; rows in `quote-check.json`, stale when the cut or the quote changes; `check` blocks on `moved`/`not-found` (`clip-quote-moved`, `clip-quote-missing`), a take refuses them, `prep --status` counts them ([knobs.md](knobs.md#the-quote-check-is-the-quote-where-the-clip-plays)) | @@ -37,7 +37,7 @@ Inbox cannot disagree about what is wrong with one. | `walk <project> [--take <take>] [--all] [--json]` | the clip bench's **walk**: every clip in walk order with its window, verdict and whether a fetched file holds it, and (→) the ones the walk visits — fetched and needing a verdict; `--all` every fetched one; `--take` walks a take (a draft too); the bench's address to start at | | `link <project> <site>/<report>` · `link <project> --clear` | the manifest names the article it is the video of (settles `link-ambiguous`) | | `set <project> <clip> key=value …` | a clip's **knobs**: `claim.at` `claim.hold` `claim.stamp` `claim.count` `claim.label` (the first mark's, or `--mark <id>`'s), its **marks** `mark.add=<verdict>[@<sec>]` `mark.remove=<id>` `mark.verdict=<verdict>` `marks=<json>`, `audio.offset` `audio.gain` `audio.fadeIn` `audio.fadeOut`, its picture's **blur** `blur.on=true` `blur.caption=…` `blur.strength` `blur.from` `blur.to` (`blur.on=` clears it; [knobs.md](knobs.md#a-clips-picture-blurred)), its **effects** `fx.zoom=<json>` `fx.receipts=<json>` `fx.punch=…` `fx.quote` `fx.punchIn=<json>` `fx.speakers=<json>` (`fx=<json>` all of them, `fx=` clears them; a shot is a file in the project; [knobs.md](knobs.md#effects)); `key=` clears one ([knobs.md](knobs.md#marks)) | -| `look <project> key=value … [--unset render.<key>]…` | the cut's **knobs**: `factcheck.stamp.*`, `factcheck.verdicts.<V>.stampLabel\|label\|color`, `deck.markers=<json>`, `deck.markerLayout`, `variants=<json>`, and the look's keys ([knobs.md](knobs.md)) **The deck on, legacy keys off** (`updateRenderKeys`, one write, an undo point `revisions/…auto-render-keys…` first): `chrome.layout=deck` turns the deck on (render.chrome created when the cut has none: engine hyperframes, an empty deck), `--unset render.<key>` (repeatable) drops a legacy render key -- only `rail` `chromeEngine` `railEngine` `chromeRegions` `claimSchedule` `wordmark` `title` `finale` `cut`; the deck beside the old rail is refused in the build's words unless the same command drops it; deck.* keys in the same command land after the chrome exists. Another key named: **exit 2** | +| `look <project> key=value … [--unset render.<key>]…` | the cut's **knobs**: `factcheck.stamp.*`, `factcheck.verdicts.<V>.stampLabel\|label\|color`, `deck.markers=<json>`, `deck.markerLayout`, `variants=<json>`, and the look's keys — `mode=basic\|deck` (the footage alone, [knobs.md](knobs.md#basic-output-the-footage-alone)) and `basic=<json>` (its fades) among them ([knobs.md](knobs.md)) **The deck on, legacy keys off** (`updateRenderKeys`, one write, an undo point `revisions/…auto-render-keys…` first): `chrome.layout=deck` turns the deck on (render.chrome created when the cut has none: engine hyperframes, an empty deck), `--unset render.<key>` (repeatable) drops a legacy render key -- only `rail` `chromeEngine` `railEngine` `chromeRegions` `claimSchedule` `wordmark` `title` `finale` `cut`; the deck beside the old rail is refused in the build's words unless the same command drops it; deck.* keys in the same command land after the chrome exists. Another key named: **exit 2** | | `variants <project> [--take <t>] [--list] [--json]` | **Make variants**: the encode ladder of the build (or of a take's); `--list` what was made and the build's sync report, each clip's lag (past a frame flagged) ([knobs.md](knobs.md)) | | `build <project> [--preset preview\|fast\|final] [--only ID]` | **prints** the chain | | `build <project> --run [--url URL] [--replace] [--preset P] [--only ID] [--skip-fetch]` | **runs** it as the app's build job (POST `/api/report/build` on `--url`, else `UMTOOL_URL`, else `http://localhost:3050`), prints its log as it grows, **Ctrl-C** cancels the job (twice leaves it running); `--replace` stamps a deliverable newer than the manifest aside; exit 1 unless the job is done (release 36) | @@ -130,7 +130,9 @@ Inbox cannot disagree about what is wrong with one. | `timeline <project> insert (--after <id\|-> \| --to-section N \| --group G) post:<channel>/<postId> [--id ID]` | **one post item** among the cut's entries, made as `posts reel` makes one | | `timeline <project> insert (--after <id\|-> \| --to-section N \| --group G) post-json:<json>\|post-json:@<file> [--id ID]` | **a post item made by hand** — a post no archive holds (one kept only as a picture): `{post: "<channel>/<postId>", author, handle, date, text, media: ["posts-media/…"], parents?, quoted?, subjects?, redact?}`, its media measured, its id `p-<postId>` unless `--id`; refused in the build's words (**exit 1**). Its avatar: `posts avatar <project> <handle> <file>` | | `modules list [--json]` · `modules apply <project> [--config FILE] [--dry-run] [--json]` · `modules apply <project> [--config FILE] --take <id> [--label L] [--at S --dur S \| --full] [--quick] [--force] [--from TAKE] [--keep-frames] [--patch-out FILE]` | the **video modules** (release 39): `list` every module, its kind, slot and where its settings live; `apply` maps the project's `module-config.json` (the modules a video wants, in MODULES-DESIGN's vocabulary) into the manifest's homes (`report-to-video/modules/config-loader.mjs`) — the preset, the deck's subtitle and QR, the counter's series and each clip's marks, the stamps, the rail's markers, the chapters, the pairs, the status ledger, the intro, the finale — and lists every field with no home, by path. Without `--take` the manifest is rewritten through `replaceManifest` (a snapshot first); with `--take` it is that take's patch (`takes/<id>.modules-patch.json`, or `--patch-out`) and the take is made from it as `take` makes one, the manifest untouched. **Exit 1** when the result would not build (the build's sentences) ([knobs.md](knobs.md#look-presets)) | -| `preset list [--json]` · `preset show <name> [--json]` · `preset save <name> --from <project> [--description D] [--force]` · `preset apply <name\|none> <project>` | the **look presets** (`umtool/presets/<name>.json`, or `UMTOOL_PRESETS_DIR`): a render block a manifest stands on (`"preset": "<name>"`), laid under it — preset → manifest → style → take patch. `save` keeps a project's look and leaves its content out; `apply` names the preset on the cut through `updatePreset` (nothing copied in), refused when the cut over it would not build ([knobs.md](knobs.md#look-presets)) | +| `preset list [--json]` · `preset show <name> [--json]` · `preset save <name> --from <project> [--description D] [--force]` · `preset apply <name\|none> <project> [--replace] [--json]` | the **look presets** (`umtool/presets/<name>.json`, or `UMTOOL_PRESETS_DIR`; built in: `plain-deck` `huck-deck` `ember-deck` `archive-catalog` `basic`): a render block a manifest stands on (`"preset": "<name>"`), laid under it — preset → manifest → style → take patch. `save` keeps a project's look and leaves its content out; `apply` names the preset on the cut through `updatePreset` (nothing copied in), refused when the cut over it would not build (a basic cut's chrome is not checked); `--replace` also clears the manifest's own value of every key the preset sets, after an undo point (`revisions/…-auto-before-preset-replace`), and prints what went ([knobs.md](knobs.md#look-presets)) | +| `clip <channel>/<video>@<start>-<end> [--snap words] [--title T] [--site <id>] [--folder F] [--json] [--progress ndjson]` | **quick clip**: a basic-mode project (`quick-clips/<slug>`, the footage alone), its window asked of the editor (fetch-windows, followed to its end; Rumble fetched whole), `--snap words` its edges snapped to the words heard (the editor's transcribe op), rendered as the take `clip` (`take <p> --id clip --full`: the heavy slot), then the mp4's path and the share line. `--json`: `{project, output, share: {platform, archive, text}, snapped?}`; `--progress ndjson`: events, the last `quick-clip` (the app's `POST /api/report/quick-clip` job). **Exit 0 · 1 failed (the editor, the render) · 2 usage** ([knobs.md](knobs.md#basic-output-the-footage-alone)) | +| `share <project> [<clip>] [--take <t>] [--site <id>] [--json]` | a clip's **share line** (the clip named, else the first): its platform page at the first second it plays and its archive moment, a Rumble folder id as the embed id the archive serves — the twin of **Copy share line** (`GET /api/report/share-line`). `--json`: `{clip, seconds, platform, archive, text}` | | `take status <project> [--id <take>] [--json] [--log] [--tail N]` | a take's **render record** (`takes/<take>/render.json`, written by every render whoever started it — a terminal, the Takes page, the queue): `state` (`running`, `waiting` at the heavy slot, `done`, `failed`, `cancelled`; `queued` or `blocked` while a queue step waits to render it), `stage` and a rough `percent`, the `error` (the first error line, not a bare "exited 1") and the log's last 40 lines (`tail`), on done the `mp4` and its measured `seconds`; `--log` prints the FULL `takes/<take>/render.log`. A "running" whose process is gone reads **failed** ("the render process is gone"); a done whose mp4 is missing or 0 bytes reads **failed**. **Exit 0 done · 3 queued, waiting or running · 1 failed, cancelled, blocked or none.** Without `--id`: every take with a record, the newest's exit ([queue and poll](#queue-and-poll-instead-of-scripting)); and its fast-feedback renders beside it, `preview` and `changes` (each one's state, mp4, seconds, log; a changes reel's piece count, its base and its list), a queued `--preview`/`--changes` step said as such -- never as the take's own render | | `queue add [--after <qid>\|last] [--label T] [--timeout <minutes>] [--json] -- <umtool subcommand argv…>` | a **step** of the durable queue: the argv of a umtool command, one word per argument (no shell), stored under `<reports root>/.umtool-queue/` and run by the **umtool app** (its systemd unit), one step at a time, in order — so it survives the session that queued it, an app restart and a ship. Prints the qid (`q<N>`) alone on stdout. `--after` waits for that step to be **done**; when it fails or is cancelled this one is **blocked** (and so is whatever waits on it). `--timeout`: the step's limit (default 720 minutes). A step does not start while the app's own job runner is busy (a Takes-page job), and a heavy step still takes the machine's heavy slot and render mode by itself | | `queue ls [--all] [--json]` · `queue status <qid> [--json]` · `queue wait <qid> [--timeout <s>]` · `queue log <qid> [--tail N]` · `queue cancel <qid>` · `queue retry <qid>` | the queue: `ls` the runner (is the app running it) and the steps not finished or finished in the last 24 h; `status` one step (**exit 0 done · 3 queued or running · 1 failed, blocked or cancelled**); `wait` the same after up to `<s>` seconds (default 90); `log` its FULL log (`logs/<qid>.log`; earlier attempts kept as `<qid>.<n>.log`); `cancel` a queued or blocked step at once, a running one stopped (its process group); `retry` a failed or cancelled step back in the queue with every step blocked behind it. A step that was running when the app died reads **failed** ("the step's process is gone"), its log kept — it is never re-run on its own | diff --git a/umtool/docs/knobs.md b/umtool/docs/knobs.md @@ -330,6 +330,8 @@ that mentions the seizure in question and one before it. The Marks box is on eve | `render.chrome.deck.claims[]` — his explicit claims drawn against the record on the rail, at most 6: a `count` or a `goalpost` ([below](#claim-checks-on-the-rail)) | On-screen, **claim checks**: add a count / a goalpost, the clip picker, **use the playhead**, his words, the window's dates, the record's verdict, per, the claim; a goalpost's steps (**add a step**), each its from date and due durations; remove — the build's validator under each as it is typed | `umtool look <p> deck.claims='[…]'` (`deck.claims=` none) | `PUT /api/report/chrome {project, token, claims}` | | `posts[].thread` — `true`: a reply drawn with the post it answers above it — the capture's `shot-thread.png` beside the post's `shot` (taken by `pnpm ops capture-posts --json '{"slug":…,"ids":[…],"thread":true}'`, the replied-to author's avatar, name and handle blurred unless gold- or grey-checked or the reply's own; `"threadRedact": false` takes it unblurred), the post's own shot while there is none; needs a `shot`. In the feed a thread shot is drawn whole: the card under it leaves rather than the reply being squeezed, and one taller than the column is scaled to fit, never cut; the popup posts pan through it as through any tall shot | Media, On-screen **Posts** table: **thread** (shown once a thread shot is on disk) | `umtool posts set <p> <post> thread=on` (`thread=off` clears it) · on add: `umtool posts add <p> <channel>/<postId> --thread` | `PUT /api/report/posts {project, token, posts: {<id>: {thread}}}` | | `posts[].shotMaxHeight` — the post's OWN **crop** of its screenshot, 120–1080 px: its top that tall, the rest cut off and **never panned to** (the deck-wide `deck.posts.shotMaxHeight` caps the viewport and a taller shot pans through it; this one does not) — what keeps a quoted post or a media thumbnail under the post's words off the screen; needs a `shot` | Play the cut, **Add post**: a hit's **crop** before Add, or a post in the cut's **crop** + **Save crop** (empty: none) | `umtool posts set <p> <post> crop=420` (`crop=off` clears it) · on add: `umtool posts add <p> <channel>/<postId> --crop 420` | `POST /api/report/post-cards {project, op: "crop", post, crop}` · `PUT /api/report/posts {…, posts: {<id>: {shotMaxHeight}}}` | +| `render.mode` — `basic`: the FOOTAGE ALONE ([below](#basic-output-the-footage-alone)) — each clip's played spans spliced at the source's size and frame rate, no deck, chrome, intro, QR, rail, cards or brand; `deck` (the default, no key) everything else. Resolved LAST: the mode a reader sees is the last layer's (preset → manifest → style → take patch), so `basic` wins whatever chrome a layer under it sets | Build, **Look**: **Basic \| Deck** (shows the mode over the cut's look preset; saves with the rest) | `umtool look <p> mode=basic` (`mode=deck`: no key, or `"deck"` over a preset that says basic) · the preset: `umtool preset apply basic <p> [--replace]` · a take: `umtool take <p> --id basic --set render.mode=basic` | `PUT /api/report/render {project, token, patch: {mode}}` | +| `render.basic.fade` — `{audio?, video?}` seconds (0–3): a basic cut's fades — `audio` (default 0.03) in and out at EVERY span's edges (no click at a join, a gap's jump cut too), `video` (default 0.15) from black at the cut's first frame and to black at its last | — | `umtool look <p> basic='{"fade":{"audio":0.05,"video":0.3}}'` (`basic=` the defaults) | `PUT /api/report/render {project, token, patch: {basic}}` | | `render.blur` — `off`: every clip's picture as recorded, no caption (the uncensored variant); `on` (the default) blurs the clips that ask | Build, **Look**: **Blurred clips** | `umtool look <p> blur=off` · a take: `umtool take <p> --id uncensored --set render.blur=off` | `PUT /api/report/render {project, token, patch: {blur}}` | | `render.intro` — the brand sting the cut opens with: a style (`boot` `boot-wipe` `boot-dark` `boot-cascade` `boot-mark`) or `{style, ground?, mark?, sound?, seconds?, site?, swap?, url?, urlPlace?}`; absent is none ([report-video.md](report-video.md#the-brand-intro-renderintro)) | Build, **Look**: **Intro** | `umtool look <p> intro=boot-dark` (`intro=` none) · a take: `umtool take <p> --id intro-wipe --set render.intro=boot-wipe` | `PUT /api/report/render {project, token, patch: {intro}}` | | `render.intro.site` — on the chime, "Archi" becomes the cited site's name ("Jera"), "lyzer" stays, the colours go to its accent: `auto` (the site whose `siteUrl` is `provenance.siteOrigin`; none found, no swap), a site id, `{name, lead?, accent?, url?}`, or `none`/absent (the plain intro, byte for byte). `render.intro.swap` `swipe-down` (default) \| `roll` \| `wipe`; `render.intro.url` `both` (default: the site's, then archilyzer.pages.dev) \| `site` \| `project` \| `false`; `render.intro.urlPlace` `under` (default: one row under MEDIA) \| `replace` (MEDIA's place) | — (manifest or a take) | a take: `umtool take <p> --id intro-jera --set render.intro.style=boot-dark --set render.intro.mark=chime --set render.intro.site=auto` (`--set render.intro.swap=roll`, `--set render.intro.url=false`, `--set render.intro.urlPlace=replace`) · standalone: `node umtool/report-to-video/intro.mjs render --style boot-dark --mark chime --site auto --site-origin https://jeralyzer.pages.dev --swap wipe --out x.mp4` | `PUT /api/report/render {project, token, patch: {intro: {…, site}}}` | @@ -342,6 +344,39 @@ the render unchanged. The two are not set together: on a migrated cut the series The default ladder: `master`, `1080p` (crf 22), `720p` (crf 23), `fit24` (at most 24 MiB). `umtool look` also sets the look's keys (`transition=0.3`, …: [report-video.md](report-video.md#the-look-captions-loudness-shorts-release-36)). +## Basic output (the footage alone) + +`render.mode: "basic"` renders the cut as its footage and nothing else (`report-to-video/basic.mjs`): each clip's +played spans — `cutStart|start` .. `cutEnd|end` less its gaps, exactly what Play plays — cut from the window on disk +that holds each span (the build's own lookup: the raw cache, the editor's corpus windows, a saved recording through +its clock) and spliced end to end with hard cuts, at the FIRST window's size and frame rate (a later window of +another shape is letterboxed into it, never stretched), the build's encode (`render.crf`, `render.preset`), the +fades of `render.basic.fade`. Every render of the cut gets it — `umtool take`, `umtool build`, the Takes page — because +the build reads the mode off the manifest every layer resolved into, and the heavy slot is told a basic render's +estimate (1.2 GB, render-estimate.mjs). The spans' files are kept under `out/<variant>/basic/` and reused when the +same encode of the same window is asked again. + +What a basic cut does not draw is said, never dropped in silence: a post item, a teaser, a card, a still or a video +entry is left out with a note; a clip's `audio.offset`, fades and mute mark are noted (its `audio.gain` is applied); +a clip that asks for its picture BLURRED is refused unless the cut is the uncensored one (`umtool look <p> +blur=off`) — basic draws no blur. It never fetches: a span no window holds fails the render by name (`umtool fetch +<p>` first, through the editor). `--short`, `--vertical`, `--join-preview`, `--chrome-*`, `--clip-preview`, +`--rail-only` and `--thumbnail` have no basic form and say so. Play the cut of a basic cut plays the same spans, the +bare footage (no deck, no cards: `data-play-bare`). + +| | In umtool | From a terminal | Route | +|---|---|---|---| +| the mode | Build, **Look**: **Basic \| Deck** | `umtool look <p> mode=basic` | `PUT /api/report/render {patch: {mode}}` | +| the built-in preset | Media, Video modules, Look preset | `umtool preset apply basic <p> [--replace]` | — | +| a clip's **share line** — its platform page at the first second it plays (YouTube `t=<s>s`, Rumble `start=<s>`, Twitch `t=<h>h<m>m<s>s`) and its moment on the archive (`archiveMomentUrl`); a Rumble folder id (the URL slug the corpus keeps it under) goes out as the embed id the archive serves | **Copy share line**: on each take's card (its first clip) and on Play (the clip on screen); the line is shown beside the button too | `umtool share <p> [<clip>] [--take <t>] [--site <id>] [--json]` | `GET /api/report/share-line?project&clip&take` | +| **quick clip** — one moment to a shareable mp4: a basic-mode project under `quick-clips/` (its slug from `--title`, else `<channel>-<video>-<start>`), its window ASKED OF THE EDITOR (a Rumble recording fetched whole — the editor decides), `--snap words`: the edges snapped to the words heard there (the editor's transcribe op; the first word mostly after the start, the last mostly before the end, 0.15 s before and 0.3 s after, never into a neighbour), rendered as the take `clip` (the heavy slot; its record; the take panel), then the mp4's path and the share line; `--site <id>` names the archive (else the first public site carrying the channel) | — (the route) | `umtool clip <channel>/<video>@<start>-<end> [--snap words] [--title T] [--site <id>] [--folder F] [--json]` | `POST /api/report/quick-clip {spec, snap?, title?, site?}` → 202 `{job}`; `GET ?job=<id>` → `{job, done?: {project, output, share}}` | + +The Rumble mapping is ONE helper (`lib/report/shareLine.mjs` `siteVideoFor`, over common `videoDir-server.mjs` +`recordIdOfVideoDir`: the folder's `metadata.info.json` `id`) and it has three callers: the share line; +`umtool links --fix`, which now fixes a QR naming a Rumble folder id (the clip gets `siteVideo: <embed id>`, a +`citeUrl` that was the dead link moves with it); and `umtool timeline insert <rumble-channel>/<folder>@…`, which +writes the inserted clip with its `siteVideo`. A clip that pins `siteVideo` is never looked up. + ## Sections, split and flash-forward (editing the cut) Under the deck a cut's **sections are its markers** (`render.chrome.deck.markers`): §0 runs to the first marker's @@ -1611,13 +1646,20 @@ checks the chrome (`updateChrome` validates the chrome over the preset). A resol | | In umtool | From a terminal | |---|---|---| | the presets | Media, **Video modules**, Look preset | `umtool preset list` · `umtool preset show <name>` | -| stand the cut on one (or none) | the same list | `umtool preset apply <name\|none> <p>` | +| stand the cut on one (or none) | the same list | `umtool preset apply <name\|none> <p> [--replace]` | | save a project's look as one (its content — claim checks, markers, counter series, finale stats, the story modules' lists, an intro's named site — left out) | | `umtool preset save <name> --from <p> [--description D]` | | a take on one | | `umtool take <p> --id <id> --set preset=<name>` | Built in: `huck-deck` (quartering-huck/polemic-huck's look: the feed, verdict-coloured pips, the finale beside the -clip), `plain-deck` (the Trisha final's: every subtitle part, the boot-dark intro, no feed), `archive-catalog` (a -then-and-now archive look: dated subtitles, a pitched rail, the pair strip at the foot of the footage). +clip), `plain-deck` (the Trisha final's: every subtitle part, the boot-dark intro, no feed), `ember-deck` +(EmberParadox's, from in-her-words: 2-line subtitles, section-coloured pips, no stamps or counters, the boot-dark +intro), `archive-catalog` (a then-and-now archive look: dated subtitles, a pitched rail, the pair strip at the foot of +the footage), `basic` (`{render: {mode: "basic"}}`: [the footage alone](#basic-output-the-footage-alone)). + +`umtool preset apply <name> <p> --replace` also CLEARS the manifest's own value of every key the preset sets (each +leaf of its render block; an object left empty goes too) so the preset's renders — after an undo point, +`revisions/<stamp>-auto-before-preset-replace.manifest.json` — and prints what it cleared. Without it a manifest's +own value still beats its preset's (a `render.mode: "deck"` written over a `basic` preset stays deck). ## A module-config.json diff --git a/umtool/e2e/basic-mode.spec.ts b/umtool/e2e/basic-mode.spec.ts @@ -0,0 +1,140 @@ +import { test, expect, type Page } from "@playwright/test"; +import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import * as urls from "./urls"; + +// --------------------------------------------------------------------------- +// THE BASIC OUTPUT MODE AND QUICK CLIP (lane output-modes). The Look panel's +// Basic | Deck switch writes render.mode (read back from the manifest); Play of +// a basic cut shows the bare footage -- no deck, no teaser card -- and Play's +// Copy share line puts the clip's platform page and archive moment on the +// clipboard; POST /api/report/quick-clip runs `umtool clip` as one job against +// the stub editor (its window fetched by the stub, the cut rendered basic as a +// take), ends `done` with the output and the share line, and the take panel's +// Copy share line copies it. Fixture: e2e/fixtures/basic-mode-fixture.mjs. +// E2E_BASIC_SHOTS=<dir>: the surfaces' screenshots go there (1366x768). +// --------------------------------------------------------------------------- + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const FIXTURE = path.join(HERE, "..", ".e2e-song"); +const PROJECT = "reports/basic-fixture"; +const DIR = path.join(FIXTURE, "reports", "basic-fixture"); +const MANIFEST = path.join(DIR, "video.manifest.json"); +const QUICK = path.join(FIXTURE, "quick-clips"); +const QUICK_WINDOWS = path.join(FIXTURE, "channels", "basicyt", "data", "quickvid", "clips"); +const SHOTS = process.env.E2E_BASIC_SHOTS ?? ""; +const original = readFileSync(MANIFEST, "utf8"); +const manifest = () => JSON.parse(readFileSync(MANIFEST, "utf8")); +const shot = async (page: Page, name: string) => { + if (SHOTS) await page.screenshot({ path: path.join(SHOTS, `${name}.png`) }); +}; + +test.beforeEach(() => writeFileSync(MANIFEST, original)); +test.afterAll(() => { + writeFileSync(MANIFEST, original); + // What the quick-clip job made: its project and the window the stub wrote. Other specs count projects. + rmSync(QUICK, { recursive: true, force: true }); + rmSync(QUICK_WINDOWS, { recursive: true, force: true }); +}); + +test("the Look panel's Basic | Deck switch writes render.mode; Play of a basic cut is the bare footage; the share line is copied", async ({ page, context }) => { + test.setTimeout(300_000); + await context.grantPermissions(["clipboard-read", "clipboard-write"]); + await page.setViewportSize({ width: 1366, height: 768 }); + + // ---- a deck cut: Play composes its deck ------------------------------------ + await page.goto(urls.playHref(PROJECT, { bare: true })); + await expect(page.locator("[data-play-cut]")).toBeVisible({ timeout: 60_000 }); + await expect(page.locator("[data-play-cut]")).not.toHaveAttribute("data-play-basic", ""); + + // ---- the switch ------------------------------------------------------------- + await page.goto(urls.section(PROJECT, "build")); + await expect(page.locator("[data-look-panel]")).toHaveAttribute("data-look-panel", "", { timeout: 60_000 }); + await expect(page.locator('[data-look-mode="deck"]')).toHaveAttribute("aria-pressed", "true"); + await page.locator('[data-look-mode="basic"]').click(); + await expect(page.locator('[data-look-mode="basic"]')).toHaveAttribute("aria-pressed", "true"); + await expect(page.locator("[data-look-mode-note]")).toContainText("the footage alone"); + await page.locator("[data-look-save]").click(); + await expect(page.locator("[data-look-status]")).toHaveText("Saved — the next render uses it", { timeout: 60_000 }); + expect(manifest().render.mode).toBe("basic"); + expect(manifest().render.chrome?.layout, "the deck's settings are kept, not drawn").toBe("deck"); + await page.locator("[data-look-mode-row]").scrollIntoViewIfNeeded(); + await shot(page, "look-basic-switch"); + // Read back on a fresh load. + await page.reload(); + await expect(page.locator('[data-look-mode="basic"]')).toHaveAttribute("aria-pressed", "true"); + + // ---- Play: the bare footage -------------------------------------------------- + await page.goto(urls.playHref(PROJECT, { bare: true })); + const root = page.locator("[data-play-cut]"); + await expect(root).toHaveAttribute("data-play-basic", "", { timeout: 60_000 }); + await expect(root).toHaveAttribute("data-play-compose", "no-deck"); + await expect(page.getByTestId("play-plain")).toHaveAttribute("data-play-bare", ""); + await expect(page.getByTestId("play-deck")).toHaveCount(0); + await expect(page.locator("[data-play-hud]")).toContainText("basic: the footage alone"); + // The teaser is not in a basic cut: two clips play. + await expect(page.locator("[data-play-readout]")).toContainText("1/2"); + + // ---- the share line: copied, and shown ----------------------------------------- + await page.locator('[data-share-copy="play"]').click(); + await expect(page.locator('[data-share-copy="play"]')).toHaveAttribute("data-share-state", /copied|shown/, { timeout: 60_000 }); + const line = page.locator('[data-share-line-box="play"] [data-share-line]'); + await expect(line).toContainText("https://www.youtube.com/watch?v=basicvid&t=1s"); + await expect(line).toContainText("archive: https://archive.example/?v=basicyt%2Fbasicvid&t=1"); + if ((await page.locator('[data-share-copy="play"]').getAttribute("data-share-state")) === "copied") { + expect(await page.evaluate(() => navigator.clipboard.readText())).toBe((await line.textContent())?.trim()); + } + await shot(page, "play-basic"); + + // ---- back to deck: the switch writes it away ------------------------------------- + await page.goto(urls.section(PROJECT, "build")); + await page.locator('[data-look-mode="deck"]').click(); + await page.locator("[data-look-save]").click(); + await expect(page.locator("[data-look-status]")).toHaveText("Saved — the next render uses it", { timeout: 60_000 }); + expect(manifest().render.mode, "deck is the default: no key").toBeUndefined(); +}); + +test("quick clip: POST /api/report/quick-clip ends done -- the window asked of the editor, rendered basic, the share line; the take panel copies it", async ({ page, context }) => { + test.setTimeout(300_000); + await context.grantPermissions(["clipboard-read", "clipboard-write"]); + await page.setViewportSize({ width: 1366, height: 768 }); + expect((await page.request.post("/api/report/quick-clip", { data: { spec: "basicyt/quickvid" } })).status()).toBe(400); + expect((await page.request.post("/api/report/quick-clip", { data: { spec: "basicyt/quickvid@10-14", snap: "letters" } })).status()).toBe(400); + + const started = await page.request.post("/api/report/quick-clip", { data: { spec: "basicyt/quickvid@10-14", title: "E2E quick clip" } }); + expect(started.status(), await started.text()).toBe(202); + const { job } = (await started.json()) as { job: { id: string } }; + type Done = { job: { state: string; log: string[] }; done?: { project: string; output: string; share: { platform: string | null; archive: string | null; text: string } }; error?: string }; + let last: Done | null = null; + await expect + .poll( + async () => { + last = (await (await page.request.get(`/api/report/quick-clip?job=${encodeURIComponent(job.id)}`)).json()) as Done; + return last.job.state; + }, + { timeout: 240_000, intervals: [1000, 2000, 3000] }, + ) + .not.toBe("running"); + const r = last as unknown as Done; + expect(r.job.state, `${r.error ?? ""}\n${r.job.log.join("\n")}`).toBe("done"); + expect(r.done?.project).toBe("quick-clips/e2e-quick-clip"); + expect(r.done?.share.platform).toBe("https://www.youtube.com/watch?v=quickvid&t=10s"); + expect(r.done?.output).toBe(path.join(QUICK, "e2e-quick-clip", "takes", "clip", "preview.mp4")); + expect(existsSync(String(r.done?.output))).toBe(true); + const made = JSON.parse(readFileSync(path.join(QUICK, "e2e-quick-clip", "video.manifest.json"), "utf8")); + expect(made.render.mode).toBe("basic"); + expect(made.timeline.map((e: { id: string; video: string }) => `${e.id}:${e.video}`)).toEqual(["c01:quickvid"]); + // The stub editor was asked for the window (and wrote it): nothing fetched by hand. + const asked = JSON.parse(readFileSync(path.join(FIXTURE, "editor-stub.requests.json"), "utf8")) as { route?: string; requestedBy?: string }[]; + expect(asked.some((q) => q.route === "fetch-windows" && q.requestedBy === "umtool:quick-clips/e2e-quick-clip")).toBe(true); + + // ---- the take panel: its share line ------------------------------------------------ + await page.goto(urls.takesHref("quick-clips/e2e-quick-clip")); + const copy = page.locator('[data-share-copy="take:clip"]'); + await expect(copy).toBeVisible(); + await copy.click(); + await expect(copy).toHaveAttribute("data-share-state", /copied|shown/, { timeout: 60_000 }); + await expect(page.locator('[data-share-line-box="take:clip"] [data-share-line]')).toHaveText("https://www.youtube.com/watch?v=quickvid&t=10s"); + await shot(page, "take-share-line"); +}); diff --git a/umtool/e2e/fixtures/basic-mode-fixture.mjs b/umtool/e2e/fixtures/basic-mode-fixture.mjs @@ -0,0 +1,55 @@ +// What basic-mode.spec.ts walks (lane output-modes): the Basic | Deck switch, +// Play in basic, the share line, and the quick-clip job. +// +// basic-fixture a DECK cut on the channel basicyt (a YouTube channel in the +// fixture's corpus, its record naming its watch page): +// c01 basicvid 1.0–3.0 (the fixture's synthetic tone window, cached in out/clips-raw) +// t01 a teaser (a basic cut leaves it out; Play in basic does not show it) +// c02 basicvid 4.0–7.0 +// The spec writes render.mode and puts the manifest back. +// basicyt/quickvid a recording with no window on disk: the quick-clip job +// asks the stub editor for it (editor-stub-fetch-windows.mjs +// serves basicyt), renders it basic, and the spec removes the +// project it made (reports/quick-clips/) and the window. +// +// Synthetic, like every fixture. +import { copyFileSync, mkdirSync, writeFileSync } from "node:fs"; +import path from "node:path"; + +export const BASIC_CHANNEL = "basicyt"; +export const BASIC_PROJECT = "basic-fixture"; + +const write = (dir, name, doc) => { + mkdirSync(dir, { recursive: true }); + writeFileSync(path.join(dir, name), JSON.stringify(doc, null, 2) + "\n"); +}; + +/** @param {{ reports: string, channels: string, deckManifest: Function, cachedWindow: string }} o */ +export function makeBasicModeFixture({ reports, channels, deckManifest, cachedWindow }) { + write(path.join(channels, BASIC_CHANNEL), "config.json", { name: "Basic Fixture", platform: "youtube", url: "https://www.youtube.com/@basicfixture" }); + const record = (id, duration) => + write(path.join(channels, BASIC_CHANNEL, "data", id), "transcript.cues.json", { + title: `Basic fixture ${id}`, + uploadDate: "20260101", + platform: "youtube", + channel: "Basic Fixture", + webpageUrl: `https://www.youtube.com/watch?v=${id}`, + duration, + cues: [{ start: 0, end: duration, text: "a synthetic tone" }], + }); + record("basicvid", 9); + record("quickvid", 60); + + const dir = path.join(reports, BASIC_PROJECT); + mkdirSync(path.join(dir, "out", "clips-raw"), { recursive: true }); + copyFileSync(cachedWindow, path.join(dir, "out", "clips-raw", "basicvid_0.00-9.00.mp4")); + const m = deckManifest(BASIC_PROJECT, "The Basic Fixture", [ + { type: "clip", id: "c01", video: "basicvid", start: 1.0, end: 3.0, cite: 1, section: 0, lock: true, quote: "a synthetic tone" }, + { type: "teaser", id: "t01", seconds: 3, lines: ["Next", "The Basic Cut"] }, + { type: "clip", id: "c02", video: "basicvid", start: 4.0, end: 7.0, cite: 4, section: 0, lock: true, quote: "the tone again" }, + ]); + m.provenance = { ...m.provenance, channelSlug: BASIC_CHANNEL }; + m.render.fetchPad = 0; + write(dir, "video.manifest.json", m); + return { dir }; +} diff --git a/umtool/e2e/fixtures/editor-stub-fetch-windows.mjs b/umtool/e2e/fixtures/editor-stub-fetch-windows.mjs @@ -22,7 +22,8 @@ import path from "node:path"; // channel (testchan/vid1's clips/, the chain's windows step) changes what that // spec's cache lookup finds — specs must stay order-independent. And the // article chain's `windows` step relies on that 404 to stop (article-iterations.spec). -export const FETCH_WINDOWS_CHANNELS = new Set(["opsrumble", "opsyt"]); +// basicyt: the quick-clip job's recording (basic-mode-fixture.mjs), a channel of its own for the same reason. +export const FETCH_WINDOWS_CHANNELS = new Set(["opsrumble", "opsyt", "basicyt"]); const fwJobs = new Map(); let next = 1; diff --git a/umtool/e2e/fixtures/make-fixture.mjs b/umtool/e2e/fixtures/make-fixture.mjs @@ -60,6 +60,7 @@ import { makePostItemsFixture } from "./post-items-fixture.mjs"; import { makePostHappyFixture } from "./post-happy-fixture.mjs"; import { makePostNarrationFixture } from "./post-narration-fixture.mjs"; import { makePresentFixture } from "./present-fixture.mjs"; +import { makeBasicModeFixture } from "./basic-mode-fixture.mjs"; import { makeTakeItemsFixture } from "./take-items-fixture.mjs"; import { makePlayPreloadFixture } from "./play-preload-fixture.mjs"; import { makePostComboFixture } from "./post-combo-fixture.mjs"; @@ -1941,6 +1942,9 @@ makePostNarrationFixture({ reports, deckManifest }); // Present mode (lib/report/present.mjs): a clip, a section, a narrated reply to a private account with a redacted // name and a censored picture, a plain post, a teaser (present.spec.ts). makePresentFixture({ reports, deckManifest, cachedWindow: path.join(REPORT, "out", "clips-raw", "vid1_0.00-9.00.mp4") }); +// The basic output mode and Quick clip (report-to-video/basic.mjs, lib/report/quickClip.mjs): a deck cut to switch to +// basic, its share line, and a recording the quick-clip job asks the stub editor for (basic-mode.spec.ts). +makeBasicModeFixture({ reports, channels: CHANNELS, deckManifest, cachedWindow: path.join(REPORT, "out", "clips-raw", "vid1_0.00-9.00.mp4") }); // A take's own items (takeImport.mjs, takeScope.mjs): a post imported from another project into a draft take, edited in the take only (take-items.spec.ts). makeTakeItemsFixture({ reports, deckManifest }); // A fast burst of narrated posts (Play's prefetch and its gate: play-preload.spec.ts).