fix(subflows): make edges inside subflows directly clickable#3969
fix(subflows): make edges inside subflows directly clickable#3969waleedlatif1 wants to merge 2 commits intostagingfrom
Conversation
Edges inside subflows defaulted to z-index 0, causing the subflow body area (pointer-events: auto) to intercept clicks. Derive edge z-index from the container's depth so edges sit just above their parent container but below canvas blocks and child blocks.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Also bumps the selected-edge delete control’s Reviewed by Cursor Bugbot for commit ff76743. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR fixes a bug where edges inside subflow containers (loop/parallel blocks) were not directly clickable because their z-index was
Confidence Score: 5/5Safe to merge — targeted, minimal fix with correct z-index logic and no regressions to non-subflow edges Single useMemo change with clear intent, correct depth-based z-index derivation, safe fallback to 0 when container not found, and no impact on existing edge behavior outside subflows. No P0 or P1 issues found. No files require special attention Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Edge in edgesWithSelection] --> B{connectedToElevated?}
B -->|Yes| C[elevatedZIndex = max 22 sourceZ+1 targetZ+1]
B -->|No| D{parentLoopId exists?}
D -->|Yes| E[containerNode = nodeMap.get parentLoopId]
E --> F{containerNode found?}
F -->|Yes| G[baseZIndex = containerNode.zIndex + 1]
F -->|No| H[baseZIndex = 0]
D -->|No| H
C --> I[Edge above selected blocks z22+]
G --> J[Edge clickable - above container body, below canvas z21+ and child blocks z1000]
H --> K[Edge at z=0 default]
Reviews (1): Last reviewed commit: "fix(subflows): make edges inside subflow..." | Re-trigger Greptile |
Summary
Type of Change
Testing
Tested manually
Checklist