You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(workflow/frontend): canvas hit-testing hard-codes 240x100 node geometry, so sized container nodes are mis-targeted #14008
Found while fixing #13996 M3 (PR #14003), which confined data.width/data.height sizing to org-group container nodes. The canvas still assumes every node is 240x100 everywhere it does geometry.
:490 — connection drop hit-test: x <= n.position.x + 240 && y <= n.position.y + 100
:522 — the CSS that actually sets the width: .workflow-node { width: 240px; }
Four independent copies of the same number, and a fifth canonical one already exists: components/workflow/canvasNode.ts exports CANVAS_NODE_WIDTH = 240, which the layout builder uses and the renderer does not.
The height literals (50 for the vertical centre, 100 for the box) are pure invention — a node's height is content-driven and a container's comes from data.height (928x482 for a 6-person forest in the org chart). Dropping a connection anywhere below 100px of a tall node's top edge misses it.
Impact today
Latent, not live: connections are an authoring affordance and the org chart mounts the canvas readonly, so the only nodes that are currently sized differently are also the only ones that cannot be connected. It becomes live the moment a sized node appears in an editable canvas.
Fix
Measure or derive the node box instead of assuming it, and route every remaining literal through CANVAS_NODE_WIDTH plus a companion height source. Deliberately not taken in #14003 — it is a refactor of the authoring path, whereas that PR is a post-merge defect fix for #13939.
Closure check against main after #21930 (merge 8d0c736). check-issue-close-refs.sh 14008 clear. This issue has no checkbox list; its "Fix" section is the criterion and each clause is checked below.
"Measure or derive the node box instead of assuming it" - autobot-frontend/src/components/workflow/canvasNode.ts:119nodeExtent(node) returns data.width/data.height for an org-group, else the default box; :131nodePortY = extent height / 2.
"route every remaining literal through CANVAS_NODE_WIDTH plus a companion height source" - canvasNode.ts:42CANVAS_NODE_WIDTH, :51CANVAS_NODE_HEIGHT, :61CANVAS_NODE_PORT_Y. The four copies listed in the issue now read these:
drop hit-test: WorkflowCanvas.vue:2304-2306 (x <= n.position.x + width && y <= n.position.y + height);
rendered width: WorkflowCanvas.vuenodeStyle sets width: ${CANVAS_NODE_WIDTH}px, org-group overrides from data; the .workflow-node CSS rule at :2566 no longer carries width: 240px.
node centre: WorkflowCanvas.vue:1598-1599.
Tests: WorkflowCanvas.sizedGeometry.test.ts - "leaves a sized source at its own trailing edge and mid-line", "keeps the default box for an unsized node", "connects when the drop is below the old 100px box but inside the real height", "does not connect when the drop is below the real height". The PR records that reverting the fixed port height fails these specs; I did not re-run them.
Every clause is delivered; the issue stays closed.
search the minified canvas code in the deployed frontend bundle (the release directory the web server serves, built 21:21 Riga; GET / → HTTP 200 references the same entry chunk)
if(e.type==='org-group'){let t=e.data;return{width:typeof t.width=='number'?t.width:240,height:typeof t.height=='number'?t.height:100}}return{width:240,height:100}, then the port-Y helper returns nodeExtent(e).height/2
Verdict
Verified. The served canvas derives a sized container's box from its own data.width/data.height. The 240x100 literals remain only as the fallback for types that carry no size.
Activity
Merge pull request #21930 from mrveiss/issue-14409-company-os-canvas-…
fix(workflow): canvas edge anchors and connection hit-test read the n…
mrveiss commentedon Nov 21, 2026
Closure check against main after #21930 (merge 8d0c736).
check-issue-close-refs.sh 14008clear. This issue has no checkbox list; its "Fix" section is the criterion and each clause is checked below.autobot-frontend/src/components/workflow/canvasNode.ts:119nodeExtent(node)returnsdata.width/data.heightfor anorg-group, else the default box;:131nodePortY= extent height / 2.canvasNode.ts:42CANVAS_NODE_WIDTH,:51CANVAS_NODE_HEIGHT,:61CANVAS_NODE_PORT_Y. The four copies listed in the issue now read these:WorkflowCanvas.vue:1259-1260(nodeExtent(node).width,nodePortY);WorkflowCanvas.vue:2226-2227;WorkflowCanvas.vue:2304-2306(x <= n.position.x + width && y <= n.position.y + height);WorkflowCanvas.vuenodeStylesetswidth: ${CANVAS_NODE_WIDTH}px,org-groupoverrides fromdata; the.workflow-nodeCSS rule at :2566 no longer carrieswidth: 240px.WorkflowCanvas.vue:1598-1599.WorkflowCanvas.sizedGeometry.test.ts- "leaves a sized source at its own trailing edge and mid-line", "keeps the default box for an unsized node", "connects when the drop is below the old 100px box but inside the real height", "does not connect when the drop is below the real height". The PR records that reverting the fixed port height fails these specs; I did not re-run them.Every clause is delivered; the issue stays closed.
mrveiss commentedon Nov 21, 2026
Host evidence (install at d8cbd91)
Checked 2026-11-21 ~21:38 Riga. Deployed commit marker on the install =
d8cbd91925a19c7e4bc27696382e8b6a01ef2c0d(=origin/main); backend and SLM backend servicesactive. All checks read-only.Commands (generic)
WorkflowCanvas.vue,canvasNode.ts, 4 tests), deployed source vs origin/mainGET /→ HTTP 200 references the same entry chunk)Results
nodeExtentin the built bundleif(e.type==='org-group'){let t=e.data;return{width:typeof t.width=='number'?t.width:240,height:typeof t.height=='number'?t.height:100}}return{width:240,height:100}, then the port-Y helper returnsnodeExtent(e).height/2Verdict
Verified. The served canvas derives a sized container's box from its own
data.width/data.height. The 240x100 literals remain only as the fallback for types that carry no size.