Fix/153 pin connections sometimes get destroyed#227
Merged
felix-schultz merged 2 commits intodevfrom Aug 23, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and improves the flow node and pin components in the UI, focusing on better type safety, more robust handling of dynamic pins, and improved user feedback. The changes enhance reliability when updating and removing pins, simplify component interfaces, and improve UI consistency.
Flow Node and Pin Management Improvements:
flow-node.tsx, ensuring a default type is used when pin data is missing.flow-node.tsxto separately handle input and output pins, preserve sorting, and update indices correctly, making the process more robust and less error-prone.Flow Pin Component Refactoring:
flow-pin.tsxto useuseReactFlowinstead ofuseInternalNode, added error feedback with toast notifications, and improved node/pin updates for better reliability and user experience. [1] [2] [3] [4] [5]onPinRemovecallback optional and ensured delete buttons only appear when this callback is provided, preventing UI errors and improving clarity. Also restyled delete buttons for better UI consistency. [1] [2]FlowPinto always use the memoized inner component and added missing keys for dynamic pins, preventing rendering issues.Component Interface and Type Updates:
PinEditinpin-edit.tsxto use an explicit props interface and memoized FC, improving readability and type safety. Also fixed the effect dependency for better reliability. [1] [2] [3]