import Link from "next/link"; import BrowseHeader from "@/components/BrowseHeader"; import { listTakes, readVerdicts } from "@/lib/report/takes.mjs"; import type { ProjectRef } from "@/lib/project-types"; import TakesBench, { type Take, type TakeVerdict } from "./TakesBench"; // `/browse//takes` -- alternative renders of one part of the cut, // watched side by side and judged like / maybe / no. // // The takes are made elsewhere (lib/report/takes.mjs says by whom and in what // shape); this page only reads them, and writes takes/verdicts.json. export default async function TakesPage({ project }: { project: ProjectRef }) { const [listing, verdicts] = await Promise.all([listTakes(project.dir), readVerdicts(project.dir)]); const takes = listing.takes as Take[]; const judged = takes.filter((t) => verdicts[t.id]?.verdict).length; return (
{takes.length === 0 ? (

No takes yet.{" "} back to {project.id}

) : ( ({ group: g.group, takes: g.takes as Take[] }))} initial={verdicts as Record} /> )} {listing.skipped.length > 0 && (

skipped — {listing.skipped.length}

    {listing.skipped.map((s) => (
  • takes/{s.dir} — {s.why}
  • ))}
)}
); }