feat-AB-939 improve delete bp visibility#1273
Conversation
📝 WalkthroughWalkthroughBranches in the component tree now expose a right-click dropdown with a Delete action that emits a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Branch as BuilderSidebarComponentTreeBranch
participant Tree as BuilderSidebarComponentTree
participant Actions as useComponentActions
User->>Branch: right-click → select "Delete" (componentId)
Branch->>Branch: handleDropdownSelect -> emit delete(componentId)
Branch-->>Tree: forward delete(componentId)
Tree->>Actions: handleComponentDelete(componentId)
Actions-->>Tree: removeComponentSubtree(componentId)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/ui/src/builder/sidebar/BuilderSidebarComponentTreeBranch.vue`:
- Around line 218-221: The delete emission in handleDropdownSelect isn't guarded
so a delete action could remove protected components; update
handleDropdownSelect to first check the deletion permission (use the existing
isDeleteAllowed flag/function) and only call emits("delete", props.componentId)
when isDeleteAllowed returns true (or is truthy), otherwise ignore the action or
emit a safe fallback; ensure you reference handleDropdownSelect,
isDeleteAllowed, emits and props.componentId when adding the conditional check.
7f4c688 to
0e139d8
Compare
Previously merged PR had no functionality to actually delete the component subtree of blueprints. I added a listener in the BuilderSidebarComponentTree for a delete event in BuilderSidebarComponentTreeBranch which calls the function to delete the subtree, this mimics the pattern in BuilderCodeSidePanel to delete python files
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
✏️ Tip: You can customize this high-level summary in your review settings.