import { cn } from '@/lib/utils'; interface ConfidenceRingProps { /** * 0–100 confidence. `undefined` means the substrate holds NO confidence for * this memory (it is a harvest-only signal) — the ring renders a neutral "—", * never a fabricated number (PR3 no-fabrication contract). */ value?: number; className?: string; } /** * Band color for a confidence value (screen-19 §5a `confColor`): * ≥85 → healthy (sage) · ≥60 → attention (honey) · <60 → risk (terracotta) */ export function confidenceColor(c: number): string { if (c >= 85) return 'var(--healthy)'; if (c >= 60) return 'var(--attention)'; return 'var(--risk)'; } /** * 38px confidence ring (Memory-Trust screen-19 §5a). The "NN%" value AND the * 2px ring border are both colored by band. When `value` is undefined a quiet * "unscored" text badge renders instead — the honest "no confidence stored" * state (curated / agent / quick-capture frames carry no confidence; only * harvest does). Never defaults a number, never an empty dial (Wave F fix 3a). */ export function ConfidenceRing({ value, className }: ConfidenceRingProps) { if (typeof value !== 'number' || !Number.isFinite(value)) { return (