import Link from "next/link"; import { playHref, projectsHref } from "@/lib/hrefs"; import { pieceHrefOfProject } from "@/lib/pieces/article"; import type { ProjectRef } from "@/lib/project-types"; import { playView } from "@/lib/report/playView.mjs"; import { NotesProvider } from "@/components/notes/NotesProvider"; import { BenchFrame, BenchTop } from "./bench/BenchShell"; import PlayCut, { type PlayViewData } from "./review/PlayCut"; import CutApp from "./cutApp/CutApp"; import { RememberCut } from "@/components/shell/RecentCuts"; // `/projects//play` (and `?take=`) -- THE PLAY VIEW // (umtool/docs/knobs.md, "Play the cut"): the whole cut, or a take, played in the browser in // its final look with no render -- every clip from its cached source window, // in timeline order, on one cut clock, the live preview's chrome over it -- // and the notes taken while it plays (anchored to the cut second, the clip // and the take), each one the operator's, an agent's to act on (`umtool // notes`), or the video assistant's to answer. lib/report/playView.mjs reads // what it plays; nothing here fetches, cuts or renders. export default async function PlayCutPage({ project, take, bare = false, note, clip, at, }: { project: ProjectRef; take?: string; /** `?cut=1`: the draft, the project's manifest (the default as well, since saved versions). */ bare?: boolean; note?: string; /** `?clip=&at=`: start on that clip, that far into it (the clip bench's "Back to the cut"). */ clip?: string; at?: string; }) { const [view, back] = await Promise.all([playView(project, { take: take || null, bare }), pieceHrefOfProject(project.id, { tab: "cut" })]); const top = ( ); if ("error" in view) { return (

{view.error}{" "} {take && ( play the cut instead )}

); } // Play and the clip bench as ONE app (cutApp/CutApp.tsx): Play stays mounted, the bench opens in place. return ( // Play's own address (always with a query since L7b: a bare /play is the workspace's), for "Back to the cut". ); }