Skip to content

fix(apollo-react): loop resource attachment fitting#636

Merged
SreedharAvvari merged 2 commits intomainfrom
fix/loop-resource-attachment-fitting
May 1, 2026
Merged

fix(apollo-react): loop resource attachment fitting#636
SreedharAvvari merged 2 commits intomainfrom
fix/loop-resource-attachment-fitting

Conversation

@SreedharAvvari
Copy link
Copy Markdown
Contributor

@SreedharAvvari SreedharAvvari commented May 1, 2026

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

  • Restrict loop sequence preview overrides to workflow output handles.
  • Let resource-handle previews remain parented to their containing loop on the clicked handle side.
  • Run container fit/push for generic parented additions, not only sequence placements.
  • Extend container fit geometry to account for leading top/left padding by shifting children into the safe area and growing the container to preserve trailing room.
  • Thread ignored node types through container fit/push so ignored decorations do not resize containers.

Validation

  • pnpm --filter @uipath/apollo-react exec vitest --run src/canvas/components/AddNodePanel/AddNodeManager.helpers.test.ts src/canvas/utils/container.test.ts
  • pnpm --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.ts
  • pnpm --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.ts
  • pnpm --filter @uipath/apollo-react exec tsc --noEmit --pretty false -p tsconfig.json
  • git diff --check

Copilot AI review requested due to automatic review settings May 1, 2026 14:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-design 🟢 Ready Preview, Logs May 01, 2026, 09:24:03 AM
apollo-docs 🟢 Ready Preview, Logs May 01, 2026, 09:22:43 AM
apollo-landing 🟢 Ready Preview, Logs May 01, 2026, 09:21:01 AM
apollo-ui-react 🟢 Ready Preview, Logs May 01, 2026, 09:22:30 AM
apollo-vertex 🟢 Ready Preview, Logs May 01, 2026, 09:22:50 AM

@github-actions github-actions Bot added the size:XL 500-999 changed lines. label May 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Dependency License Review

  • 2104 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 15 package(s) excluded (see details below)
License distribution
License Packages
MIT 1825
ISC 104
Apache-2.0 69
BSD-3-Clause 30
BSD-2-Clause 24
Copyright 2022, UiPath, all rights reserved 9
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
Unknown 3
Unlicense 3
CC0-1.0 3
LGPL-3.0-or-later 2
(MIT OR Apache-2.0) 2
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
BSD 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@uipath/apollo-angular-elements 5.86.3 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-core 4.35.0, 4.35.1 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-fonts 1.25.8 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-icons 1.33.7 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-mui5 2.31.26 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell 3.351.4 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell-react 3.149.36 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell-types 3.325.2 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/portal-shell-util 1.112.0 Copyright 2022, UiPath, all rights reserved UiPath first-party package
@uipath/apollo-lab 25.12.0 Unknown UiPath first-party package
@uipath/telemetry-client-web 5.1.0 Unknown UiPath first-party package
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json
hyperx 2.5.4 BSD BSD-2-Clause per LICENSE file, non-SPDX "BSD" in package.json

Copy link
Copy Markdown

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

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.

@github-actions github-actions Bot added size:XXL 1,000+ changed lines. and removed size:XL 500-999 changed lines. labels May 1, 2026
@SreedharAvvari SreedharAvvari marked this pull request as ready for review May 1, 2026 15:50
Copilot AI review requested due to automatic review settings May 1, 2026 15:50
@SreedharAvvari SreedharAvvari changed the title [codex] fix loop resource attachment fitting fix(apollo-react): loop resource attachment fitting May 1, 2026
Copy link
Copy Markdown

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread packages/apollo-react/src/canvas/components/LoopNode/LoopNode.helpers.ts Outdated
Comment thread packages/apollo-react/src/canvas/utils/container.ts
@SreedharAvvari SreedharAvvari force-pushed the fix/loop-resource-attachment-fitting branch 2 times, most recently from 0a15544 to 640c782 Compare May 1, 2026 16:17
@SreedharAvvari SreedharAvvari enabled auto-merge (rebase) May 1, 2026 16:17
Copilot AI review requested due to automatic review settings May 1, 2026 16:19
@SreedharAvvari SreedharAvvari force-pushed the fix/loop-resource-attachment-fitting branch from 640c782 to 05f6e47 Compare May 1, 2026 16:19
Copy link
Copy Markdown

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

@SreedharAvvari SreedharAvvari merged commit 57bc2da into main May 1, 2026
43 checks passed
@SreedharAvvari SreedharAvvari deleted the fix/loop-resource-attachment-fitting branch May 1, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:apollo-react size:XXL 1,000+ changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants