Why
While drawing/dragging a link, the overlay shows a straight dashed line (drawLinkPreview) instead of the link as it will actually render (routing, arrowheads, style). Also: default new link should be an elbow arrow instead of a straight line.
Proposed solution
Default style of a new link → elbow arrow:
Live preview = the real rendered link:
Where in code: packages/scene/src/edge.ts / operations.ts (computeCreateLink) — default routing/arrowhead; packages/state/src/overlay.ts (drawLinkPreview, edgePreview) — replace line with real rendering; packages/state/src/editor.ts (applyLinkPreview, computeLinkPreviewEndpoints, applyCreateLink); packages/renderer-core edge-renderer — reuse for preview; constants.ts — arrowhead/elbow defaults.
Kind: feature
Alternatives / Notes
- UI/UX change → needs approval of details (arrowhead type, thickness, color, elbow behavior across relative positions) before implementing. Do AFTER anchor-overlay-ux bugs are closed.
- Status (2026-06-18): Section 1 (default = elbow) DONE (
DEFAULT_LINK_ROUTING = "orthogonal" in buildLinkForCreate). Section 2 (applyLinkPreview / routeElbowPreview in editor.ts, render-orchestrator.ts) appears implemented; needs manual verification (both backends, all three endpoint types) before closing.
Why
While drawing/dragging a link, the overlay shows a straight dashed line (
drawLinkPreview) instead of the link as it will actually render (routing, arrowheads, style). Also: default new link should be an elbow arrow instead of a straight line.Proposed solution
Default style of a new link → elbow arrow:
routing: "orthogonal"(Manhattan elbow) + end arrowhead (arrowheads.end = "arrow"/"triangle"). Was: defaultroutingstraight, no arrowheads (packages/scene/src/edge.ts:114-139).computeCreateLinkin scene vs state at creation) without breaking serialization of old links (fields optional — old links without routing stay straight, or migrate).constants.ts.Live preview = the real rendered link:
drawLinkPreview.renderLinks/ edge-renderer in renderer-core). Build a ghost Link from preview endpoints through the same render path, or render a temporary link in the main layer.Where in code:
packages/scene/src/edge.ts/operations.ts(computeCreateLink) — default routing/arrowhead;packages/state/src/overlay.ts(drawLinkPreview,edgePreview) — replace line with real rendering;packages/state/src/editor.ts(applyLinkPreview,computeLinkPreviewEndpoints,applyCreateLink);packages/renderer-coreedge-renderer — reuse for preview;constants.ts— arrowhead/elbow defaults.Kind: feature
Alternatives / Notes
DEFAULT_LINK_ROUTING = "orthogonal"inbuildLinkForCreate). Section 2 (applyLinkPreview/routeElbowPreviewineditor.ts,render-orchestrator.ts) appears implemented; needs manual verification (both backends, all three endpoint types) before closing.