Skip to content

4195 client - Fix nested cluster root node overlap by constraining width to calculated nodeWidth#4215

Open
ivicac wants to merge 6 commits intomasterfrom
4195
Open

4195 client - Fix nested cluster root node overlap by constraining width to calculated nodeWidth#4215
ivicac wants to merge 6 commits intomasterfrom
4195

Conversation

@ivicac
Copy link
Contributor

@ivicac 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

ivicac and others added 6 commits February 16, 2026 22:49
… 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>
@ivicac ivicac changed the title 4195 4195 Fix nested cluster root node overlap by constraining width to calculated nodeWidth Feb 17, 2026
@ivicac ivicac changed the title 4195 Fix nested cluster root node overlap by constraining width to calculated nodeWidth 4195 client - Fix nested cluster root node overlap by constraining width to calculated nodeWidth Feb 17, 2026
@ivicac ivicac requested a review from Copilot February 17, 2026 08:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonarqubecloud
Copy link

@ivicac ivicac requested a review from kresimir-coko February 17, 2026 08:23
Copy link
Collaborator

@kresimir-coko kresimir-coko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evo još dva overlap-a edgeva - flow

Image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants