Skip to content

fix: what the review of the drag routes and the trace turned up - #116

Merged
endrix merged 1 commit into
mainfrom
fix/review-of-drag-routes-and-trace
Nov 6, 2026
Merged

endrix merged 1 commit into
mainfrom
fix/review-of-drag-routes-and-trace

Conversation

@endrix

@endrix endrix commented Nov 6, 2026

Copy link
Copy Markdown
Owner

A medium-level review of #112, #114 and #115 after their merge. Six of its ten findings held up and are fixed here, each with a test where one could be written:

  • The drop still swapped routes. Once the server's route reached the ports, the view fell through to the live-router branch for the rest of the 650 ms settling window, then jumped onto the server's route. The server's route is now drawn the moment it reaches the ports.
  • The reveal fallback was flat at 1.5 s while libavoid's time grows faster than the edge count. It now waits 1.5 s plus 25 ms per hidden edge, 6 s at most.
  • A node with no edges was walked on every pointer move. Once per drag now.
  • The trace turned a wire between two overlapping nodes because it compared port centres. It compares node centres now; a group's boundary port keeps its own place.
  • A slid route could keep a 1 px stub (a node moved up to its own bend), a vertical exit to the eye. A kept route needs an 8 px stub, else it is routed anew.
  • unkink guessed which end it was given by x-distance and picked the wrong one on a U-shaped route. It takes the end explicitly; libavoid lists points source to target. The unpadded node boxes are derived from the padded obstacles instead of a second model walk.

Left as they are, with the reasons: a pointer released outside the diagram sends no finished move, so its edges stay hidden up to the 5 s abandoned-drag timer (the price of keeping a node held still mid-drag hidden); the bootstrap reroute of a diagram with a saved layout and no saved routes goes through libavoid for up to 200 edges, a one-time cost at open that the perf line reports; the hidden-edge state stays a module map the view polls, as the other drag state is.

https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv

A dropped node's edges: once the server's route reaches the ports it is
drawn at once, inside the drag's 650ms settling window too; before, the
live router kept drawing its own route until the window closed and the
edge jumped onto the server's. The reveal fallback grows with the number
of hidden edges (25ms each, 6s at most), since libavoid's time does. A
node with no edges is walked once per drag, not once per pointer move.

The selection trace reads a wire by where its two nodes stand rather than
by their ports, so two nodes overlapping across the page (one under the
other, or moved by hand) do not turn it round.

A slid route must leave its port on a stub of 8px or more; a node moved up
to its own bend had kept a 1px stub, a vertical exit to the eye. The
unpadded node boxes come from the padded obstacles instead of a second
walk of the model. libavoid's unkink works on the end it is given, source
first and target last as libavoid lists them, instead of guessing the end
by x-distance, which picked the wrong one on a U-shaped route.

Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
@endrix
endrix merged commit b9d3e5e into main Nov 6, 2026
1 check passed
@endrix
endrix deleted the fix/review-of-drag-routes-and-trace branch November 6, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant