Files
MIKROTIK-RMM/frontend
2GT-RichandClaude Opus 4.8 6dd855476e fix(topology): stop infinite render loop crashing the Topology page (#37) (#39)
The Topology page crashed on load with React error #185 ("Maximum update
depth exceeded"), thrown from inside React Flow's setNodes.

Root cause: handleDeleteManual depended on the whole TanStack Query
useMutation result object, which is recreated on every render. That made
handleDeleteManual unstable, which made the `graph` useMemo recompute every
render, which made the node/edge sync effect fire every render — calling
setNodes/setEdges in a loop until React aborted.

Fix: depend on the referentially-stable `.mutate` function instead of the
whole mutation object, so handleDeleteManual stays stable and `graph` only
rebuilds when the underlying data or connectMode actually change.

Verified: tsc --noEmit clean, eslint clean, vite build succeeds, and the
Topology page renders without #185 in a local Docker build.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 16:08:57 -07:00
..
2026-04-13 18:15:41 -07:00
2026-04-13 18:15:41 -07:00
2026-04-13 18:15:41 -07:00
2026-04-13 18:15:41 -07:00
2026-04-13 18:15:41 -07:00