import React from 'react'; import { X, ArrowRight, ArrowLeft, MessageSquareText } from 'lucide-react'; import { ROOT_ID, TIER_COLORS, TIER_LABELS, SIGNAL_COLOR } from '../lib/graph'; const MAX_RELATIONS = 40; /** Floating card describing the selected node and its relationships. */ const NodeInspector = ({ nodeId, analysis, isLit, onSelect, onAsk, onClose }) => { if (!nodeId || !analysis.tier.has(nodeId)) return null; const tier = analysis.tier.get(nodeId); const relations = (analysis.neighbors.get(nodeId) || []).filter((r) => r.id !== ROOT_ID || r.label !== 'contains'); const degree = analysis.degree.get(nodeId) || 0; return (
{degree} connection{degree === 1 ? '' : 's'}
)}No relationships found.
} {relations.slice(0, MAX_RELATIONS).map((r, i) => ( ))} {relations.length > MAX_RELATIONS && (+{relations.length - MAX_RELATIONS} more
)}