commit 8cf29b6c3240565633f5a3c2ba87573764241516
parent c1a7e94ef0ec999421cc440513088e6d55c02b8f
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 2 Nov 2026 23:18:27 -0500
umtool: the post bench shows the operator's notes on the post, adds one, and counts the cut's posts with notes (next with a note)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/umtool/components/projects/PostNarrationPanel.tsx b/umtool/components/projects/PostNarrationPanel.tsx
@@ -9,6 +9,7 @@ import { postBenchHref } from "@/lib/hrefs";
import { POST_NARRATION_DEFAULTS, mixPhaseAt, pickedTake, postNarrationKnobs, scriptParts } from "umtool-report-to-video/post-narration";
import { projectFileMedia } from "./bench/benchMedia";
import { usePeaks } from "./bench/usePeaks";
+import { useNotes } from "@/lib/annotations/useNotes";
import type { PostPlan } from "./review/PostItemPlayer";
// ---------------------------------------------------------------------------
@@ -181,6 +182,15 @@ export default function PostNarrationPanel({
}, [project, entry]);
const nextToRecord = progress?.items.find((x) => x.plays !== "recorded" && x.id !== entry.id) ?? null;
+ // ---- the operator's notes on the cut's posts (the notes system: an entry's, a moment's in it) ----
+ const notesApi = useNotes({ project });
+ const noteEntry = (a: { kind: string; entry?: string }) => (a.kind === "entry" || a.kind === "cut" || a.kind === "moment" || a.kind === "edit" ? a.entry ?? null : null);
+ const openNotes = notesApi.notes.filter((x) => x.status === "open");
+ const mine = openNotes.filter((x) => noteEntry(x.anchor as { kind: string; entry?: string }) === entry.id);
+ const withNotes = progress ? progress.items.filter((x) => openNotes.some((nn) => noteEntry(nn.anchor as { kind: string; entry?: string }) === x.id)) : [];
+ const nextWithNote = withNotes.find((x) => x.n > (progress?.items.find((y) => y.id === entry.id)?.n ?? 0)) ?? withNotes[0] ?? null;
+ const [noteText, setNoteText] = useState("");
+
// ---- the recording session --------------------------------------------------
const mic = useMic();
const [label, setLabel] = useState("operator");
@@ -357,11 +367,46 @@ export default function PostNarrationPanel({
next to record: #{nextToRecord.n} ›
</Link>
)}
+ {withNotes.length > 0 && (
+ <span data-post-with-notes={withNotes.length}>
+ {withNotes.length} with notes{nextWithNote && nextWithNote.id !== entry.id && (
+ <>
+ {" · "}
+ <Link href={postBenchHref(project, nextWithNote.id, fromPlay ? { play: { at: 0 } } : {})} className="ink-link" data-post-next-with-note={nextWithNote.id}>
+ next with a note: #{nextWithNote.n} ›
+ </Link>
+ </>
+ )}
+ </span>
+ )}
<span className="ml-auto text-text-2">N / P: next / previous post · R record · S stop · Space play</span>
{prev && <Link href={postBenchHref(project, prev, fromPlay ? { play: { at: 0 } } : {})} className="hidden" data-post-walk="prev" />}
{next && <Link href={postBenchHref(project, next, fromPlay ? { play: { at: 0 } } : {})} className="hidden" data-post-walk="next" />}
</section>
+ {/* The operator's notes on this post (the notes system), and one more. */}
+ <section className="space-y-1 rounded border border-[var(--color-line)] bg-[var(--color-panel)] px-3 py-2" data-post-notes={mine.length}>
+ {mine.map((x) => (
+ <p key={x.id} className="m-0" data-post-note={x.id}>
+ <span className="micro mr-1">note</span>
+ {x.text}
+ {x.replies.length ? <span className="ml-2 text-text-2">({x.replies.length} repl{x.replies.length === 1 ? "y" : "ies"})</span> : null}
+ </p>
+ ))}
+ <div className="flex items-center gap-1.5">
+ <input value={noteText} onChange={(e) => setNoteText(e.target.value)} placeholder="a note on this post (direction for a re-take, a fix)" className="min-w-0 flex-1 rounded border border-seam bg-ground px-1.5 py-0.5" data-post-note-text="" />
+ <button
+ type="button"
+ className={btn}
+ disabled={!noteText.trim() || notesApi.busy}
+ onClick={() => void notesApi.write({ op: "add", text: noteText.trim(), anchor: { kind: "entry", entry: entry.id } }).then((x) => x && setNoteText(""))}
+ data-post-note-add=""
+ >
+ Add note
+ </button>
+ </div>
+ </section>
+
{/* THE LANES: the attachment's window, the read on the item's clock. */}
<section className="space-y-1.5 rounded border border-[var(--color-line)] bg-[var(--color-panel)] p-3" data-post-lanes="">
{video && (
diff --git a/umtool/e2e/post-narration.spec.ts b/umtool/e2e/post-narration.spec.ts
@@ -45,6 +45,7 @@ test.beforeEach(() => {
test.setTimeout(120_000);
copyFileSync(`${MANIFEST}.pristine`, MANIFEST);
rmSync(path.join(DIR, "revisions"), { recursive: true, force: true });
+ rmSync(path.join(DIR, "notes.json"), { force: true });
for (const f of ["take-2.orpheus-zac.wav", "take-2.recorded-operator.wav", "take-3.recorded-operator.wav"]) rmSync(path.join(DIR, "narration", "posts", "11", f), { force: true });
rmSync(path.join(DIR, "narration", "posts", "11", "take-2.recorded-operator.parts"), { recursive: true, force: true });
});
@@ -126,6 +127,14 @@ test("the post bench: the lanes, a re-take with direction (the editor's tts job)
await page.locator("[data-post-approve]").click();
await expect(page.locator("[data-post-approve]")).toBeChecked();
await expect.poll(() => narr("p-11").approved).toBe(true);
+ // An operator's note on the post: shown on its bench, counted in the walk.
+ await page.locator("[data-post-note-text]").fill("read it angrier");
+ await page.locator("[data-post-note-add]").click();
+ await expect(page.locator("[data-post-note]")).toContainText("read it angrier");
+ await page.goto(urls.postBenchHref(PROJECT, "p-12"));
+ await expect(page.locator("[data-post-with-notes]")).toHaveAttribute("data-post-with-notes", "1");
+ await expect(page.locator("[data-post-next-with-note]")).toHaveAttribute("data-post-next-with-note", "p-11");
+ await page.goto(urls.postBenchHref(PROJECT, "p-11"));
// The mix: a knob is one write.
await page.locator('[data-post-mix="wet"]').fill("0.2");
await page.locator('[data-post-mix="wet"]').blur();