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
fix(workflow): room side-panel Flow tab overflows its panel; orphan/clipped edges and nested scroll #1513
Written-by: FlyBotDebugger LIVE visual recheck (Asia/Shanghai 2026-10-28 ~09:05), prod tip ~55e1c27a (includes #1459/#1464/#1473/#1490) via cookie proxy.
In a Workflow room, the right-hand panel Flow tab (about 400px wide) draws the flowchart wider than the panel and with broken edges.
Actual (room 「FlyBot issue → 合入」 → right panel → Flow)
Only 3 of 7 nodes are visible; the rest are off to the right behind an inner horizontal scrollbar, inside the panel's own vertical scroll (nested scrollbars).
Orphan vertical edge segments float above Triage with no source node.
Horizontal edges run off the right edge; a branches · Merg… label is cut mid-word; the dashed loop edge is clipped.
The run title strip at the top (#1460 · issue #1460「fix(workflow)…) is hard-cut.
Triage of #1513: agent-ready. Base read: main = 92a6aabd (2026-10-28T02:16Z).
Why the three conditions hold
No open design conflict.fix(workflow): the compact flowchart thumbnail cuts off any workflow with 3+ layers (viewBox hard-coded to 28x28) #1464 (compact thumbnail viewBox) is closed; nothing is open that decides this shape. The issue accepts either fit-to-width or the compact layout, so the look is settled. One constraint is already recorded instead of open: docs/subsystems/workflow.md:36,58 makes the drawer flowchart an editing surface ("flowchart drawer (collapsed by default, per-node inspector)" and "the flowchart drawer … all write workflow/graph"), so the fix must keep drag / wire / inspector working in the drawer — it must not quietly make the drawer read-only.
Expected behaviour and scope are clear (below).
Not hold, not a tracking/umbrella issue, not team-via-groups work.
Defect
.wf-drawer{width:400px} holds .wf-dr-body{overflow:auto;padding:4px 18px 20px} (≈364px content box), and the Flow tab mounts the same absolute-coordinate canvas the Settings page uses: .wf-canvas{overflow:auto} and .wf-plane{position:relative;width:0}, each node at left: node.x - NODE_W/2 (NODE_W=168), wires in an svg at left:-480px;width:960px.
Coordinates come from layoutNodes (GAP_X=188, GAP_Y=108) and, after any edit, from the stored graph. A layer of 2 parallel nodes already reaches ±178px off centre; 3 columns reach ±272px, and a dragged node can be anywhere — all beyond the 182px half-width of the drawer. Nothing computes bounds→panel: so nodes, their wires, the .wf-plabel ("Parallel branches · Merge after all pass", white-space:nowrap) and the .wf-term run strip are cut at the panel edge, and the overflowing absolutely positioned nodes inside the scrolling canvas are what creates the inner horizontal scrollbar next to the drawer's own vertical one. The "orphan vertical segment" is the same cause: the visible slice of an edge whose source node is clipped away.
Repro
Workflow room → right panel → Flow, on a graph with a parallel layer (delivery demo Planner → Writer → Coder → Reviewer ‖ Tester → Deployer, or the room's own 7-node flow) at prod 55e1c27a: only the first nodes are visible, the rest sit behind an inner horizontal scrollbar, wires enter from clipped edges, branches · Merg… is cut mid-word.
Acceptance (executable)
On a 400px drawer, every node box and both endpoints of every edge are inside the canvas box; no horizontal scrollbar inside the panel (one vertical scroll only).
Every edge leaves its source node's bottom anchor and lands on its target's top anchor; no detached vertical segment.
The parallel-branch label and the run title strip wrap/ellipsize inside the width instead of being cut mid-word.
The drawer stays editable: drag, wire, reconnect and the inspector commit the same world coordinates as today (pointer deltas divided by the fit scale, no coordinate rewrite in the stored graph).
Files
plugins/workflow/client.js — fit helper next to wirePath / parallelFrameStyle, the Flow plane/wires sizing, drawer canvas CSS; keep the Settings canvas scrolling as it does.
plugins/workflow/test/client.test.js — the tests below.
docs/subsystems/workflow.md — line 36 / 58 drawer wording, if the fit becomes a named behaviour.
changelog.d/1513-workflow-panel-fit.fixed.md.
Tests, red first
Write these against 92a6aabd, watch each fail, then implement:
the drawer fits every node and edge inside a 400px panel — export a pure fitPlane(nodes, panelWidth); for the delivery graph assert every node's [x-NODE_W/2, x+NODE_W/2] ⊂ [0,panelWidth] and every parallelFrameStyle(fitted) box inside it. Fails today: no helper, raw ±188 coordinates.
fitted wire endpoints land on node anchors — for each edge, wirePath(fit(from), fit(to)) starts at (from.x, from.y+NODE_WIRE_OUT) and ends at (to.x, to.y) in fitted space, and stays inside the plane height (loop edge included). Fails today: endpoints are world coordinates outside the panel.
Source/CSS assertion beside the existing one at client.test.js:625 — the drawer canvas has no horizontal overflow (e.g. .wf-canvas-narrow{overflow:hidden} / overflow-y:auto), while .wf-dr-body keeps its single vertical scroll. Fails today: .wf-canvas{…overflow:auto}.
a narrow panel does not cut labels mid-word — .wf-plabel no longer white-space:nowrap (wrap or max-width + ellipsis), same for the drawer .wf-term. Fails today.
A mount test: opening the drawer's Flow tab gives the canvas its narrow variant (class/prop), while the Settings canvas does not. Fails today.
Risk
T2 — plugins/workflow/client.js is plugin code no risk-rules.json rule names (the T3 list covers plugins/social/** and core/src/shared/**; an unnamed path is never silently T0/T1), no T3 diffPatterns hit, no package.json / lockfile. T0/T1 would need proof the change is pure copy, which a layout/coordinate change is not.
Owner: Dev · Reviewer: Reviewer — the claim, branch and PR belong to Dev, not to this triage step.
Activity
Birfy commentedon Oct 28, 2026
Written-by: Triage
Triage of #1513:
agent-ready. Base read:main=92a6aabd(2026-10-28T02:16Z).Why the three conditions hold
workflow/graph"), so the fix must keep drag / wire / inspector working in the drawer — it must not quietly make the drawer read-only.hold, not a tracking/umbrella issue, not team-via-groups work.Defect
.wf-drawer{width:400px}holds.wf-dr-body{overflow:auto;padding:4px 18px 20px}(≈364px content box), and the Flow tab mounts the same absolute-coordinate canvas the Settings page uses:.wf-canvas{overflow:auto}and.wf-plane{position:relative;width:0}, each node atleft: node.x - NODE_W/2(NODE_W=168), wires in an svg atleft:-480px;width:960px.Coordinates come from
layoutNodes(GAP_X=188,GAP_Y=108) and, after any edit, from the stored graph. A layer of 2 parallel nodes already reaches ±178px off centre; 3 columns reach ±272px, and a dragged node can be anywhere — all beyond the 182px half-width of the drawer. Nothing computes bounds→panel: so nodes, their wires, the.wf-plabel("Parallel branches · Merge after all pass",white-space:nowrap) and the.wf-termrun strip are cut at the panel edge, and the overflowing absolutely positioned nodes inside the scrolling canvas are what creates the inner horizontal scrollbar next to the drawer's own vertical one. The "orphan vertical segment" is the same cause: the visible slice of an edge whose source node is clipped away.Repro
Workflow room → right panel → Flow, on a graph with a parallel layer (delivery demo Planner → Writer → Coder → Reviewer ‖ Tester → Deployer, or the room's own 7-node flow) at prod
55e1c27a: only the first nodes are visible, the rest sit behind an inner horizontal scrollbar, wires enter from clipped edges,branches · Merg…is cut mid-word.Acceptance (executable)
Files
plugins/workflow/client.js— fit helper next towirePath/parallelFrameStyle, theFlowplane/wires sizing, drawer canvas CSS; keep the Settings canvas scrolling as it does.plugins/workflow/test/client.test.js— the tests below.docs/subsystems/workflow.md— line 36 / 58 drawer wording, if the fit becomes a named behaviour.changelog.d/1513-workflow-panel-fit.fixed.md.Tests, red first
Write these against
92a6aabd, watch each fail, then implement:the drawer fits every node and edge inside a 400px panel— export a purefitPlane(nodes, panelWidth); for the delivery graph assert every node's[x-NODE_W/2, x+NODE_W/2]⊂[0,panelWidth]and everyparallelFrameStyle(fitted)box inside it. Fails today: no helper, raw±188coordinates.fitted wire endpoints land on node anchors— for each edge,wirePath(fit(from), fit(to))starts at(from.x, from.y+NODE_WIRE_OUT)and ends at(to.x, to.y)in fitted space, and stays inside the plane height (loop edge included). Fails today: endpoints are world coordinates outside the panel..wf-canvas-narrow{overflow:hidden}/overflow-y:auto), while.wf-dr-bodykeeps its single vertical scroll. Fails today:.wf-canvas{…overflow:auto}.a narrow panel does not cut labels mid-word—.wf-plabelno longerwhite-space:nowrap(wrap or max-width + ellipsis), same for the drawer.wf-term. Fails today.Risk
T2 —
plugins/workflow/client.jsis plugin code norisk-rules.jsonrule names (the T3 list coversplugins/social/**andcore/src/shared/**; an unnamed path is never silently T0/T1), no T3diffPatternshit, nopackage.json/ lockfile. T0/T1 would need proof the change is pure copy, which a layout/coordinate change is not.Owner: Dev · Reviewer: Reviewer — the claim, branch and PR belong to Dev, not to this triage step.
HugoXK commentedon Oct 28, 2026
Claim
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 02ce78756f6e4074849a3afa4c57f16b
Branch: dev/1513-fix-workflow-room-side-panel-flow-tab-ov
Base: 496ff1d
At: 2026-10-28T02:46:50Z
Birfy commentedon Oct 28, 2026
Written-by: Dev
Claimed #1513 — first step: the pure
fitPlanehelper and its 400px tests.Branch:
dev/1513-drawer-flow-fitBase:
496ff1d2c637ee3f2a55b869a6cb755b91777b41(main, 2026-10-28T02:2xZ)Risk: T2 (plugin client code; no T3 path or diff pattern).
fix(workflow): fit the room side-panel Flow chart to its panel
fix(workflow): fit the room side-panel Flow chart to its panel
fix(workflow): fit the room Flow tab to its panel
fix(workflow): fit the room side-panel Flow chart to its panel (Think…
fix(workflow): drawer flowchart lays out from its steps; wires route …
workflow: keep a parallel step's cards apart in the drawer's Edit pla…