fix: add limitedDocuments dependency to activeVersionChain useMemo

Prevents stale version chain data when documents change but the
selected node stays the same. The chainIndex ref is rebuilt in a
useEffect when limitedDocuments changes, but without this dependency
the useMemo would return cached (stale) chain data.
This commit is contained in:
Vorflux AI 2026-03-29 00:36:07 +00:00
parent 7e31f07924
commit b08760ef85

View file

@ -497,7 +497,7 @@ export function MemoryGraph({
const activeVersionChain = useMemo(() => {
if (!activeNodeData || activeNodeData.type !== "memory") return null
return chainIndex.current.getChain(activeNodeData.id)
}, [activeNodeData])
}, [activeNodeData, limitedDocuments])
const isLoading = externalIsLoading