/** * VectorCortexShardsCard.tsx — VC4A dual-tier shard aggregate + VC4C * reconstruction-fidelity cards. * * Extracted verbatim from VectorCortexTab.tsx (delegate-shell + sibling-card * pattern already used by VectorCortexRenderCard / VectorCortexRestoreCard) so * the tab stays well under the 400-line extension soft limit as later sprints * add cards. Both are reader-only count/byte aggregates — no payload. */ import type React from "react"; import type { VectorCortexReconstructView, VectorCortexShardsView, } from "../api/vector-cortex"; import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card"; import { Metric } from "./VectorCortexMetric"; import { VcStatusBadge } from "./VcStatusBadge"; /** Reader-only dual-tier shard aggregate (VC4A). */ export function VectorCortexShardsCard({ view }: { view: VectorCortexShardsView | null }): React.ReactElement { return (
Dual-Tier Shards (VC4A)
{!view?.enabled ? (
Dual-tier shards disabled (VC4A off).
) : ( <>
Reader-only count/byte aggregate; staged in-memory this sprint.
{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, " ")}
)} )}
); } /** Reader-only reconstruction-fidelity aggregate (VC4C). */ export function VectorCortexReconstructCard({ view }: { view: VectorCortexReconstructView | null }): React.ReactElement { return (
Reconstruction Fidelity (VC4C)
{!view?.enabled ? (
Reconstruction fidelity disabled (VC4C off).
) : ( <>
Reader-only closure/validation aggregate; staged in-memory this sprint.
{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, " ")}
)} )}
); }