commit 51349eef3d817aa53b36bfeba7078172c0c0fd11
parent 48eb8496945c6bddcdffefaff6f520eef6f124a5
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 23 Oct 2026 16:45:02 -0400
Merge lane/walk-order: the clip walk goes by source (date, then each recording in order)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
4 files changed, 105 insertions(+), 3 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,7 @@
# Changelog
## [Unreleased]
+- **umtool's clip walk goes through the recordings in date order.** `p`/`n` and the Cut tab's walk used to follow the cut, which can open on a finale and end years earlier. The walk now goes by each clip's date (its on-screen date, else the recording's upload date), with a recording's clips together in the order they come in it, so what is left out between two clips, or split off into a clip of its own, comes up next. The cut's own order is unchanged.
- **A clip from a stream captured live can be trimmed again in umtool's clip editor.** Such a stream's record has no length, which umtool passed on as zero, so every drag of a clip's edge snapped back to the left with "that is the edge of what is cached". An unknown length is now treated as unknown.
- **umtool's clip editor opens a clip from a whole saved recording as a short excerpt.** When the only file holding a clip was the whole recording (hours long), the editor used all of it as its view: a waveform of the whole stream with the clip a sliver in it, and a video seeking hours into a large file. It now cuts the clip and 45 seconds either side from the recording once, on the umtool machine, and works on that; the cut starts when the clip is opened and is kept for the next time. The rendered video still cuts from the whole recording.
- **A report video can blur a clip's picture for sharing, keep an uncensored version beside it, and take a new clip from any span of a recording.** In umtool's clip editor each clip has a **Blur** box: **Blur picture** blurs that clip's footage when the video is built (the sound plays as recorded) and writes a caption on it, "Original footage uncensored, blurred here for TOS" by default and editable, with a strength and, with **From playhead** / **To playhead**, only part of the clip. The header, QR code, on-screen panel, captions and stamps are not blurred, and the live preview shows the blur as the build will draw it. The Build tab's Look panel has **Blurred clips: uncensored**, and a take made with `--set render.blur=off` renders the same cut unblurred, so a blurred cut for sharing and an uncensored take sit side by side. **New clip** in the clip editor (from a selection on the strip, which now reaches ± 180 s, or the span just after the clip) inserts a clip right after the current one, with its quote read from the transcript and **Blur picture** available on the form; the project page's timeline has the same as **Add clip**. A clip with nothing on disk to play offers **Fetch this clip's window**. From a terminal: `umtool set <project> <clip> blur.on=true blur.caption="…" blur.strength=8 blur.from=… blur.to=…` (`blur.on=` clears it) and `umtool look <project> blur=off`.
diff --git a/umtool/components/projects/ClipBenchPage.tsx b/umtool/components/projects/ClipBenchPage.tsx
@@ -9,6 +9,7 @@ import {
readClipDetail,
readManifest,
siblingsOf,
+ walkOrder,
walkReadiness,
} from "@/lib/projects/report.mjs";
import { projectCache, segmentFor, windowsFor } from "@/lib/report/serve.mjs";
@@ -38,13 +39,15 @@ export default async function ClipBenchPage({
);
if (!entry) notFound();
- const clips = detail.entries.filter((e: { kind: string }) => e.kind === "clip");
+ // In WALK order (by source date, each recording's clips together): `p`/`n`
+ // step through the recordings, not the cut (lib/projects/report.mjs, walkOrder).
+ const clips = walkOrder(detail.entries) as typeof detail.entries;
const i = clips.findIndex((e: { id: string }) => e.id === clipId);
// ---- where `p` and `n` go ------------------------------------------------
//
// The walk visits the clips that still NEED JUDGEMENT and are FETCHED, in
- // timeline order. A clip nobody can play is a dead end -- there is nothing to
+ // walk order (by source). A clip nobody can play is a dead end -- there is nothing to
// judge and the only move is to press `n` again -- and one already answered is
// the round trip a walk exists to remove. A URL still opens ANY clip: this
// page renders it, says what it has (or has not) got, and points its links at
diff --git a/umtool/lib/projects/report.mjs b/umtool/lib/projects/report.mjs
@@ -301,8 +301,61 @@ export function unfetchedNeedingJudgement(entries) {
.map((e) => e.id);
}
-export function walkReadiness(entries) {
+// THE WALK GOES BY SOURCE, NOT BY CUT (operator, 2026-10-23: "walked in order
+// of chronological grouped by clips of the same video ... so it can be easy to
+// see what's being left out and what's being separated into another
+// verification"). The cut may open on a finale or close on 2019; the walk reads
+// each recording once, its clips in their own order, so the seconds between two
+// of them -- left out, or split into a clip of its own -- are the next thing on
+// screen rather than twenty clips away.
+//
+// The date is the clip's own on-screen date when it has one (the operator sets
+// it; a re-upload's upload date can be years off), else the record's upload
+// date. Two recordings of one day keep the order the cut first meets them in.
+const MON = { jan: 1, feb: 2, mar: 3, apr: 4, may: 5, jun: 6, jul: 7, aug: 8, sep: 9, oct: 10, nov: 11, dec: 12 };
+/** A clip's date as YYYYMMDD (number), or null. */
+export function clipDateKey(e) {
+ const t = typeof e?.onscreen?.title === "string" ? e.onscreen.title.trim() : "";
+ const m = /^(\d{1,2})\s+([A-Za-z]{3})[a-z]*\.?\s+(\d{4})$/.exec(t);
+ if (m && MON[m[2].toLowerCase()]) return Number(m[3]) * 10000 + MON[m[2].toLowerCase()] * 100 + Number(m[1]);
+ const u = String(e?.uploadDate ?? "");
+ return /^\d{8}$/.test(u) ? Number(u) : null;
+}
+/**
+ * The clips in walk order: by date, each recording's clips together in start
+ * order, recordings of one date in the order the cut first meets them. A clip
+ * with no date keeps its cut position relative to the dated ones around it by
+ * borrowing the date of the clip before it in the cut.
+ */
+export function walkOrder(entries) {
const clips = (entries ?? []).filter((e) => (e.kind ?? e.type) === "clip");
+ const key = (e) => `${e.channel ?? ""}/${e.video ?? ""}`;
+ const firstAt = new Map();
+ const dateOf = new Map();
+ let last = 0;
+ clips.forEach((e, i) => {
+ if (!firstAt.has(key(e))) firstAt.set(key(e), i);
+ const d = clipDateKey(e);
+ if (d != null) last = d;
+ // One recording, one date: the earliest any of its clips names.
+ const prev = dateOf.get(key(e));
+ const mine = d ?? last;
+ dateOf.set(key(e), prev == null ? mine : Math.min(prev, mine));
+ });
+ return clips
+ .map((e, i) => ({ e, i }))
+ .sort(
+ (a, b) =>
+ dateOf.get(key(a.e)) - dateOf.get(key(b.e)) ||
+ firstAt.get(key(a.e)) - firstAt.get(key(b.e)) ||
+ (Number(a.e.start) || 0) - (Number(b.e.start) || 0) ||
+ a.i - b.i,
+ )
+ .map((x) => x.e);
+}
+
+export function walkReadiness(entries) {
+ const clips = walkOrder(entries);
const needing = clips.filter((e) => clipVerdict(e) === "unreviewed");
const ready = needing.filter((e) => !!e.fetched);
return {
diff --git a/umtool/lib/report/walk-order.test.mjs b/umtool/lib/report/walk-order.test.mjs
@@ -0,0 +1,45 @@
+// The walk goes by source: by date, each recording's clips together in start
+// order -- not in the cut's order.
+//
+// Run with: pnpm test:scripts
+import assert from "node:assert/strict";
+import test from "node:test";
+import { clipDateKey, walkOrder, walkReadiness } from "../projects/report.mjs";
+
+const clip = (id, video, start, date, extra = {}) => ({
+ type: "clip", id, video, start, end: start + 5, onscreen: date ? { title: date } : undefined, ...extra,
+});
+
+test("a clip's date: its on-screen date first, else the record's upload date", () => {
+ assert.equal(clipDateKey({ onscreen: { title: "26 Aug 2026" } }), 20260826);
+ assert.equal(clipDateKey({ onscreen: { title: "8 Apr 2021" }, uploadDate: "20250101" }), 20210408);
+ assert.equal(clipDateKey({ uploadDate: "20190613" }), 20190613);
+ assert.equal(clipDateKey({ onscreen: { title: "The finale" } }), null);
+ assert.equal(clipDateKey({}), null);
+});
+
+test("by date, a recording's clips together and in start order, not the cut's order", () => {
+ const cut = [
+ clip("open", "B", 300, "26 Aug 2026"),
+ clip("finale", "Z", 10, "8 Apr 2021"),
+ clip("late", "B", 50, "26 Aug 2026"),
+ clip("other-same-day", "C", 5, "26 Aug 2026"),
+ clip("early", "B", 10, "26 Aug 2026"),
+ { type: "post", id: "p1" },
+ ];
+ assert.deepEqual(walkOrder(cut).map((e) => e.id), ["finale", "early", "late", "open", "other-same-day"]);
+});
+
+test("a clip with no date stays beside the clips the cut put it with", () => {
+ const cut = [clip("a", "A", 0, "1 Jan 2020"), clip("x", "X", 0, null), clip("b", "B", 0, "1 Jan 2019")];
+ assert.deepEqual(walkOrder(cut).map((e) => e.id), ["b", "a", "x"]);
+});
+
+test("the walk's ready list comes in walk order", () => {
+ const cut = [
+ { ...clip("new", "N", 0, "1 Jan 2026"), kind: "clip", fetched: true },
+ { ...clip("old", "O", 0, "1 Jan 2019"), kind: "clip", fetched: true },
+ { ...clip("judged", "O", 50, "1 Jan 2019"), kind: "clip", fetched: true, verdict: "confirmed" },
+ ];
+ assert.deepEqual(walkReadiness(cut).readyIds, ["old", "new"]);
+});