@burdenoff/microfe-semanticfed 2026.1109.10 → 2026.1109.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"LineagePage.js","names":["_Fragment","KIND_ICON","Plug","Database","Table2","Boxes","Ruler","Hash","Columns3","Layers","FileCode2","KIND_LABEL","LANES","EDGE_LABEL","DIRECTIONS","DEPTH_OPTIONS","traceLocally","reached","rootId","models","graph","n","walk","frontier","hops","depth","next","edge","from","to","forward","direction","formatObservedAt","value","date","LineagePage","useI18n","tx","translateWithFallback","t","key","fallback","params","workspace","useSemWorkspaceLineage","selectedId","setSelectedId","useState","setDirection","setDepth","search","setSearch","nodesById","useMemo","node","selected","root","lineageRootFor","record","useSemRecordLineage","highlighted","lineageEdges","query","matches","counts","byKind","upstreamEdges","downstreamEdges","nodeLabel","id","nodeKindLabel","isEmpty","warnings","truncated","kind","Icon","Badge","Card","CardContent","Loader2","AlertTriangle","lineageErrorMessage","GitBranch","CardHeader","CardTitle","warning","index","Fragment","Input","Button","d","X","laneNodes","lane","isSelected","inLineage","dimmed","cn","EdgeList","ArrowUpLeft","ArrowDownRight","testId","title","edges","emptyText","other","otherEnd","observed","onSelect"],"sources":["../../../src/semanticfed/pages/LineagePage.tsx"],"sourcesContent":["/**\n * Lineage page (BOFF-4279) — end-to-end lineage of the workspace's semantic\n * layer, read from the `semLineage` API.\n *\n * The workspace graph is laid out in lanes in the direction data flows\n * (sources → tables → entities → fields → models → queries). Selecting a node\n * asks the API for that record's upstream / downstream lineage and highlights\n * it; tables and unregistered columns (which have no SemanticFed record to\n * start a traversal from) are traced over the workspace graph instead.\n */\nimport { useMemo, useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport {\n AlertTriangle,\n ArrowDownRight,\n ArrowUpLeft,\n Boxes,\n Columns3,\n Database,\n FileCode2,\n GitBranch,\n Hash,\n Layers,\n Loader2,\n Plug,\n Ruler,\n Table2,\n X,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\n\nimport {\n type SemLineageDirection,\n type SemLineageEdge,\n type SemLineageGraph,\n type SemLineageNode,\n type SemLineageNodeKind,\n lineageErrorMessage,\n lineageRootFor,\n useSemRecordLineage,\n useSemWorkspaceLineage,\n} from '../hooks/useLineage';\nimport { cn } from '../utils/cn';\nimport { translateWithFallback } from '../utils/i18n';\n\nconst KIND_ICON: Record<SemLineageNodeKind, LucideIcon> = {\n CONNECTOR: Plug,\n DATA_SOURCE: Database,\n TABLE: Table2,\n ENTITY: Boxes,\n DIMENSION: Ruler,\n METRIC: Hash,\n COLUMN: Columns3,\n MODEL: Layers,\n QUERY: FileCode2,\n};\n\nconst KIND_LABEL: Record<SemLineageNodeKind, string> = {\n CONNECTOR: 'Connector',\n DATA_SOURCE: 'Data source',\n TABLE: 'Table',\n ENTITY: 'Entity',\n DIMENSION: 'Dimension',\n METRIC: 'Metric',\n COLUMN: 'Column',\n MODEL: 'Model',\n QUERY: 'Query',\n};\n\ninterface Lane {\n id: string;\n label: string;\n kinds: SemLineageNodeKind[];\n}\n\n/** Lanes in the direction data flows. */\nconst LANES: Lane[] = [\n { id: 'sources', label: 'Sources', kinds: ['CONNECTOR', 'DATA_SOURCE'] },\n { id: 'tables', label: 'Tables', kinds: ['TABLE'] },\n { id: 'entities', label: 'Entities', kinds: ['ENTITY'] },\n { id: 'fields', label: 'Fields', kinds: ['DIMENSION', 'METRIC', 'COLUMN'] },\n { id: 'models', label: 'Models', kinds: ['MODEL'] },\n { id: 'queries', label: 'Queries', kinds: ['QUERY'] },\n];\n\nconst EDGE_LABEL: Record<SemLineageEdge['kind'], string> = {\n PROVIDES: 'provides',\n HOSTS: 'hosts',\n MAPS_TO: 'maps to',\n DEFINES: 'defines',\n MEMBER_OF: 'member of',\n JOINS: 'joins',\n SERVES: 'serves',\n READ_BY: 'read by',\n EXECUTED_ON: 'executed on',\n};\n\nconst DIRECTIONS: SemLineageDirection[] = ['UPSTREAM', 'BOTH', 'DOWNSTREAM'];\nconst DEPTH_OPTIONS = [1, 2, 3, 5, 10] as const;\n\n/**\n * Upstream / downstream reach of a node over a graph that is already loaded,\n * for node kinds the API cannot start from. Mirrors the service's traversal:\n * JOINS edges are context, not data flow, so they are never followed, and a\n * model reached along the way is included but not expanded (otherwise one\n * entity would pull in every other entity and query of its model).\n */\nfunction traceLocally(\n graph: SemLineageGraph,\n rootId: string,\n direction: SemLineageDirection,\n depth: number | null\n): Set<string> {\n const reached = new Set<string>([rootId]);\n const models = new Set(graph.nodes.filter((n) => n.kind === 'MODEL').map((n) => n.id));\n const walk = (forward: boolean) => {\n let frontier = new Set([rootId]);\n let hops = 0;\n while (frontier.size > 0 && (depth === null || hops < depth)) {\n const next = new Set<string>();\n for (const edge of graph.edges) {\n if (edge.kind === 'JOINS') continue;\n const [from, to] = forward ? [edge.from, edge.to] : [edge.to, edge.from];\n if (from !== rootId && models.has(from)) continue;\n if (frontier.has(from) && !reached.has(to)) {\n reached.add(to);\n next.add(to);\n }\n }\n frontier = next;\n hops += 1;\n }\n };\n if (direction !== 'DOWNSTREAM') walk(false);\n if (direction !== 'UPSTREAM') walk(true);\n return reached;\n}\n\nfunction formatObservedAt(value: string | null): string | null {\n if (!value) return null;\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? null : date.toLocaleString();\n}\n\nexport function LineagePage() {\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const workspace = useSemWorkspaceLineage();\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [direction, setDirection] = useState<SemLineageDirection>('BOTH');\n const [depth, setDepth] = useState<number | null>(null);\n const [search, setSearch] = useState('');\n\n const graph = workspace.data;\n const nodesById = useMemo(\n () => new Map((graph?.nodes ?? []).map((node) => [node.id, node] as const)),\n [graph]\n );\n const selected = selectedId ? (nodesById.get(selectedId) ?? null) : null;\n const root = selected ? lineageRootFor(selected) : null;\n const record = useSemRecordLineage(root, direction, depth);\n\n // The node ids in the selected node's lineage: from the API for records,\n // traced over the workspace graph for tables and columns.\n const highlighted = useMemo<Set<string> | null>(() => {\n if (!graph || !selected) return null;\n if (root) return record.data ? new Set(record.data.nodes.map((n) => n.id)) : null;\n return traceLocally(graph, selected.id, direction, depth);\n }, [graph, selected, root, record.data, direction, depth]);\n\n const lineageEdges = useMemo<SemLineageEdge[]>(() => {\n if (!selected) return [];\n if (root) return record.data?.edges ?? [];\n if (!graph || !highlighted) return [];\n return graph.edges.filter((e) => highlighted.has(e.from) && highlighted.has(e.to));\n }, [selected, root, record.data, graph, highlighted]);\n\n const query = search.trim().toLowerCase();\n const matches = (node: SemLineageNode) =>\n query === '' ||\n node.label.toLowerCase().includes(query) ||\n (node.detail ?? '').toLowerCase().includes(query);\n\n const counts = useMemo(() => {\n const byKind: Partial<Record<SemLineageNodeKind, number>> = {};\n for (const node of graph?.nodes ?? []) byKind[node.kind] = (byKind[node.kind] ?? 0) + 1;\n return byKind;\n }, [graph]);\n\n const upstreamEdges = selected ? lineageEdges.filter((e) => e.to === selected.id) : [];\n const downstreamEdges = selected ? lineageEdges.filter((e) => e.from === selected.id) : [];\n const nodeLabel = (id: string) => nodesById.get(id)?.label ?? id;\n const nodeKindLabel = (id: string) => {\n const node = nodesById.get(id);\n return node ? tx(`semanticfed.lineage.kinds.${node.kind}`, KIND_LABEL[node.kind]) : '';\n };\n\n const isEmpty = workspace.isSuccess && (graph?.nodes.length ?? 0) === 0;\n const warnings = [...(graph?.warnings ?? [])];\n const truncated = Boolean(graph?.truncated || record.data?.truncated);\n\n return (\n <div className=\"space-y-6 p-4 sm:p-6\" data-testid=\"semanticfed-lineage-page\">\n <div\n className=\"flex flex-wrap items-center justify-between gap-3\"\n data-tour=\"semanticfed-lineage-header\"\n >\n <div>\n <h1 className=\"text-2xl font-semibold\">{tx('semanticfed.lineage.title', 'Lineage')}</h1>\n <p className=\"text-sm text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.description',\n 'End-to-end lineage from connectors and data sources through tables, entities and fields to the models and saved queries that use them. Select anything to trace where its data comes from and what depends on it.'\n )}\n </p>\n </div>\n <div className=\"flex flex-wrap gap-2\" data-testid=\"lineage-counts\">\n {(Object.keys(KIND_LABEL) as SemLineageNodeKind[])\n .filter((kind) => counts[kind])\n .map((kind) => {\n const Icon = KIND_ICON[kind];\n return (\n <Badge key={kind} variant=\"outline\" className=\"gap-1\">\n <Icon className=\"h-3 w-3\" />\n {counts[kind]} {tx(`semanticfed.lineage.kinds.${kind}`, KIND_LABEL[kind])}\n </Badge>\n );\n })}\n </div>\n </div>\n\n {workspace.isPending && (\n <Card>\n <CardContent className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\">\n <Loader2 className=\"h-5 w-5 animate-spin\" />\n {tx('semanticfed.lineage.loading', 'Computing lineage…')}\n </CardContent>\n </Card>\n )}\n\n {workspace.isError && (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-destructive\"\n data-testid=\"lineage-error\"\n >\n <AlertTriangle className=\"h-5 w-5\" />\n {lineageErrorMessage(workspace.error)}\n </CardContent>\n </Card>\n )}\n\n {isEmpty && (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\"\n data-testid=\"lineage-empty\"\n >\n <GitBranch className=\"h-5 w-5\" />\n {tx(\n 'semanticfed.lineage.empty',\n 'No lineage yet. Connect a data source and model an entity on it; lineage appears here as soon as records exist.'\n )}\n </CardContent>\n </Card>\n )}\n\n {(warnings.length > 0 || truncated) && (\n <Card data-testid=\"lineage-warnings\">\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"flex items-center gap-2 text-base\">\n <AlertTriangle className=\"h-4 w-4 text-destructive\" />\n {tx('semanticfed.lineage.warnings.title', 'Lineage warnings')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-1 text-sm\">\n {truncated && (\n <p className=\"text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.warnings.truncated',\n 'This workspace is larger than one lineage pass reads, so the graph is partial.'\n )}\n </p>\n )}\n {warnings.slice(0, 20).map((warning, index) => (\n <button\n key={`${warning.nodeId ?? 'graph'}-${index}`}\n type=\"button\"\n className=\"block text-left text-muted-foreground hover:text-foreground\"\n onClick={() => warning.nodeId && setSelectedId(warning.nodeId)}\n >\n {warning.nodeId ? (\n <span className=\"font-medium\">{nodeLabel(warning.nodeId)}: </span>\n ) : null}\n {warning.message}\n </button>\n ))}\n </CardContent>\n </Card>\n )}\n\n {graph && graph.nodes.length > 0 && (\n <>\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input\n aria-label={tx('semanticfed.lineage.search', 'Filter nodes')}\n placeholder={tx('semanticfed.lineage.search', 'Filter nodes')}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full sm:w-64\"\n data-testid=\"lineage-search\"\n />\n <div\n className=\"flex rounded-md border\"\n role=\"group\"\n aria-label={tx('semanticfed.lineage.direction', 'Direction')}\n >\n {DIRECTIONS.map((d) => (\n <Button\n key={d}\n type=\"button\"\n size=\"sm\"\n variant={direction === d ? 'default' : 'ghost'}\n onClick={() => setDirection(d)}\n aria-pressed={direction === d}\n data-testid={`lineage-direction-${d}`}\n >\n {d === 'UPSTREAM'\n ? tx('semanticfed.lineage.upstream', 'Upstream')\n : d === 'DOWNSTREAM'\n ? tx('semanticfed.lineage.downstream', 'Downstream')\n : tx('semanticfed.lineage.both', 'Both')}\n </Button>\n ))}\n </div>\n <label className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n {tx('semanticfed.lineage.depth', 'Depth')}\n <select\n className=\"rounded border bg-background p-1.5 text-sm text-foreground\"\n value={depth ?? ''}\n onChange={(e) => setDepth(e.target.value ? Number(e.target.value) : null)}\n data-testid=\"lineage-depth\"\n >\n <option value=\"\">{tx('semanticfed.lineage.depthAll', 'All')}</option>\n {DEPTH_OPTIONS.map((d) => (\n <option key={d} value={d}>\n {d}\n </option>\n ))}\n </select>\n </label>\n {selected && (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => setSelectedId(null)}\n className=\"gap-1\"\n data-testid=\"lineage-clear\"\n >\n <X className=\"h-3 w-3\" />\n {tx('semanticfed.lineage.clear', 'Clear selection')}\n </Button>\n )}\n </div>\n\n <div className=\"grid gap-4 xl:grid-cols-[minmax(0,1fr)_22rem]\">\n <div className=\"min-w-0 overflow-x-auto\">\n <div\n className=\"grid min-w-0 grid-cols-1 gap-3 md:min-w-[60rem] md:grid-cols-6\"\n data-testid=\"lineage-lanes\"\n >\n {LANES.map((lane) => {\n const laneNodes = graph.nodes.filter(\n (node) => lane.kinds.includes(node.kind) && matches(node)\n );\n return (\n <section\n key={lane.id}\n className=\"min-w-0 space-y-2\"\n data-testid={`lineage-lane-${lane.id}`}\n >\n <h2 className=\"text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n {tx(`semanticfed.lineage.lanes.${lane.id}`, lane.label)}{' '}\n <span className=\"font-normal\">({laneNodes.length})</span>\n </h2>\n {laneNodes.length === 0 && <p className=\"text-xs text-muted-foreground\">—</p>}\n {laneNodes.map((node) => {\n const Icon = KIND_ICON[node.kind];\n const isSelected = node.id === selectedId;\n const inLineage = highlighted?.has(node.id) ?? false;\n const dimmed = highlighted !== null && !inLineage;\n return (\n <button\n key={node.id}\n type=\"button\"\n onClick={() => setSelectedId(isSelected ? null : node.id)}\n aria-pressed={isSelected}\n title={node.detail ?? node.label}\n data-testid=\"lineage-node\"\n data-node-id={node.id}\n data-node-kind={node.kind}\n data-in-lineage={inLineage ? 'true' : 'false'}\n className={cn(\n 'w-full rounded-md border bg-card p-2 text-left text-sm transition-colors hover:bg-accent',\n isSelected && 'border-primary ring-2 ring-primary',\n inLineage && !isSelected && 'border-primary bg-accent',\n dimmed && 'opacity-40'\n )}\n >\n <span className=\"flex items-center gap-1.5 font-medium\">\n <Icon className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate\">{node.label}</span>\n </span>\n {(node.detail || node.status) && (\n <span className=\"mt-0.5 block truncate text-xs text-muted-foreground\">\n {[node.status, node.detail].filter(Boolean).join(' · ')}\n </span>\n )}\n </button>\n );\n })}\n </section>\n );\n })}\n </div>\n </div>\n\n <Card className=\"min-w-0 self-start\" data-testid=\"lineage-details\">\n <CardHeader className=\"pb-3\">\n <CardTitle className=\"flex items-center gap-2 text-base\">\n <GitBranch className=\"h-4 w-4\" />\n {selected\n ? selected.label\n : tx('semanticfed.lineage.details.title', 'Lineage details')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4 text-sm\">\n {!selected && (\n <p className=\"text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.details.hint',\n 'Select a source, table, entity, field, model or query to trace its lineage.'\n )}\n </p>\n )}\n {selected && (\n <>\n <div className=\"space-y-1\">\n <Badge variant=\"outline\">\n {tx(\n `semanticfed.lineage.kinds.${selected.kind}`,\n KIND_LABEL[selected.kind]\n )}\n </Badge>\n {selected.detail && (\n <p className=\"break-words font-mono text-xs text-muted-foreground\">\n {selected.detail}\n </p>\n )}\n {selected.status && (\n <p className=\"text-xs text-muted-foreground\">{selected.status}</p>\n )}\n </div>\n {root && record.isPending && (\n <p className=\"flex items-center gap-2 text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n {tx('semanticfed.lineage.tracing', 'Tracing lineage…')}\n </p>\n )}\n {root && record.isError && (\n <p className=\"text-destructive\" data-testid=\"lineage-record-error\">\n {lineageErrorMessage(record.error)}\n </p>\n )}\n {highlighted && (\n <p className=\"text-muted-foreground\" data-testid=\"lineage-reach\">\n {tx(\n 'semanticfed.lineage.details.reach',\n '{{count}} nodes in this lineage',\n { count: Math.max(highlighted.size - 1, 0) }\n )}\n </p>\n )}\n <EdgeList\n title={tx('semanticfed.lineage.details.upstream', 'Comes from')}\n icon={ArrowUpLeft}\n edges={upstreamEdges}\n otherEnd={(e) => e.from}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n emptyText={tx('semanticfed.lineage.details.noUpstream', 'Nothing upstream')}\n testId=\"lineage-upstream\"\n />\n <EdgeList\n title={tx('semanticfed.lineage.details.downstream', 'Feeds into')}\n icon={ArrowDownRight}\n edges={downstreamEdges}\n otherEnd={(e) => e.to}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n emptyText={tx(\n 'semanticfed.lineage.details.noDownstream',\n 'Nothing downstream'\n )}\n testId=\"lineage-downstream\"\n />\n </>\n )}\n </CardContent>\n </Card>\n </div>\n </>\n )}\n </div>\n );\n}\n\ninterface EdgeListProps {\n title: string;\n icon: LucideIcon;\n edges: SemLineageEdge[];\n otherEnd: (edge: SemLineageEdge) => string;\n nodeLabel: (id: string) => string;\n nodeKindLabel: (id: string) => string;\n onSelect: (id: string) => void;\n emptyText: string;\n testId: string;\n}\n\nfunction EdgeList({\n title,\n icon: Icon,\n edges,\n otherEnd,\n nodeLabel,\n nodeKindLabel,\n onSelect,\n emptyText,\n testId,\n}: EdgeListProps) {\n return (\n <div className=\"space-y-2\" data-testid={testId}>\n <h3 className=\"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n <Icon className=\"h-3.5 w-3.5\" />\n {title} ({edges.length})\n </h3>\n {edges.length === 0 && <p className=\"text-xs text-muted-foreground\">{emptyText}</p>}\n <ul className=\"space-y-1.5\">\n {edges.map((edge) => {\n const other = otherEnd(edge);\n const observed = formatObservedAt(edge.observedAt);\n return (\n <li key={edge.id} className=\"rounded border p-2\">\n <button\n type=\"button\"\n className=\"font-medium hover:underline\"\n onClick={() => onSelect(other)}\n >\n {nodeLabel(other)}\n </button>\n <span className=\"ml-1 text-xs text-muted-foreground\">\n {nodeKindLabel(other)} · {EDGE_LABEL[edge.kind]}\n </span>\n {edge.detail && (\n <p className=\"mt-0.5 break-words font-mono text-xs text-muted-foreground\">\n {edge.detail}\n </p>\n )}\n {observed && <p className=\"mt-0.5 text-xs text-muted-foreground\">{observed}</p>}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAsDA,IAAMC,IAAoD;CACxD,WAAWC;CACX,aAAaC;CACb,OAAOC;CACP,QAAQC;CACR,WAAWC;CACX,QAAQC;CACR,QAAQC;CACR,OAAOC;CACP,OAAOC;AACT,GAEMC,IAAiD;CACrD,WAAW;CACX,aAAa;CACb,OAAO;CACP,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,OAAO;AACT,GASMC,IAAgB;CACpB;EAAE,IAAI;EAAW,OAAO;EAAW,OAAO,CAAC,aAAa,aAAa;CAAE;CACvE;EAAE,IAAI;EAAU,OAAO;EAAU,OAAO,CAAC,OAAO;CAAE;CAClD;EAAE,IAAI;EAAY,OAAO;EAAY,OAAO,CAAC,QAAQ;CAAE;CACvD;EAAE,IAAI;EAAU,OAAO;EAAU,OAAO;GAAC;GAAa;GAAU;EAAQ;CAAE;CAC1E;EAAE,IAAI;EAAU,OAAO;EAAU,OAAO,CAAC,OAAO;CAAE;CAClD;EAAE,IAAI;EAAW,OAAO;EAAW,OAAO,CAAC,OAAO;CAAE;AACtD,GAEMC,IAAqD;CACzD,UAAU;CACV,OAAO;CACP,SAAS;CACT,SAAS;CACT,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS;CACT,aAAa;AACf,GAEMC,IAAoC;CAAC;CAAY;CAAQ;AAAY,GACrEC,IAAgB;CAAC;CAAG;CAAG;CAAG;CAAG;AAAE;AASrC,SAASC,EACP,GACA,GACA,GACA,GACa;CACb,IAAMC,oBAAU,IAAI,IAAY,CAACC,CAAM,CAAC,GAClCC,IAAS,IAAI,IAAIC,EAAM,MAAM,QAAQ,MAAMC,EAAE,SAAS,OAAO,CAAC,CAAC,KAAK,MAAMA,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AiBL,EAAK,UAAU;KACjD,OACE,kBAAC,MAAD;MAAkB,WAAU;MAA5B,UAAA;OACE,kBAAC,UAAD;QACE,MAAK;QACL,WAAU;QACV,eAAeiF,EAASH,CAAK;QAE5B,UAAArC,EAAUqC,CAAK;OACV,CAAA;OACR,kBAAC,QAAD;QAAM,WAAU;QAAhB,UAAA;SACGnC,EAAcmC,CAAK;SAAE;SAAI5F,EAAWc,EAAK;QACtC;;OACLA,EAAK,UACJ,kBAAC,KAAD;QAAG,WAAU;QACV,UAAAA,EAAK;OACL,CAAA;OAEJgF,KAAY,kBAAC,KAAD;QAAG,WAAU;QAAwC,UAAAA;OAAY,CAAA;MAC5E;KAjBK,GAAAhF,EAAK,EAiBV;IAER,CAAC;GACC,CAAA;EACD;;AAET"}
1
+ {"version":3,"file":"LineagePage.js","names":["_Fragment","KIND_ICON","Plug","Database","Table2","Boxes","Ruler","Hash","Columns3","Layers","FileCode2","KIND_LABEL","LANES","EDGE_LABEL","DIRECTIONS","DEPTH_OPTIONS","traceLocally","reached","rootId","models","graph","n","walk","frontier","hops","depth","next","edge","from","to","forward","direction","formatObservedAt","value","date","LineagePage","useI18n","tx","translateWithFallback","t","key","fallback","params","workspace","useSemWorkspaceLineage","selectedId","setSelectedId","useState","setDirection","setDepth","search","setSearch","nodesById","useMemo","node","selected","root","lineageRootFor","record","useSemRecordLineage","highlighted","lineageEdges","query","matches","counts","byKind","upstreamEdges","downstreamEdges","nodeLabel","id","nodeKindLabel","isEmpty","warnings","truncated","kind","Icon","Badge","Card","CardContent","Loader2","AlertTriangle","lineageErrorMessage","GitBranch","CardHeader","CardTitle","warning","index","Fragment","Input","Button","d","X","laneNodes","lane","isSelected","inLineage","dimmed","cn","EdgeList","ArrowUpLeft","ArrowDownRight","testId","title","edges","emptyText","other","otherEnd","observed","onSelect"],"sources":["../../../src/semanticfed/pages/LineagePage.tsx"],"sourcesContent":["/**\n * Lineage page (BOFF-4279) — end-to-end lineage of the workspace's semantic\n * layer, read from the `semLineage` API.\n *\n * The workspace graph is laid out in lanes in the direction data flows\n * (sources → tables → entities → fields → models → queries). Selecting a node\n * asks the API for that record's upstream / downstream lineage and highlights\n * it; tables and unregistered columns (which have no SemanticFed record to\n * start a traversal from) are traced over the workspace graph instead.\n */\nimport { useMemo, useState } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n Badge,\n Button,\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport {\n AlertTriangle,\n ArrowDownRight,\n ArrowUpLeft,\n Boxes,\n Columns3,\n Database,\n FileCode2,\n GitBranch,\n Hash,\n Layers,\n Loader2,\n Plug,\n Ruler,\n Table2,\n X,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\n\nimport {\n type SemLineageDirection,\n type SemLineageEdge,\n type SemLineageGraph,\n type SemLineageNode,\n type SemLineageNodeKind,\n lineageErrorMessage,\n lineageRootFor,\n useSemRecordLineage,\n useSemWorkspaceLineage,\n} from '../hooks/useLineage';\nimport { cn } from '../utils/cn';\nimport { translateWithFallback } from '../utils/i18n';\n\nconst KIND_ICON: Record<SemLineageNodeKind, LucideIcon> = {\n CONNECTOR: Plug,\n DATA_SOURCE: Database,\n TABLE: Table2,\n ENTITY: Boxes,\n DIMENSION: Ruler,\n METRIC: Hash,\n COLUMN: Columns3,\n MODEL: Layers,\n QUERY: FileCode2,\n};\n\nconst KIND_LABEL: Record<SemLineageNodeKind, string> = {\n CONNECTOR: 'Connector',\n DATA_SOURCE: 'Data source',\n TABLE: 'Table',\n ENTITY: 'Entity',\n DIMENSION: 'Dimension',\n METRIC: 'Metric',\n COLUMN: 'Column',\n MODEL: 'Model',\n QUERY: 'Query',\n};\n\ninterface Lane {\n id: string;\n label: string;\n kinds: SemLineageNodeKind[];\n}\n\n/** Lanes in the direction data flows. */\nconst LANES: Lane[] = [\n { id: 'sources', label: 'Sources', kinds: ['CONNECTOR', 'DATA_SOURCE'] },\n { id: 'tables', label: 'Tables', kinds: ['TABLE'] },\n { id: 'entities', label: 'Entities', kinds: ['ENTITY'] },\n { id: 'fields', label: 'Fields', kinds: ['DIMENSION', 'METRIC', 'COLUMN'] },\n { id: 'models', label: 'Models', kinds: ['MODEL'] },\n { id: 'queries', label: 'Queries', kinds: ['QUERY'] },\n];\n\nconst EDGE_LABEL: Record<SemLineageEdge['kind'], string> = {\n PROVIDES: 'provides',\n HOSTS: 'hosts',\n MAPS_TO: 'maps to',\n DEFINES: 'defines',\n MEMBER_OF: 'member of',\n JOINS: 'joins',\n SERVES: 'serves',\n READ_BY: 'read by',\n EXECUTED_ON: 'executed on',\n};\n\nconst DIRECTIONS: SemLineageDirection[] = ['UPSTREAM', 'BOTH', 'DOWNSTREAM'];\nconst DEPTH_OPTIONS = [1, 2, 3, 5, 10] as const;\n\n/**\n * Upstream / downstream reach of a node over a graph that is already loaded,\n * for node kinds the API cannot start from. Mirrors the service's traversal:\n * JOINS edges are context, not data flow, so they are never followed, and a\n * model reached along the way is included but not expanded (otherwise one\n * entity would pull in every other entity and query of its model).\n */\nfunction traceLocally(\n graph: SemLineageGraph,\n rootId: string,\n direction: SemLineageDirection,\n depth: number | null\n): Set<string> {\n const reached = new Set<string>([rootId]);\n const models = new Set(graph.nodes.filter((n) => n.kind === 'MODEL').map((n) => n.id));\n const walk = (forward: boolean) => {\n let frontier = new Set([rootId]);\n let hops = 0;\n while (frontier.size > 0 && (depth === null || hops < depth)) {\n const next = new Set<string>();\n for (const edge of graph.edges) {\n if (edge.kind === 'JOINS') continue;\n const [from, to] = forward ? [edge.from, edge.to] : [edge.to, edge.from];\n if (from !== rootId && models.has(from)) continue;\n if (frontier.has(from) && !reached.has(to)) {\n reached.add(to);\n next.add(to);\n }\n }\n frontier = next;\n hops += 1;\n }\n };\n if (direction !== 'DOWNSTREAM') walk(false);\n if (direction !== 'UPSTREAM') walk(true);\n return reached;\n}\n\nfunction formatObservedAt(value: string | null): string | null {\n if (!value) return null;\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? null : date.toLocaleString();\n}\n\nexport function LineagePage() {\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) =>\n translateWithFallback(t, key, fallback, params);\n\n const workspace = useSemWorkspaceLineage();\n const [selectedId, setSelectedId] = useState<string | null>(null);\n const [direction, setDirection] = useState<SemLineageDirection>('BOTH');\n const [depth, setDepth] = useState<number | null>(null);\n const [search, setSearch] = useState('');\n\n const graph = workspace.data;\n const nodesById = useMemo(\n () => new Map((graph?.nodes ?? []).map((node) => [node.id, node] as const)),\n [graph]\n );\n const selected = selectedId ? (nodesById.get(selectedId) ?? null) : null;\n const root = selected ? lineageRootFor(selected) : null;\n const record = useSemRecordLineage(root, direction, depth);\n\n // The node ids in the selected node's lineage: from the API for records,\n // traced over the workspace graph for tables and columns.\n const highlighted = useMemo<Set<string> | null>(() => {\n if (!graph || !selected) return null;\n if (root) return record.data ? new Set(record.data.nodes.map((n) => n.id)) : null;\n return traceLocally(graph, selected.id, direction, depth);\n }, [graph, selected, root, record.data, direction, depth]);\n\n const lineageEdges = useMemo<SemLineageEdge[]>(() => {\n if (!selected) return [];\n if (root) return record.data?.edges ?? [];\n if (!graph || !highlighted) return [];\n return graph.edges.filter((e) => highlighted.has(e.from) && highlighted.has(e.to));\n }, [selected, root, record.data, graph, highlighted]);\n\n const query = search.trim().toLowerCase();\n const matches = (node: SemLineageNode) =>\n query === '' ||\n node.label.toLowerCase().includes(query) ||\n (node.detail ?? '').toLowerCase().includes(query);\n\n const counts = useMemo(() => {\n const byKind: Partial<Record<SemLineageNodeKind, number>> = {};\n for (const node of graph?.nodes ?? []) byKind[node.kind] = (byKind[node.kind] ?? 0) + 1;\n return byKind;\n }, [graph]);\n\n const upstreamEdges = selected ? lineageEdges.filter((e) => e.to === selected.id) : [];\n const downstreamEdges = selected ? lineageEdges.filter((e) => e.from === selected.id) : [];\n const nodeLabel = (id: string) => nodesById.get(id)?.label ?? id;\n const nodeKindLabel = (id: string) => {\n const node = nodesById.get(id);\n return node ? tx(`semanticfed.lineage.kinds.${node.kind}`, KIND_LABEL[node.kind]) : '';\n };\n\n const isEmpty = workspace.isSuccess && (graph?.nodes.length ?? 0) === 0;\n const warnings = [...(graph?.warnings ?? [])];\n const truncated = Boolean(graph?.truncated || record.data?.truncated);\n\n return (\n <div className=\"space-y-6 p-4 sm:p-6\" data-testid=\"semanticfed-lineage-page\">\n <div\n className=\"flex flex-wrap items-center justify-between gap-3\"\n data-tour=\"semanticfed-lineage-header\"\n >\n <div>\n <h1 className=\"text-2xl font-semibold\">{tx('semanticfed.lineage.title', 'Lineage')}</h1>\n <p className=\"text-sm text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.description',\n 'End-to-end lineage from connectors and data sources through tables, entities and fields to the models and saved queries that use them. Select anything to trace where its data comes from and what depends on it.'\n )}\n </p>\n </div>\n <div className=\"flex flex-wrap gap-2\" data-testid=\"lineage-counts\">\n {(Object.keys(KIND_LABEL) as SemLineageNodeKind[])\n .filter((kind) => counts[kind])\n .map((kind) => {\n const Icon = KIND_ICON[kind];\n return (\n <Badge key={kind} variant=\"outline\" className=\"gap-1\">\n <Icon className=\"h-3 w-3\" />\n {counts[kind]} {tx(`semanticfed.lineage.kinds.${kind}`, KIND_LABEL[kind])}\n </Badge>\n );\n })}\n </div>\n </div>\n\n {workspace.isPending && (\n <Card>\n <CardContent className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\">\n <Loader2 className=\"h-5 w-5 animate-spin\" />\n {tx('semanticfed.lineage.loading', 'Computing lineage…')}\n </CardContent>\n </Card>\n )}\n\n {workspace.isError && (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-destructive\"\n data-testid=\"lineage-error\"\n >\n <AlertTriangle className=\"h-5 w-5\" />\n {lineageErrorMessage(workspace.error)}\n </CardContent>\n </Card>\n )}\n\n {isEmpty && (\n <Card>\n <CardContent\n className=\"flex items-center gap-3 p-6 text-sm text-muted-foreground\"\n data-testid=\"lineage-empty\"\n >\n <GitBranch className=\"h-5 w-5\" />\n {tx(\n 'semanticfed.lineage.empty',\n 'No lineage yet. Connect a data source and model an entity on it; lineage appears here as soon as records exist.'\n )}\n </CardContent>\n </Card>\n )}\n\n {(warnings.length > 0 || truncated) && (\n <Card data-testid=\"lineage-warnings\">\n <CardHeader className=\"pb-2\">\n <CardTitle className=\"flex items-center gap-2 text-base\">\n <AlertTriangle className=\"h-4 w-4 text-destructive\" />\n {tx('semanticfed.lineage.warnings.title', 'Lineage warnings')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-1 text-sm\">\n {truncated && (\n <p className=\"text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.warnings.truncated',\n 'This workspace is larger than one lineage pass reads, so the graph is partial.'\n )}\n </p>\n )}\n {warnings.slice(0, 20).map((warning, index) => (\n <button\n key={`${warning.nodeId ?? 'graph'}-${index}`}\n type=\"button\"\n className=\"block text-left text-muted-foreground hover:text-foreground\"\n onClick={() => warning.nodeId && setSelectedId(warning.nodeId)}\n >\n {warning.nodeId ? (\n <span className=\"font-medium\">{nodeLabel(warning.nodeId)}: </span>\n ) : null}\n {warning.message}\n </button>\n ))}\n </CardContent>\n </Card>\n )}\n\n {graph && graph.nodes.length > 0 && (\n <>\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input\n aria-label={tx('semanticfed.lineage.search', 'Filter nodes')}\n placeholder={tx('semanticfed.lineage.search', 'Filter nodes')}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full sm:w-64\"\n data-testid=\"lineage-search\"\n />\n <div\n className=\"flex rounded-md border\"\n role=\"group\"\n aria-label={tx('semanticfed.lineage.direction', 'Direction')}\n >\n {DIRECTIONS.map((d) => (\n <Button\n key={d}\n type=\"button\"\n size=\"sm\"\n variant={direction === d ? 'default' : 'ghost'}\n onClick={() => setDirection(d)}\n aria-pressed={direction === d}\n data-testid={`lineage-direction-${d}`}\n >\n {d === 'UPSTREAM'\n ? tx('semanticfed.lineage.upstream', 'Upstream')\n : d === 'DOWNSTREAM'\n ? tx('semanticfed.lineage.downstream', 'Downstream')\n : tx('semanticfed.lineage.both', 'Both')}\n </Button>\n ))}\n </div>\n <label className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n {tx('semanticfed.lineage.depth', 'Depth')}\n <select\n className=\"rounded border bg-background p-1.5 text-sm text-foreground\"\n value={depth ?? ''}\n onChange={(e) => setDepth(e.target.value ? Number(e.target.value) : null)}\n data-testid=\"lineage-depth\"\n >\n <option value=\"\">{tx('semanticfed.lineage.depthAll', 'All')}</option>\n {DEPTH_OPTIONS.map((d) => (\n <option key={d} value={d}>\n {d}\n </option>\n ))}\n </select>\n </label>\n {selected && (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => setSelectedId(null)}\n className=\"gap-1\"\n data-testid=\"lineage-clear\"\n >\n <X className=\"h-3 w-3\" />\n {tx('semanticfed.lineage.clear', 'Clear selection')}\n </Button>\n )}\n </div>\n\n <div className=\"grid gap-4 xl:grid-cols-[minmax(0,1fr)_22rem]\">\n <div className=\"min-w-0 overflow-x-auto\">\n <div\n className=\"grid min-w-0 grid-cols-1 gap-3 md:min-w-[60rem] md:grid-cols-6\"\n data-testid=\"lineage-lanes\"\n >\n {LANES.map((lane) => {\n const laneNodes = graph.nodes.filter(\n (node) => lane.kinds.includes(node.kind) && matches(node)\n );\n return (\n <section\n key={lane.id}\n className=\"min-w-0 space-y-2\"\n data-testid={`lineage-lane-${lane.id}`}\n >\n <h2 className=\"text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n {tx(`semanticfed.lineage.lanes.${lane.id}`, lane.label)}{' '}\n <span className=\"font-normal\">({laneNodes.length})</span>\n </h2>\n {laneNodes.length === 0 && <p className=\"text-xs text-muted-foreground\">—</p>}\n {laneNodes.map((node) => {\n const Icon = KIND_ICON[node.kind];\n const isSelected = node.id === selectedId;\n const inLineage = highlighted?.has(node.id) ?? false;\n const dimmed = highlighted !== null && !inLineage;\n return (\n <button\n key={node.id}\n type=\"button\"\n onClick={() => setSelectedId(isSelected ? null : node.id)}\n aria-pressed={isSelected}\n title={node.detail ?? node.label}\n data-testid=\"lineage-node\"\n data-node-id={node.id}\n data-node-kind={node.kind}\n data-in-lineage={inLineage ? 'true' : 'false'}\n className={cn(\n 'w-full rounded-md border bg-card p-2 text-left text-sm transition-colors hover:bg-accent',\n isSelected && 'border-primary ring-2 ring-primary',\n inLineage && !isSelected && 'border-primary bg-accent',\n dimmed && 'opacity-40'\n )}\n >\n <span className=\"flex items-center gap-1.5 font-medium\">\n <Icon className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate\">{node.label}</span>\n </span>\n {(node.detail || node.status) && (\n <span className=\"mt-0.5 block truncate text-xs text-muted-foreground\">\n {[node.status, node.detail].filter(Boolean).join(' · ')}\n </span>\n )}\n </button>\n );\n })}\n </section>\n );\n })}\n </div>\n </div>\n\n <Card className=\"min-w-0 self-start\" data-testid=\"lineage-details\">\n <CardHeader className=\"pb-3\">\n <CardTitle className=\"flex items-center gap-2 text-base\">\n <GitBranch className=\"h-4 w-4\" />\n {selected\n ? selected.label\n : tx('semanticfed.lineage.details.title', 'Lineage details')}\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4 text-sm\">\n {!selected && (\n <p className=\"text-muted-foreground\">\n {tx(\n 'semanticfed.lineage.details.hint',\n 'Select a source, table, entity, field, model or query to trace its lineage.'\n )}\n </p>\n )}\n {selected && (\n <>\n <div className=\"space-y-1\">\n <Badge variant=\"outline\">\n {tx(\n `semanticfed.lineage.kinds.${selected.kind}`,\n KIND_LABEL[selected.kind]\n )}\n </Badge>\n {selected.detail && (\n <p className=\"break-words font-mono text-xs text-muted-foreground\">\n {selected.detail}\n </p>\n )}\n {selected.status && (\n <p className=\"text-xs text-muted-foreground\">{selected.status}</p>\n )}\n </div>\n {root && record.isPending && (\n <p className=\"flex items-center gap-2 text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n {tx('semanticfed.lineage.tracing', 'Tracing lineage…')}\n </p>\n )}\n {root && record.isError && (\n <p className=\"text-destructive\" data-testid=\"lineage-record-error\">\n {lineageErrorMessage(record.error)}\n </p>\n )}\n {highlighted && (\n <p className=\"text-muted-foreground\" data-testid=\"lineage-reach\">\n {tx(\n 'semanticfed.lineage.details.reach',\n '{{count}} nodes in this lineage',\n { count: Math.max(highlighted.size - 1, 0) }\n )}\n </p>\n )}\n <EdgeList\n title={tx('semanticfed.lineage.details.upstream', 'Comes from')}\n icon={ArrowUpLeft}\n edges={upstreamEdges}\n otherEnd={(e) => e.from}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n emptyText={tx('semanticfed.lineage.details.noUpstream', 'Nothing upstream')}\n testId=\"lineage-upstream\"\n />\n <EdgeList\n title={tx('semanticfed.lineage.details.downstream', 'Feeds into')}\n icon={ArrowDownRight}\n edges={downstreamEdges}\n otherEnd={(e) => e.to}\n nodeLabel={nodeLabel}\n nodeKindLabel={nodeKindLabel}\n onSelect={setSelectedId}\n emptyText={tx(\n 'semanticfed.lineage.details.noDownstream',\n 'Nothing downstream'\n )}\n testId=\"lineage-downstream\"\n />\n </>\n )}\n </CardContent>\n </Card>\n </div>\n </>\n )}\n </div>\n );\n}\n\ninterface EdgeListProps {\n title: string;\n icon: LucideIcon;\n edges: SemLineageEdge[];\n otherEnd: (edge: SemLineageEdge) => string;\n nodeLabel: (id: string) => string;\n nodeKindLabel: (id: string) => string;\n onSelect: (id: string) => void;\n emptyText: string;\n testId: string;\n}\n\nfunction EdgeList({\n title,\n icon: Icon,\n edges,\n otherEnd,\n nodeLabel,\n nodeKindLabel,\n onSelect,\n emptyText,\n testId,\n}: EdgeListProps) {\n return (\n <div className=\"space-y-2\" data-testid={testId}>\n <h3 className=\"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">\n <Icon className=\"h-3.5 w-3.5\" />\n {title} ({edges.length})\n </h3>\n {edges.length === 0 && <p className=\"text-xs text-muted-foreground\">{emptyText}</p>}\n <ul className=\"space-y-1.5\">\n {edges.map((edge) => {\n const other = otherEnd(edge);\n const observed = formatObservedAt(edge.observedAt);\n return (\n <li key={edge.id} className=\"rounded border p-2\">\n <button\n type=\"button\"\n className=\"font-medium hover:underline\"\n onClick={() => onSelect(other)}\n >\n {nodeLabel(other)}\n </button>\n <span className=\"ml-1 text-xs text-muted-foreground\">\n {nodeKindLabel(other)} · {EDGE_LABEL[edge.kind]}\n </span>\n {edge.detail && (\n <p className=\"mt-0.5 break-words font-mono text-xs text-muted-foreground\">\n {edge.detail}\n </p>\n )}\n {observed && <p className=\"mt-0.5 text-xs text-muted-foreground\">{observed}</p>}\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAsDA,IAAMC,IAAoD;CACxD,WAAWC;CACX,aAAaC;CACb,OAAOC;CACP,QAAQC;CACR,WAAWC;CACX,QAAQC;CACR,QAAQC;CACR,OAAOC;CACP,OAAOC;AACT,GAEMC,IAAiD;CACrD,WAAW;CACX,aAAa;CACb,OAAO;CACP,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,OAAO;AACT,GASMC,KAAgB;CACpB;EAAE,IAAI;EAAW,OAAO;EAAW,OAAO,CAAC,aAAa,aAAa;CAAE;CACvE;EAAE,IAAI;EAAU,OAAO;EAAU,OAAO,CAAC,OAAO;CAAE;CAClD;EAAE,IAAI;EAAY,OAAO;EAAY,OAAO,CAAC,QAAQ;CAAE;CACvD;EAAE,IAAI;EAAU,OAAO;EAAU,OAAO;GAAC;GAAa;GAAU;EAAQ;CAAE;CAC1E;EAAE,IAAI;EAAU,OAAO;EAAU,OAAO,CAAC,OAAO;CAAE;CAClD;EAAE,IAAI;EAAW,OAAO;EAAW,OAAO,CAAC,OAAO;CAAE;AACtD,GAEMC,IAAqD;CACzD,UAAU;CACV,OAAO;CACP,SAAS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AY,eAAa0B;EAAxC,UAAA;GACE,kBAAC,MAAD;IAAI,WAAU;IAAd,UAAA;KACE,kBAAC1B,GAAD,EAAM,WAAU,cAAe,CAAA;KAC9B2B;KAAM;KAAGC,EAAM;KAAO;IACrB;;GACHA,EAAM,WAAW,KAAK,kBAAC,KAAD;IAAG,WAAU;IAAiC,UAAAC;GAAa,CAAA;GAClF,kBAAC,MAAD;IAAI,WAAU;IACX,UAAAD,EAAM,KAAK,MAAS;KACnB,IAAME,IAAQC,EAAS/E,CAAI,GACrBgF,IAAW3E,EAAiBL,EAAK,UAAU;KACjD,OACE,kBAAC,MAAD;MAAkB,WAAU;MAA5B,UAAA;OACE,kBAAC,UAAD;QACE,MAAK;QACL,WAAU;QACV,eAAeiF,EAASH,CAAK;QAE5B,UAAArC,EAAUqC,CAAK;OACV,CAAA;OACR,kBAAC,QAAD;QAAM,WAAU;QAAhB,UAAA;SACGnC,EAAcmC,CAAK;SAAE;SAAI5F,EAAWc,EAAK;QACtC;;OACLA,EAAK,UACJ,kBAAC,KAAD;QAAG,WAAU;QACV,UAAAA,EAAK;OACL,CAAA;OAEJgF,KAAY,kBAAC,KAAD;QAAG,WAAU;QAAwC,UAAAA;OAAY,CAAA;MAC5E;KAjBK,GAAAhF,EAAK,EAiBV;IAER,CAAC;GACC,CAAA;EACD;;AAET"}
@@ -2,8 +2,8 @@ import { useSemanticFedStore as e } from "../store/semanticfedStore.js";
2
2
  import { translateWithFallback as t } from "../utils/i18n.js";
3
3
  import { Activity as n, AlertTriangle as r, CheckCircle2 as i, Cpu as a, Database as o, Gauge as s, Minus as c, TrendingDown as l, TrendingUp as u, XCircle as d } from "lucide-react";
4
4
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
5
- import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell";
6
- import { Badge as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y } from "@burdenoff/fe-libs/ui";
5
+ import { Badge as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v } from "@burdenoff/fe-libs/ui";
6
+ import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell";
7
7
  // src/semanticfed/pages/MonitoringPage.tsx
8
8
  var b = {
9
9
  up: /* @__PURE__ */ f(u, { className: "h-3 w-3" }),
@@ -27,7 +27,7 @@ var b = {
27
27
  }
28
28
  };
29
29
  function S() {
30
- let { t: c } = m(), { monitoringMetrics: l, federationEndpoints: u, agents: S } = e(), C = (e, n, r) => t(c, e, n, r), w = {
30
+ let { t: c } = y(), { monitoringMetrics: l, federationEndpoints: u, agents: S } = e(), C = (e, n, r) => t(c, e, n, r), w = {
31
31
  "SPARQL Query Throughput": C("semanticfed.monitoring.metricNames.queryThroughput", "SPARQL Query Throughput"),
32
32
  "Triple Ingestion Rate": C("semanticfed.monitoring.metricNames.tripleIngestionRate", "Triple Ingestion Rate"),
33
33
  "Federation Latency (p95)": C("semanticfed.monitoring.metricNames.federationLatencyP95", "Federation Latency (p95)"),
@@ -59,17 +59,17 @@ function S() {
59
59
  })] }), /* @__PURE__ */ p("div", {
60
60
  className: "flex gap-2",
61
61
  children: [
62
- /* @__PURE__ */ p(h, {
62
+ /* @__PURE__ */ p(m, {
63
63
  variant: "default",
64
64
  className: "gap-1",
65
65
  children: [/* @__PURE__ */ f(i, { className: "h-3 w-3" }), C("semanticfed.monitoring.badges.healthyCount", "{count} healthy", { count: D })]
66
66
  }),
67
- O > 0 && /* @__PURE__ */ p(h, {
67
+ O > 0 && /* @__PURE__ */ p(m, {
68
68
  variant: "secondary",
69
69
  className: "gap-1",
70
70
  children: [/* @__PURE__ */ f(r, { className: "h-3 w-3" }), C("semanticfed.monitoring.badges.warningCount", "{count} warning", { count: O })]
71
71
  }),
72
- k > 0 && /* @__PURE__ */ p(h, {
72
+ k > 0 && /* @__PURE__ */ p(m, {
73
73
  variant: "destructive",
74
74
  className: "gap-1",
75
75
  children: [/* @__PURE__ */ f(d, { className: "h-3 w-3" }), C("semanticfed.monitoring.badges.criticalCount", "{count} critical", { count: k })]
@@ -80,13 +80,13 @@ function S() {
80
80
  /* @__PURE__ */ p("div", {
81
81
  className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4",
82
82
  children: [
83
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
83
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ p(_, {
84
84
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
85
- children: [/* @__PURE__ */ f(y, {
85
+ children: [/* @__PURE__ */ f(v, {
86
86
  className: "text-sm font-medium",
87
87
  children: C("semanticfed.monitoring.kpis.endpointHealth.title", "Endpoint Health")
88
88
  }), /* @__PURE__ */ f(n, { className: "h-4 w-4 text-muted-foreground" })]
89
- }), /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ p("div", {
89
+ }), /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p("div", {
90
90
  className: "text-2xl font-bold",
91
91
  children: [
92
92
  u.filter((e) => e.status === "online").length,
@@ -97,13 +97,13 @@ function S() {
97
97
  className: "text-xs text-muted-foreground",
98
98
  children: C("semanticfed.monitoring.kpis.endpointHealth.subtitle", "endpoints online")
99
99
  })] })] }),
100
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
100
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ p(_, {
101
101
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
102
- children: [/* @__PURE__ */ f(y, {
102
+ children: [/* @__PURE__ */ f(v, {
103
103
  className: "text-sm font-medium",
104
104
  children: C("semanticfed.monitoring.kpis.agentUptime.title", "Agent Uptime")
105
105
  }), /* @__PURE__ */ f(a, { className: "h-4 w-4 text-muted-foreground" })]
106
- }), /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ p("div", {
106
+ }), /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p("div", {
107
107
  className: "text-2xl font-bold",
108
108
  children: [
109
109
  S.filter((e) => e.status === "running").length,
@@ -114,26 +114,26 @@ function S() {
114
114
  className: "text-xs text-muted-foreground",
115
115
  children: C("semanticfed.monitoring.kpis.agentUptime.subtitle", "agents running")
116
116
  })] })] }),
117
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
117
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ p(_, {
118
118
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
119
- children: [/* @__PURE__ */ f(y, {
119
+ children: [/* @__PURE__ */ f(v, {
120
120
  className: "text-sm font-medium",
121
121
  children: C("semanticfed.monitoring.kpis.totalTriplesServed.title", "Total Triples Served")
122
122
  }), /* @__PURE__ */ f(o, { className: "h-4 w-4 text-muted-foreground" })]
123
- }), /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ p("div", {
123
+ }), /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p("div", {
124
124
  className: "text-2xl font-bold",
125
125
  children: [(u.reduce((e, t) => e + t.triplesServed, 0) / 1e6).toFixed(1), "M"]
126
126
  }), /* @__PURE__ */ f("p", {
127
127
  className: "text-xs text-muted-foreground",
128
128
  children: C("semanticfed.monitoring.kpis.totalTriplesServed.subtitle", "across all endpoints")
129
129
  })] })] }),
130
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
130
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ p(_, {
131
131
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
132
- children: [/* @__PURE__ */ f(y, {
132
+ children: [/* @__PURE__ */ f(v, {
133
133
  className: "text-sm font-medium",
134
134
  children: C("semanticfed.monitoring.kpis.avgLatency.title", "Avg Latency")
135
135
  }), /* @__PURE__ */ f(s, { className: "h-4 w-4 text-muted-foreground" })]
136
- }), /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ p("div", {
136
+ }), /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p("div", {
137
137
  className: "text-2xl font-bold",
138
138
  children: [Math.round(u.filter((e) => e.status === "online").reduce((e, t) => e + t.latencyMs, 0) / Math.max(u.filter((e) => e.status === "online").length, 1)), "ms"]
139
139
  }), /* @__PURE__ */ f("p", {
@@ -142,10 +142,10 @@ function S() {
142
142
  })] })] })
143
143
  ]
144
144
  }),
145
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ f(v, { children: /* @__PURE__ */ f(y, {
145
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f(_, { children: /* @__PURE__ */ f(v, {
146
146
  className: "text-base",
147
147
  children: C("semanticfed.monitoring.systemMetrics.title", "System Metrics")
148
- }) }), /* @__PURE__ */ f(_, { children: /* @__PURE__ */ f("div", {
148
+ }) }), /* @__PURE__ */ f(g, { children: /* @__PURE__ */ f("div", {
149
149
  className: "grid gap-4 md:grid-cols-2",
150
150
  children: l.map((e) => {
151
151
  let t = x[e.status], n = Math.min(e.value / e.threshold * 100, 100);
@@ -159,7 +159,7 @@ function S() {
159
159
  children: [/* @__PURE__ */ f("p", {
160
160
  className: "text-sm font-medium",
161
161
  children: w[e.name] ?? e.name
162
- }), /* @__PURE__ */ f(h, {
162
+ }), /* @__PURE__ */ f(m, {
163
163
  variant: t.badge,
164
164
  className: "text-xs",
165
165
  children: T[e.status] ?? e.status
@@ -197,10 +197,10 @@ function S() {
197
197
  }, e.id);
198
198
  })
199
199
  }) })] }),
200
- /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ f(v, { children: /* @__PURE__ */ f(y, {
200
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f(_, { children: /* @__PURE__ */ f(v, {
201
201
  className: "text-base",
202
202
  children: C("semanticfed.monitoring.endpointLatency.title", "Endpoint Latency Breakdown")
203
- }) }), /* @__PURE__ */ f(_, {
203
+ }) }), /* @__PURE__ */ f(g, {
204
204
  className: "space-y-2",
205
205
  children: u.map((e) => /* @__PURE__ */ p("div", {
206
206
  className: "flex items-center gap-3",
@@ -2,8 +2,8 @@ import { useSemanticFedStore as e } from "../store/semanticfedStore.js";
2
2
  import { translateWithFallback as t } from "../utils/i18n.js";
3
3
  import { ArrowUpRight as n, FileCode2 as r, GitBranch as i, Layers as a, Plus as o, Search as s } from "lucide-react";
4
4
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
5
- import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell";
6
- import { Badge as d, Button as f, Card as p, CardContent as m, CardHeader as h, CardTitle as g } from "@burdenoff/fe-libs/ui";
5
+ import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h } from "@burdenoff/fe-libs/ui";
6
+ import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell";
7
7
  // src/semanticfed/pages/OntologyPage.tsx
8
8
  var _ = {
9
9
  OWL: "bg-status-info-bg-subtle text-status-info-text",
@@ -12,7 +12,7 @@ var _ = {
12
12
  SHACL: "bg-status-warning-bg-subtle text-status-warning-text"
13
13
  };
14
14
  function v() {
15
- let { t: v } = u(), { ontologies: y } = e(), b = (e, n, r) => t(v, e, n, r), x = {
15
+ let { t: v } = g(), { ontologies: y } = e(), b = (e, n, r) => t(v, e, n, r), x = {
16
16
  published: b("semanticfed.ontology.status.published", "Published"),
17
17
  draft: b("semanticfed.ontology.status.draft", "Draft"),
18
18
  deprecated: b("semanticfed.ontology.status.deprecated", "Deprecated")
@@ -30,7 +30,7 @@ function v() {
30
30
  children: b("semanticfed.ontology.description", "Browse, create, and manage OWL/RDFS/SKOS ontologies that define the semantic schema of your knowledge graphs.")
31
31
  })] }), /* @__PURE__ */ l("div", {
32
32
  className: "flex gap-2",
33
- children: [/* @__PURE__ */ l(f, {
33
+ children: [/* @__PURE__ */ l(d, {
34
34
  variant: "outline",
35
35
  size: "sm",
36
36
  children: [
@@ -38,7 +38,7 @@ function v() {
38
38
  " ",
39
39
  b("semanticfed.ontology.actions.search", "Search")
40
40
  ]
41
- }), /* @__PURE__ */ l(f, {
41
+ }), /* @__PURE__ */ l(d, {
42
42
  size: "sm",
43
43
  children: [/* @__PURE__ */ c(o, { className: "mr-2 h-4 w-4" }), b("semanticfed.ontology.actions.newOntology", "New Ontology")]
44
44
  })]
@@ -47,52 +47,52 @@ function v() {
47
47
  /* @__PURE__ */ l("div", {
48
48
  className: "grid gap-4 md:grid-cols-4",
49
49
  children: [
50
- /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c(h, {
50
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
51
51
  className: "pb-2",
52
- children: /* @__PURE__ */ c(g, {
52
+ children: /* @__PURE__ */ c(h, {
53
53
  className: "text-sm font-medium",
54
54
  children: b("semanticfed.ontology.summary.ontologies.title", "Ontologies")
55
55
  })
56
- }), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
56
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
57
57
  className: "text-2xl font-bold",
58
58
  children: y.length
59
59
  }), /* @__PURE__ */ c("p", {
60
60
  className: "text-xs text-muted-foreground",
61
61
  children: b("semanticfed.ontology.summary.ontologies.subtitle", "{count} published", { count: w })
62
62
  })] })] }),
63
- /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c(h, {
63
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
64
64
  className: "pb-2",
65
- children: /* @__PURE__ */ c(g, {
65
+ children: /* @__PURE__ */ c(h, {
66
66
  className: "text-sm font-medium",
67
67
  children: b("semanticfed.ontology.summary.totalClasses.title", "Total Classes")
68
68
  })
69
- }), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
69
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
70
70
  className: "text-2xl font-bold",
71
71
  children: S
72
72
  }), /* @__PURE__ */ c("p", {
73
73
  className: "text-xs text-muted-foreground",
74
74
  children: b("semanticfed.ontology.summary.totalClasses.subtitle", "across all ontologies")
75
75
  })] })] }),
76
- /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c(h, {
76
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
77
77
  className: "pb-2",
78
- children: /* @__PURE__ */ c(g, {
78
+ children: /* @__PURE__ */ c(h, {
79
79
  className: "text-sm font-medium",
80
80
  children: b("semanticfed.ontology.summary.totalProperties.title", "Total Properties")
81
81
  })
82
- }), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
82
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
83
83
  className: "text-2xl font-bold",
84
84
  children: C
85
85
  }), /* @__PURE__ */ c("p", {
86
86
  className: "text-xs text-muted-foreground",
87
87
  children: b("semanticfed.ontology.summary.totalProperties.subtitle", "object + data properties")
88
88
  })] })] }),
89
- /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c(h, {
89
+ /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
90
90
  className: "pb-2",
91
- children: /* @__PURE__ */ c(g, {
91
+ children: /* @__PURE__ */ c(h, {
92
92
  className: "text-sm font-medium",
93
93
  children: b("semanticfed.ontology.summary.formats.title", "Formats")
94
94
  })
95
- }), /* @__PURE__ */ l(m, { children: [/* @__PURE__ */ c("div", {
95
+ }), /* @__PURE__ */ l(p, { children: [/* @__PURE__ */ c("div", {
96
96
  className: "flex flex-wrap gap-1",
97
97
  children: Array.from(new Set(y.map((e) => e.format))).map((e) => /* @__PURE__ */ c("span", {
98
98
  className: `rounded px-2 py-0.5 text-xs font-medium ${_[e] ?? ""}`,
@@ -106,21 +106,21 @@ function v() {
106
106
  }),
107
107
  /* @__PURE__ */ c("div", {
108
108
  className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
109
- children: y.map((e) => /* @__PURE__ */ l(p, {
109
+ children: y.map((e) => /* @__PURE__ */ l(f, {
110
110
  className: "group transition-shadow hover:shadow-md",
111
- children: [/* @__PURE__ */ c(h, {
111
+ children: [/* @__PURE__ */ c(m, {
112
112
  className: "pb-3",
113
113
  children: /* @__PURE__ */ l("div", {
114
114
  className: "flex items-start justify-between",
115
115
  children: [/* @__PURE__ */ l("div", {
116
116
  className: "flex items-center gap-2",
117
- children: [/* @__PURE__ */ c(r, { className: "h-5 w-5 text-muted-foreground" }), /* @__PURE__ */ c(g, {
117
+ children: [/* @__PURE__ */ c(r, { className: "h-5 w-5 text-muted-foreground" }), /* @__PURE__ */ c(h, {
118
118
  className: "text-base",
119
119
  children: e.name
120
120
  })]
121
121
  }), /* @__PURE__ */ c(n, { className: "h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100" })]
122
122
  })
123
- }), /* @__PURE__ */ l(m, {
123
+ }), /* @__PURE__ */ l(p, {
124
124
  className: "space-y-3",
125
125
  children: [
126
126
  /* @__PURE__ */ c("p", {
@@ -130,7 +130,7 @@ function v() {
130
130
  /* @__PURE__ */ l("div", {
131
131
  className: "flex items-center gap-2",
132
132
  children: [
133
- /* @__PURE__ */ c(d, {
133
+ /* @__PURE__ */ c(u, {
134
134
  variant: e.status === "published" ? "default" : e.status === "draft" ? "secondary" : "outline",
135
135
  children: x[e.status] ?? e.status
136
136
  }),