Repository navigation
fix(layout): make room only for what follows an inserted node, keep the rest of a hand-made drawing in place - #119
Merged
dominikhorn93 merged 1 commit intoOct 28, 2026
Conversation
…st of a hand-made drawing in place A splice into a hand-made drawing used to push every shape right of the insertion line, like the modeler's space tool, so rows that neither follow the new node nor stand in its way moved too (a task added to a rejection path moved the parallel join and the end of the main path above it). The incremental layout now pushes only what follows the new node beyond the line (along the drawn flows and boundary paths, with boundary events, content, associated artifacts and groups) and what that would come close to, sweep over or put on a line, in turn. SpaceTool takes the set as `push`; pools and lanes (with or without a pool) grow only as far as their content reaches. Because other rows no longer move along, a new flow that would enter a drawn node left of its source (no loop) now moves that node and what follows it right of the source, a merge whose successor lies left of a predecessor is pulled when it led forward into it, and a batch measures the gap like the same ops as single commands. Fixes for what the narrower push exposed, each measured on the edit benchmark: - the crossing repair no longer lays a hand-drawn line along other drawn lines to save a crossing - a kept association that a new node or its label touches is routed again, and an association docks on the cheapest segment of its flow - shape and flow labels take a spot that is clear for the one-line text bpmn-js draws, before falling back to the wrapped box - a trial route through a label costs more when a row is chosen On the 764 runs of the edit benchmark against main: 70 runs better, 11 worse (10 of them keep problems of the input that main resolved by moving unrelated shapes), runs adding crossings 105 -> 87, median share of moved nodes 30 % -> 26 %; layout-regression score unchanged at 370. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dominikhorn93
deleted the
dominikhorn93/cli-inbound-delivery-verschiebung
branch
October 28, 2026 10:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A splice into a hand-made drawing pushed every shape right of the insertion line, like the modeler's space tool. Rows that neither follow the new node nor stand in its way moved too: a task added after "Abweisung melden" on a rejection path moved the parallel join, "Einlagerung gemeldet" and "Ware eingelagert" on the main path above it by 150 px. Now only the end event of the rejection path moves.
The local push
PlacementObstacles.pushSetdecides what moves. That is what follows the new node beyond the line: along the drawn flows and boundary paths, with boundary events, sub-process content, associated annotations and data, and the groups around them. It also takes, in turn, what a pushed shape or the new node would come close to, sweep over (a line it would jump over) or put on a line.SpaceTooltakes this set aspush. Beyond the line only listed shapes move, and only connections touching a changed shape bend.SpaceTool.capGrowth: pools and lanes, with or without a pool, grow only as far as their content now reaches and keep their margin.What the narrower push needs, because other rows no longer move along
NeighbourPlacer.pushBehind). This applies toconnectand to every placement in a batch. A merge whose successor lies left of a predecessor is pulled when it led forward into it.NodePlacer.drawnEnds). The old global push had hidden a 4 px batch/single difference here.Fixes for what the narrower push exposed. Each was built and reviewed on its own and measured on the edit benchmark.
CrossingRepairno longer lays a hand-drawn line along other drawn lines to save a crossing.EdgeRouter.touchesFresh; also afterLabelRefresh). An association docks on the cheapest segment of its flow.LabelPlacertakes a spot that is clear for the one-line text bpmn-js draws before it falls back to the wrapped box.RowChooser: a trial route through a label costs 100 instead of 60 (LABEL_HIT).Two further attempts at the row-opening cost were dropped: one broke batch parity, the other made other runs worse.
Edit benchmark (764 runs, against main at b998c7d): 70 runs better, 11 worse. Runs adding crossings 105 -> 87, median share of moved nodes 30 % -> 26 %, E1 (insert a task): runs adding crossings 11 -> 2. The soft budgets hold. Of the 11 worse runs:
The docs (
docs/layout.md), the CLI guide (AgentGuide.ts) and the plugin skill describe how room is made now.Checklist
npm run typecheckpassesnpm run gatepasses (2,389 tests, layout regression 370 of 370, fuzz 0 errors / 0 warnings, iso within the budget of main)src/report/guide.tsand the matching page indocs/are updated (only if a command, option or output changed)Not run: the live-engine tests (no Camunda engine running).
Linked issue
None.
🤖 Generated with Claude Code