Skip to content

fix(tag-dropdown): fix values for parallel & loop blocks#929

Merged
waleedlatif1 merged 1 commit intostagingfrom
fix/tag-drop
Aug 10, 2025
Merged

fix(tag-dropdown): fix values for parallel & loop blocks#929
waleedlatif1 merged 1 commit intostagingfrom
fix/tag-drop

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

fix values for parallel & loop blocks, was not showing index and currentItem

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)

Screenshots/Videos

Before:
Screenshot 2025-08-10 at 11 55 20 AM

After:
Screenshot 2025-08-10 at 11 54 56 AM

@vercel
Copy link

vercel bot commented Aug 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 10, 2025 6:55pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Aug 10, 2025 6:55pm

@waleedlatif1 waleedlatif1 merged commit 785b86a into staging Aug 10, 2025
3 of 4 checks passed
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.

Greptile Summary

This PR fixes a bug in the tag dropdown component where contextual variables for loop and parallel blocks (index, currentItem, items) weren't displaying correctly. The issue was caused by the system applying normalized block name prefixes to these special contextual variables, which made them appear incorrectly or not at all in the dropdown interface.

The fix involves two key changes:

  1. Removal of unnecessary normalized contextual tags: The code previously added entries like ${normalizedLoopBlockName}.results to the contextual tags array, which were causing duplication and incorrect display
  2. Special handling for single-word contextual tags: New logic checks if a tag belongs to a loop or parallel block and consists of only one word (like 'index' or 'currentItem'), treating these as standalone variables without block name prefixes

This change integrates well with the existing tag dropdown architecture, which already handles different types of tags (variables, loops, blocks) through various filtering and rendering mechanisms. The fix preserves the existing behavior for regular block output paths that do need prefixes while ensuring contextual variables appear as expected in the workflow editor interface.

Confidence score: 4/5

  • This PR is safe to merge with low risk of breaking existing functionality
  • Score reflects a targeted bug fix with clear before/after screenshots and good understanding of the contextual variable system
  • Pay close attention to the tag filtering logic in lines 802-821 to ensure the conditional handling doesn't affect other block types

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@waleedlatif1 waleedlatif1 deleted the fix/tag-drop branch August 10, 2025 18:58
waleedlatif1 added a commit that referenced this pull request Aug 11, 2025
…ecution (#928)

* standardized response format for transformError

* removed trasnformError, moved error handling to executeTool for all different error formats

* remove isInternalRoute, make it implicit in executeTool

* removed directExecution, everything on the server nothing on the client

* fix supabase

* fix(tag-dropdown): fix values for parallel & loop blocks (#929)

* fix(search-modal): add parallel and loop blocks to search modal

* reordered tool params

* update docs
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
arenadeveloper02 pushed a commit to arenadeveloper02/p2-sim that referenced this pull request Sep 19, 2025
…ecution (simstudioai#928)

* standardized response format for transformError

* removed trasnformError, moved error handling to executeTool for all different error formats

* remove isInternalRoute, make it implicit in executeTool

* removed directExecution, everything on the server nothing on the client

* fix supabase

* fix(tag-dropdown): fix values for parallel & loop blocks (simstudioai#929)

* fix(search-modal): add parallel and loop blocks to search modal

* reordered tool params

* update docs
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