From 1331c38fe4a5ea81f4c71fd8de27b9dff5f47e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20MANSUY?= Date: Thu, 4 Dec 2025 19:18:41 +0800 Subject: [PATCH] cherry-pick 79a17c3f --- lightrag_webui/src/components/graph/EditablePropertyRow.tsx | 3 ++- lightrag_webui/src/stores/graph.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lightrag_webui/src/components/graph/EditablePropertyRow.tsx b/lightrag_webui/src/components/graph/EditablePropertyRow.tsx index 5a1297d3..1604bcdc 100644 --- a/lightrag_webui/src/components/graph/EditablePropertyRow.tsx +++ b/lightrag_webui/src/components/graph/EditablePropertyRow.tsx @@ -126,9 +126,10 @@ const EditablePropertyRow = ({ } else { // Node was updated/renamed normally try { + const graphValue = name === 'entity_id' ? finalValue : value await useGraphStore .getState() - .updateNodeAndSelect(nodeId, entityId, name, finalValue) + .updateNodeAndSelect(nodeId, entityId, name, graphValue) } catch (error) { console.error('Error updating node in graph:', error) throw new Error('Failed to update node in graph') diff --git a/lightrag_webui/src/stores/graph.ts b/lightrag_webui/src/stores/graph.ts index 36c1d7b5..f2e89981 100644 --- a/lightrag_webui/src/stores/graph.ts +++ b/lightrag_webui/src/stores/graph.ts @@ -246,7 +246,7 @@ const useGraphStoreBase = create()((set, get) => ({ console.log('updateNodeAndSelect', nodeId, entityId, propertyName, newValue) - // For entity_id changes (node renaming) with NetworkX graph storage + // For entity_id changes (node renaming) with raw graph storage if ((nodeId === entityId) && (propertyName === 'entity_id')) { // Create new node with updated ID but same attributes sigmaGraph.addNode(newValue, { ...nodeAttributes, label: newValue })