Skip to content

Comments

fix(tag-dropdown): exclude downstream blocks in loops and parallel siblings#3312

Merged
waleedlatif1 merged 8 commits intostagingfrom
fix/tag-dropdown
Feb 23, 2026
Merged

fix(tag-dropdown): exclude downstream blocks in loops and parallel siblings#3312
waleedlatif1 merged 8 commits intostagingfrom
fix/tag-dropdown

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Fixed tag dropdown (< reference picker) showing downstream blocks when editing a block inside a loop
  • Loop nodes are now filtered to only include blocks that are genuinely upstream (already in ancestorIds)
  • Parallel sibling nodes are excluded entirely — they run simultaneously, not before the current block

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Feb 23, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Feb 23, 2026 10:15pm

Request Review

@waleedlatif1 waleedlatif1 changed the title fix(tag-dropdown): exclude downstream blocks in loops and parallel siblings from reference picker fix(tag-dropdown): exclude downstream blocks in loops and parallel siblings Feb 23, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 23, 2026

Greptile Summary

Fixes tag dropdown to exclude downstream blocks in loops and parallel siblings. Previously, blocks inside loops could reference downstream blocks in the same loop, and blocks inside parallels could reference sibling blocks that run simultaneously. The fix consistently applies across both frontend tag picker and copilot tools by only adding loop/parallel container IDs rather than all child nodes. Also removes unused accessibleBlocksMap calculation from serializer and calculateAccessibleBlocksForWorkflow from block path calculator.

Confidence Score: 5/5

  • Safe to merge - focused bug fix with consistent logic across frontend and backend
  • Clean refactor that removes genuinely unused code and fixes a logical bug where downstream/parallel blocks were incorrectly accessible. Changes are consistent across both frontend and backend codepaths.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-accessible-reference-prefixes.ts Correctly removes downstream loop/parallel nodes from accessible references, only adds container IDs
apps/sim/lib/copilot/orchestrator/tool-executor/workflow-tools/queries.ts Applies same fix to copilot tool - only adds loop/parallel container IDs, not child nodes

Last reviewed commit: f31ac10

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit eafbb9f into staging Feb 23, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/tag-dropdown branch February 23, 2026 22:21
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.

1 participant