What to build
The boundary proxy is a load-bearing domain concept (ADR-0031 / ADR-0036), but its view-side rules are smeared across the 2750-line canvas island: coalescing per-edge proxy rows that share a realEndpointId into one rendered node, rail placement / railPosition, the repOnScope endpoint→on-scope-representative mapping, and survivingProxies (which proxies remain when a set of Connections is removed). One copy of the re-add logic is already extracted (readdCrossScope) but only the undo path uses it.
Lift these pure functions into one boundaryProxyView module with a small interface (roughly layout(proxies, edges), survivingProxies(proxies, retainedEdgeIds), repOnScope(...)) and unit tests. Route the canvas's proxy layout (placement + coalescing) through it. Routing the delete/undo/connect paths through survivingProxies is a separate slice — this slice establishes the module and uses it for layout.
Keep these as pure, DOM-free functions so they can be unit-tested off-screen. Do not change rendered behavior; this is an extraction.
Source: architecture review, candidate 02a.
Acceptance criteria
Blocked by
None - can start immediately
What to build
The boundary proxy is a load-bearing domain concept (ADR-0031 / ADR-0036), but its view-side rules are smeared across the 2750-line canvas island: coalescing per-edge proxy rows that share a
realEndpointIdinto one rendered node, rail placement /railPosition, therepOnScopeendpoint→on-scope-representative mapping, andsurvivingProxies(which proxies remain when a set of Connections is removed). One copy of the re-add logic is already extracted (readdCrossScope) but only the undo path uses it.Lift these pure functions into one
boundaryProxyViewmodule with a small interface (roughlylayout(proxies, edges),survivingProxies(proxies, retainedEdgeIds),repOnScope(...)) and unit tests. Route the canvas's proxy layout (placement + coalescing) through it. Routing the delete/undo/connect paths throughsurvivingProxiesis a separate slice — this slice establishes the module and uses it for layout.Keep these as pure, DOM-free functions so they can be unit-tested off-screen. Do not change rendered behavior; this is an extraction.
Source: architecture review, candidate 02a.
Acceptance criteria
boundaryProxyViewmodule exists exposing the proxy layout, coalescing,repOnScope, andsurvivingProxieslogic as pure functionsrealEndpointIdcoalescing via the module, not inlinesurvivingProxiespnpm checkandpnpm testpassBlocked by
None - can start immediately