feat: add insert mode to edit tool - #228
Conversation
afonsobspinto
left a comment
There was a problem hiding this comment.
Sorry for the post merge review:
-
Clearing the selection leaves the first insert node armed.
Hold I, select node A, then use Ctrl+Shift+right-click to clear the selection. The existing clear-selection handler removes the selected node and any merge anchor, but it does not clear insertFirstNode. Consequently, clicking a neighbour B immediately inserts between A and B—even though A is no longer visibly selected. -
edge case: completion after deactivation can suppress selection highlighting again.
-
very edge case: The midpoint can use an outdated first-node position. F.e:
-
With the Skeleton tab open, move node A and wait for the edit to finish.
-
Hold I and click A as the first insertion endpoint.
-
Keep holding I, trigger an undo, and wait for it to finish.
-
Keep I held, and click neighbouring node B.
Undo restores A’s previous position in the cache, but insertFirstNode still contains the snapshot captured before the undo.
Adds an insert mode to edit tool, you must click nodes which are directly connected for execution to go through. Intended to follow the existing patterns in the code base, and made with Claude since it shouldn't really be introducing any new concepts