fix: network map drag redraws links + release 1.0.8 #12

Merged
domuk merged 1 commit from fix/network-map-drag into main 2026-08-22 15:00:40 +01:00
Owner

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

  • Wire version into all position-dependent useMemo deps (LinkLayer, NetworkCanvas, TierRails)
  • Fix PlaceDialog + useNodeDrag to use api.put for network-node-positions (matches server PUT route)
  • Link edit handles use group-hover/canvas:opacity-40 pattern

Tests

  • 151 server tests pass
  • Client build clean (165 modules, 0 errors)
  • Docker image ion-homelab:1.0.8 built successfully

Manual Verification

Drag a node on the network map — lines must follow in real-time. Click ⋯ on a link midpoint — edit panel must open.

## 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 - Wire version into all position-dependent useMemo deps (LinkLayer, NetworkCanvas, TierRails) - Fix PlaceDialog + useNodeDrag to use api.put for network-node-positions (matches server PUT route) - Link edit handles use group-hover/canvas:opacity-40 pattern ## Tests - 151 server tests pass - Client build clean (165 modules, 0 errors) - Docker image ion-homelab:1.0.8 built successfully ## 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.
domuk merged commit 28659312d3 into main 2026-08-22 15:00:40 +01:00
domuk deleted branch fix/network-map-drag 2026-08-22 15:00:40 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
domuk/Ion-HomeLab!12
No description provided.