Skip to content
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

fix(ui): duplicate edges on reconnect #7791

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

psychedelicious
Copy link
Collaborator

Summary

Fix an issue where an edge reconnect gets handled twice, adding two edges

Related Issues / Discussions

Closes #7127

QA Instructions

Repro:

  • Create a workflow w/ 2 add integer nodes
  • Connect the output of one to the A input of the other
  • Drag the edge away from the A input to reconnect it to the B input
  • Drop it just to the right of the red circle, such that the edge is snapped to the red circle but your cursor is not over the red circle

The edge connection will be handled both by reactflow's reconnect logic and our custom "drop an edge on the body of a node and have it auto-connect" logic.

There was some logic to bail out of our custom logic that wasn't fully baked. This PR bakes it the rest of the way

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions bot added the frontend PRs that change frontend files label Mar 14, 2025
@psychedelicious psychedelicious enabled auto-merge (rebase) March 14, 2025 23:10
@psychedelicious psychedelicious force-pushed the psyche/fix/ui/duplicate-edges-on-reconnect branch from d9b5cc3 to d59879d Compare March 14, 2025 23:10
@psychedelicious psychedelicious merged commit b52f812 into main Mar 14, 2025
15 checks passed
@psychedelicious psychedelicious deleted the psyche/fix/ui/duplicate-edges-on-reconnect branch March 14, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: node connection duplicated if droped in specific location.
2 participants