Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
Address review: edge labels carry text and follow an Effects toggle
unknownc58686b4ec2d
diff --git a/explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx b/explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsxindex 328bfd6c..575c884b 100644--- a/explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx+++ b/explorer/src/workspaces/GraphWorkspace/GraphCanvas.tsx@@ -1215,6 +1215,10 @@ function applySceneState(size: resolvedStyle.size,zIndex: resolvedStyle.zIndex,curvature: resolvedStyle.curvature,+ // #1009: Sigma's edge label renderer draws data.label — the graph+ // stores the relationship type in edgeType, which the renderer never+ // saw, so enabling renderEdgeLabels alone left edges blank.+ label: resolvedStyle.hidden ? undefined : String(attrs.edgeType ?? data.label ?? ""),};});@@ -1941,6 +1945,17 @@ export const GraphCanvas = forwardRef<GraphCanvasHandle, GraphCanvasProps>(});}, [behaviors, dispatchToBehaviors, getBehaviorContext, graphReady, syncCameraState]);+ // #1009: renderEdgeLabels follows the Effects-panel toggle instead of+ // staying hardcoded — dense graphs get their label-free edges back.+ useEffect(() => {+ const sigma = sigmaRef.current;+ if (!sigma) {+ return;+ }+ sigma.setSetting("renderEdgeLabels", effectsState.edgeLabelsEnabled);+ sigma.scheduleRefresh();+ }, [effectsState.edgeLabelsEnabled]);+useEffect(() => {return () => {const sigma = sigmaRef.current;diff --git a/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx b/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsxindex e077980b..1a9cface 100644--- a/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx+++ b/explorer/src/workspaces/GraphWorkspace/GraphWorkspace.tsx@@ -148,6 +148,7 @@ const DEFAULT_EFFECTS_STATE: GraphEffectsState = {communitiesEnabled: false,centralityEnabled: false,legendEnabled: false,+ edgeLabelsEnabled: true,diagnosticsEnabled: false,lensMode: "neighborhood",effectQuality: "bounded",diff --git a/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPlugin.tsx b/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPlugin.tsxindex 9f174358..6b9b9972 100644--- a/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPlugin.tsx+++ b/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPlugin.tsx@@ -30,6 +30,11 @@ const EFFECT_ROWS: EffectRowConfig[] = [label: "Neighborhood Lens",description: "Local emphasis around the hovered or selected node.",},+ {+ key: "edgeLabelsEnabled",+ label: "Edge Labels",+ description: "Draw the relationship type on graph edges. Off restores label-free edges on dense graphs.",+ },{key: "legendEnabled",label: "Semantic Legend",diff --git a/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPluginPhaseC.tsx b/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPluginPhaseC.tsxindex 3fb936bb..58e1ad7e 100644--- a/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPluginPhaseC.tsx+++ b/explorer/src/workspaces/GraphWorkspace/plugins/explorationEffectsPluginPhaseC.tsx@@ -47,6 +47,11 @@ const SCENE_EFFECT_ROWS: EffectRowConfig[] = [label: "Contours",description: "Low-contrast density halos around the strongest visible anchors.",},+ {+ key: "edgeLabelsEnabled",+ label: "Edge Labels",+ description: "Draw the relationship type on graph edges. Off restores label-free edges on dense graphs.",+ },{key: "legendEnabled",label: "Regions Summary",@@ -83,6 +88,7 @@ const AVAILABILITY_KEYS: Record<GraphEffectToggle, keyof GraphDiagnosticsSnapshocommunitiesEnabled: "communities",centralityEnabled: "centrality",legendEnabled: "legend",+ edgeLabelsEnabled: "edge-labels",diagnosticsEnabled: "diagnostics",};diff --git a/explorer/src/workspaces/GraphWorkspace/types.ts b/explorer/src/workspaces/GraphWorkspace/types.tsindex 01164899..2f2ebe4b 100644--- a/explorer/src/workspaces/GraphWorkspace/types.ts+++ b/explorer/src/workspaces/GraphWorkspace/types.ts@@ -103,6 +103,7 @@ export type GraphEffectToggle =| "communitiesEnabled"| "centralityEnabled"| "legendEnabled"+ | "edgeLabelsEnabled"| "diagnosticsEnabled";export interface GraphEffectsState {@@ -113,6 +114,7 @@ export interface GraphEffectsState {semanticRegionsEnabled: boolean;contoursEnabled: boolean;pathfindingEnabled: boolean;+ edgeLabelsEnabled: boolean;communitiesEnabled: boolean;centralityEnabled: boolean;legendEnabled: boolean;