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 })