fix(apollo-react): loop resource attachment fitting#636
Merged
SreedharAvvari merged 2 commits intomainfrom May 1, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency License Review
License distribution
Excluded packages
|
There was a problem hiding this comment.
Pull request overview
Fixes Add Node preview + materialization behavior for resource/attachment handles inside loop/container nodes, and improves container fitting so parented attachments above/left of the safe area correctly create space (including respecting ignored node types).
Changes:
- Restricts loop/container “sequence insertion” preview overrides to workflow output handles; non-output/resource handles stay on the generic attachment preview path.
- Fits/pushes container geometry for generic parented insertions (not just sequence placements), including leading (top/left) safe-area padding by shifting children and growing the container.
- Adds/extends Vitest coverage around preview parenting, container fit shifting, ignored node types, and non-sequence Add Node placement inside containers.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/apollo-react/src/canvas/utils/createPreviewGraph.test.ts | Adds regression test ensuring attachment previews inside containers remain parented to the container and appear on the clicked handle side. |
| packages/apollo-react/src/canvas/utils/container.ts | Extends fit geometry with leading padding, shifts children into safe area during fit, exports and threads ignored node types through fit/push pipeline. |
| packages/apollo-react/src/canvas/utils/container.test.ts | Adds tests for leading-padding shifting/growth, ignored children, and ancestor fitting behavior. |
| packages/apollo-react/src/canvas/components/LoopNode/LoopNode.helpers.ts | Detects clicked handle “handleType” and prevents container sequence preview overrides for non-output handles. |
| packages/apollo-react/src/canvas/components/LoopNode/LoopNode.helpers.test.ts | New tests covering artifact vs output handle behavior for container add-node preview overrides. |
| packages/apollo-react/src/canvas/components/AddNodePanel/AddNodeManager.helpers.ts | Runs container fit/push for generic parented insertions after collision resolution; threads ignored node types. |
| packages/apollo-react/src/canvas/components/AddNodePanel/AddNodeManager.helpers.test.ts | Adds coverage for generic parented insertion (including above-safe-area) and ignored node type behavior. |
CalinaCristian
approved these changes
May 1, 2026
0a15544 to
640c782
Compare
640c782 to
05f6e47
Compare
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
Fixes add-node behavior for agent resource handles inside loop/container nodes. Resource handles such as Memory, Tools, Context, and Escalations now stay on the generic attachment path instead of being interpreted as loop sequence insertions to the container continuation handle.
The root cause was that container preview overrides treated any source handle inside a loop as a sequence intent. That created a preview connected to Continue and also filtered the toolbox as if the next node had to satisfy the workflow continuation edge. Once the preview was corrected, materializing top/bottom attachments exposed a second geometry gap: container fitting only handled trailing bottom/right overflow, so attachments above the safe area did not create vertical space.
Demo
Before -
image.2026-05-01.at.9.42.15.PM.mov
After -
image.2026-05-01.at.9.41.20.PM.mov
Changes
Validation
pnpm --filter @uipath/apollo-react exec vitest --run src/canvas/components/AddNodePanel/AddNodeManager.helpers.test.ts src/canvas/utils/container.test.tspnpm --filter @uipath/apollo-react exec vitest --run src/canvas/components/AddNodePanel/AddNodeManager.test.tsx src/canvas/components/Toolbar/EdgeToolbar/useEdgeToolbarState.test.ts src/canvas/components/LoopNode/LoopNode.helpers.test.ts src/canvas/utils/createPreviewGraph.test.tspnpm --filter @uipath/apollo-react exec biome check src/canvas/components/AddNodePanel/AddNodeManager.helpers.ts src/canvas/components/AddNodePanel/AddNodeManager.helpers.test.ts src/canvas/utils/container.ts src/canvas/utils/container.test.tspnpm --filter @uipath/apollo-react exec tsc --noEmit --pretty false -p tsconfig.jsongit diff --check