import type React from "react"; import type { VectorCortexCrystalsView } from "../api/vector-cortex"; import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card"; import { Metric } from "./VectorCortexMetric"; import { VcStatusBadge } from "./VcStatusBadge"; export function VectorCortexCrystalsCard({ view }: { view: VectorCortexCrystalsView | null }): React.ReactElement { return (
Frozen Range Crystals (VC7A)
{!view?.enabled ? (
Frozen range crystals disabled (VC7A off) — nothing is served from the crystal cache and every render is produced fresh; the cache is reported bypassed rather than hit (mode C).
) : ( <>
Reader-only crystal diagnostics — counts, byte volumes, and CRY_* codes only. A crystal is a frozen rendered prompt, so frozen bytes, covered ranges, span/covered digests, request digests, and session ids are never exposed (SECURITY_PRIVACY). Keys exclude the global ledger frontier, so an unrelated append does not invalidate a crystal; a covered-byte, dependency, renderer, or profile change does. Collisions mean two renders of one identity disagreed — the stored crystal is never overwritten.
{view?.status === "awaiting_data" && (
Awaiting first event. Data will appear after the next pipeline run.
)} {view?.status === "deferred" && view?.deferredReason && (
Deferred: {view.deferredReason.replace(/_/g, " ")}
)} )}
); }