/** * VectorCortexTopologyCard.tsx — VC3A/VC3B topology + VC3C query diagnostics cards. * * Extracted from VectorCortexTab.tsx to keep the parent tab under the 400-line * extension soft limit (delegate-shell + impl-card pattern). */ import type { VectorCortexTopologyView, VectorCortexQueryView, } from "../api/vector-cortex"; import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card"; import { Metric } from "./VectorCortexMetric"; import { VcStatusBadge } from "./VcStatusBadge"; export function VectorCortexTopologyCard({ topology, query, }: { topology: VectorCortexTopologyView | null; query: VectorCortexQueryView | null; }): React.ReactElement { return ( <>
Derived Cortex Store (VC3A)
{!topology?.enabled ? (
Cortex store disabled (VC3A off).
) : ( <>
{topology.nodes !== undefined && ( <> )}
{topology?.status === "awaiting_data" && (
Awaiting first event. Data will appear after the next pipeline run.
)} {topology?.status === "deferred" && topology?.deferredReason && (
Deferred: {topology.deferredReason.replace(/_/g, " ")}
)} {topology.nodes !== undefined && (topology.edges?.length ?? 0) > 0 && (
Topology edges (VC3B)
{topology.edges?.map((e, i) => ( ))}
source target head dir score
{e.source} {e.target} {e.head} {e.direction} {e.score}
)} )}
Topology Query Diagnostics (VC3C)
{!query?.enabled ? (
Query diagnostics unavailable (VC3C off).
) : ( <>
{query?.status === "awaiting_data" && (
Awaiting first event. Data will appear after the next pipeline run.
)} {query?.status === "deferred" && query?.deferredReason && (
Deferred: {query.deferredReason.replace(/_/g, " ")}
)} )}
); }