fix: network map drag redraws links + release 1.0.8 #12
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/network-map-drag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Dragging nodes on the network map does not redraw the connection lines. Link edit handles are invisible. PlaceDialog uses wrong HTTP method.
Root Cause
useNodeDrag mutates graph in-place and calls touch() (increments version counter), but LinkLayer/NetworkCanvas useMemo deps only had [graph] — same object reference, so memo cache never busted.
Fix
Tests
Manual Verification
Drag a node on the network map — lines must follow in real-time. Click ⋯ on a link midpoint — edit panel must open.
- Wire version counter into all useMemo deps (LinkLayer, NetworkCanvas, TierRails) so links/handles/rails re-render when nodes are dragged - Fix PlaceDialog and useNodeDrag to use api.put for network-node-positions (matches server's PUT upsert-by-stableKey route) - Link edit handles visible on canvas hover (group-hover/canvas pattern) - Other client fixes: open={true} on modals, DeviceTypePicker label truncate Root cause: useNodeDrag mutates graph in-place and calls touch() which increments version, but LinkLayer/NetworkCanvas useMemo deps only had [graph] — same object reference, so memo never busted. Adding version to deps makes React re-compute paths every frame during drag. Build: docker ion-homelab:1.0.8, 151 server tests pass.