-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(action-bar): duplicate subflows with children #2923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR fixes the action bar duplicate functionality to properly include children when duplicating loop/parallel blocks. The implementation refactors Changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ActionBar as ActionBar Component
participant WorkflowRegistry as WorkflowRegistry Store
participant WorkflowStore as WorkflowStore
participant Clipboard as Clipboard State
User->>ActionBar: Click duplicate button
ActionBar->>WorkflowRegistry: getState() to access copyBlocks & preparePasteData
ActionBar->>WorkflowRegistry: copyBlocks([blockId])
activate WorkflowRegistry
Note over WorkflowRegistry: Auto-includes nested nodes<br/>from loop/parallel blocks
WorkflowRegistry->>WorkflowStore: getState() to read blocks, loops, parallels
WorkflowRegistry->>Clipboard: Store copied data (blocks, edges, loops, parallels, subBlockValues)
deactivate WorkflowRegistry
ActionBar->>WorkflowRegistry: preparePasteData(offset)
activate WorkflowRegistry
Note over WorkflowRegistry: Regenerates IDs<br/>Updates references<br/>Handles positioning
WorkflowRegistry->>Clipboard: Read clipboard data
WorkflowRegistry->>WorkflowRegistry: regenerateBlockIds()
deactivate WorkflowRegistry
ActionBar->>ActionBar: validateTriggerPaste(blocks, existingBlocks)
alt Validation succeeds
ActionBar->>ActionBar: collaborativeBatchAddBlocks(blocks, edges, loops, parallels, subBlockValues)
ActionBar->>WorkflowStore: Add duplicated blocks with children
Note over WorkflowStore: New blocks include<br/>children & proper<br/>parentId relationships
else Validation fails (trigger conflict)
ActionBar->>User: Show error notification
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
Type of Change
Testing
Tested manually
Checklist