import type { ReactNode } from "react"; /** * Gate A, condition A2 (board minutes #42 / #79, tracked at server-26#46). * * Transcripts, incident summaries, titles, locations and extracted entities are * all produced by the AI pipeline (transcription -> scene/entity extraction -> * correlation -> summary). None of it is reviewed by a human before a reader * sees it, and entity-name accuracy has never been measured (server-26#48). * * Gate A therefore requires that machine-generated content is labelled as * machine-generated and unverified ON THE SAME SCREEN as the content itself — * a note on another page does not satisfy the condition. This is the single * element that does that; render it beside every AI-derived surface. * * Copy rules (do not "improve" these away): * - the words "machine-generated" and "unverified" must both appear * - it must not promise accuracy * - it must not name a model or a vendor * - it must not state or imply a price * * Variants exist only because the surfaces differ in space, not because the * claim differs. All three say the same thing. * block — full-width strip above/below a body of AI output (default) * inline — one compact line, for dense list headers and table captions * popup — for a Leaflet popup, which is stock-white in BOTH themes, so it * uses fixed grays instead of the ink/surface tokens */ type Variant = "block" | "inline" | "popup"; function InfoGlyph({ className }: { className?: string }) { return ( ); } const LEAD = "Machine-generated and unverified"; interface Props { variant?: Variant; /** Overrides the trailing sentence. The lead ("Machine-generated and unverified") is fixed. */ detail?: ReactNode; className?: string; } export function MachineOutputNotice({ variant = "block", detail, className }: Props) { const body = detail ?? "transcripts, summaries and extracted details are automated output and may contain errors. Check the recording before acting on them."; const shortBody = detail ?? "automated output, may contain errors."; if (variant === "popup") { // Leaflet popups render on a white wrapper regardless of theme, so this // deliberately does not use the ink/surface tokens. return (

{LEAD} — {shortBody}

); } if (variant === "inline") { return (

{LEAD} — {shortBody}

); } return (

{LEAD} — {body}

); }