// "Frame scan" (release 30, lane P): what a frame scan read of this video — // the phase strip, a small chart per tournament, the events (each a link to // the moment on the video's platform), the flags where something said and // something read disagree — and the Scan button when the video is saved. // With no model (release 32): Re-derive, and a person's correction of any // reading (each event has a "Correct" beside it). // // Not a registry operation (those are corpus-wide lanes, one panel each // below): a scan is asked for one stream at a time. Drawn when the sidecar // exists or the video's container is saved; otherwise there is nothing to // show and nothing to scan. import Link from "next/link"; import type { FrameScanView } from "../lib/frameScanView"; import { FrameScanControl } from "./FrameScanControl"; import { FrameRederiveControl } from "./FrameRederiveControl"; import { FrameReadingEditor } from "./FrameReadingEditor"; const PHASE_CLASS: Record = { table: "bg-success", lobby: "bg-info", break: "bg-warning", other: "bg-muted-foreground/40", }; export function FrameScanPanel({ slug, videoId, views, canScan, readingT = null, }: { slug: string; videoId: string; views: FrameScanView[]; canScan: boolean; // The reading to open in the correction form (`?reading=` on the page). readingT?: number | null; }) { if (!views.length && !canScan) return null; return (

Frame scan

{!views.length &&

Not scanned.

} {views.map((v) => (

{v.profile} · {v.summary} {v.stopped && · stopped: {v.stopped}}

{v.strip.map((s, i) => ( ))}
{Object.keys(PHASE_CLASS) .filter((p) => v.strip.some((s) => s.phase === p)) .map((p) => ( {p} ))}
{v.tournaments.map((t) => (
{t.name} {t.span} {t.facts.length > 0 && · {t.facts.join(" · ")}}
{t.sparks.map((s) => (
{s.label}: {s.min.toLocaleString("en-US")}–{s.max.toLocaleString("en-US")}, last {s.last.toLocaleString("en-US")}
))}
))} {v.events.length > 0 && (
    {v.events.map((e, i) => (
  • {e.href ? ( {e.at} ) : ( {e.at} )} {e.kind} {e.detail} Correct
  • ))}
)} {v.flags.length > 0 && (
    {v.flags.map((f, i) => (
  • {f}
  • ))}
)} {v.corrections.length > 0 && (
Corrected by a person ({v.corrections.length})
    {v.corrections.map((c) => (
  • {c.at} {c.what} {c.note && {c.note}}
  • ))}
)}
))} {canScan && v.profile === "poker")} />}
); }