4195 client - Fix nested cluster root node overlap by constraining width to calculated nodeWidth#4215
Conversation
Contributor
ivicac
commented
Feb 17, 2026
- 4195 client - Fix nested cluster root node overlap by constraining width to calculated nodeWidth
- 4195 client - Fix nested condition edge overlap in LR mode by separating overlapping frames
- 4195 client - Center task-dispatcher placeholder nodes on main axis between ghost nodes
- 4195 client - Center task-dispatcher placeholder nodes on main axis between ghost nodes
- 4195 client - Fix downstream chain nodes not shifting with dispatcher in nested conditions
… in nested conditions When separateOverlappingConditionChildren shifted a dispatcher node (e.g., loop_1) to resolve overlap with a grandparent condition, nodes following the dispatcher's bottom ghost in the same branch chain (e.g., loop_2) were not shifted because they are not internal descendants of the dispatcher. This caused misalignment between the edge and the downstream node. Now the function walks the chain from the dispatcher's bottom ghost and shifts all subsequent nodes (and their descendants) by the same delta. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…etween ghost nodes
Placeholders ("+" circles inside condition/loop/branch/each/parallel/fork-join
frames) were positioned arbitrarily by dagre, often near the bottom ghost.
This adds centerDispatcherPlaceholdersOnMainAxis to reposition each placeholder
at the midpoint of its source and target ghost nodes. Runs last in the
post-dagre pipeline so all ghost positions are finalized.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…etween ghost nodes
Placeholders ("+" circles inside condition/loop/branch/each/parallel/fork-join
frames) were positioned arbitrarily by dagre, often near the bottom ghost.
This adds centerDispatcherPlaceholdersOnMainAxis to reposition each placeholder
so its visual center aligns with the midpoint of the source and target ghost
visual centers. Accounts for size differences between ghosts (2px) and
placeholders (72px in LR, 28px in TB) to produce equal-length edges on
both sides. Runs last in the post-dagre pipeline so all ghost positions
are finalized.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dth to calculated nodeWidth Nested cluster roots (e.g., vectorStoreDocumentRetriever, queryExpander) used min-width which allowed long labels to expand beyond the layout-calculated width, causing visual overlap the layout algorithm couldn't detect. Now uses fixed width with overflow-hidden and text truncation for nested cluster roots. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ing overlapping frames When a condition nested inside another condition has a task-dispatcher child (e.g. loop_1 inside condition_2 inside condition_1), symmetric conditionCaseOffset cancellation places the child at the grandparent's cross-axis level, causing overlapping frame boundaries and merged edge paths. The new separateOverlappingConditionChildren constraint detects this and pulls the child to the midpoint between parent and grandparent conditions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses several layout issues in the workflow editor related to nested cluster nodes and task-dispatcher placeholders. The changes fix visual overlaps and improve positioning consistency across different layout modes (TB and LR).
Changes:
- Fixed nested cluster root node overlap by constraining width and adding text truncation with overflow handling
- Implemented separation logic for overlapping nested condition task-dispatcher children to prevent frame boundary collisions
- Added centering logic for task-dispatcher placeholder nodes between ghost nodes on the main axis for equal-length edges
- Extended overlap fix to shift downstream chain nodes that follow dispatchers in condition branches
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| postDagreConstraints.ts | Added separateOverlappingConditionChildren to fix nested condition overlaps and centerDispatcherPlaceholdersOnMainAxis to center placeholders between ghosts; includes helper function getGhostOrPlaceholderMainAxisSize |
| postDagreConstraints.test.ts | Comprehensive test coverage for new functions covering TB/LR modes, edge cases, descendant shifting, and chain node handling |
| layoutUtils.tsx | Integrated new constraint functions into the post-dagre pipeline; reordered mainAxis declaration for clearer scope |
| WorkflowNode.tsx | Changed nested cluster root nodes from minWidth to width with overflow handling and added text truncation for title, operationName, and workflowNodeName |
| clusterElementsUtils.test.ts | Added test file for cluster element utility functions including calculateNodeWidth, getHandlePosition, and name conversion utilities |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
kresimir-coko
requested changes
Feb 17, 2026
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.




