From 2c4f621dede17923fc6ddfcae1db5fac6c951f4f Mon Sep 17 00:00:00 2001 From: yangdx Date: Sat, 26 Jul 2025 08:42:19 +0800 Subject: [PATCH] fix(webui): Correct edge renderer for sigma.js v3 The `curvedNoArrow` edge type was incorrectly configured, causing a `TypeError` during graph rendering. This commit updates the `edgeProgramClasses` in `GraphViewer.tsx` to use the `createEdgeCurveProgram()` factory function as required by `@sigma/edge-curve` v3, resolving the crash. --- lightrag_webui/src/features/GraphViewer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightrag_webui/src/features/GraphViewer.tsx b/lightrag_webui/src/features/GraphViewer.tsx index cf8276d5..6f2e036f 100644 --- a/lightrag_webui/src/features/GraphViewer.tsx +++ b/lightrag_webui/src/features/GraphViewer.tsx @@ -5,7 +5,7 @@ import { Settings as SigmaSettings } from 'sigma/settings' import { GraphSearchOption, OptionItem } from '@react-sigma/graph-search' import { EdgeArrowProgram, NodePointProgram, NodeCircleProgram } from 'sigma/rendering' import { NodeBorderProgram } from '@sigma/node-border' -import EdgeCurveProgram, { EdgeCurvedArrowProgram } from '@sigma/edge-curve' +import { EdgeCurvedArrowProgram, createEdgeCurveProgram } from '@sigma/edge-curve' import FocusOnNode from '@/components/graph/FocusOnNode' import LayoutsControl from '@/components/graph/LayoutsControl' @@ -36,7 +36,7 @@ const defaultSigmaSettings: Partial = { edgeProgramClasses: { arrow: EdgeArrowProgram, curvedArrow: EdgeCurvedArrowProgram, - curvedNoArrow: EdgeCurveProgram + curvedNoArrow: createEdgeCurveProgram() }, nodeProgramClasses: { default: NodeBorderProgram,