fix(demo-free-layout): Rewrite copied condition value refs - #1139
Open
Gujiassh wants to merge 3 commits into
Open
fix(demo-free-layout): Rewrite copied condition value refs#1139Gujiassh wants to merge 3 commits into
Gujiassh wants to merge 3 commits into
Conversation
Gujiassh
requested review from
YuanHeDx,
dragooncjw,
louisyoungx,
luics,
sanmaopep and
xiamidaxia
as code owners
May 27, 2026 02:33
sanmaopep
reviewed
Jul 7, 2026
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.
Summary
Fixes #1094.
Copy/paste already rewrites copied node IDs in node IDs, edges, and older block-output references. Condition rows store selected variables as flow value refs such as
{ type: 'ref', content: ['node_id', 'field'] }, so copied condition values could still point at the original node ID.This updates the paste ID rewrite to also rewrite the first segment of
ref.contentwhen that segment belongs to a copied node. References to nodes outside the copied selection are left unchanged.Validation
node common/scripts/install-run-rush.js build --to @flowgram.ai/demo-free-layoutnode ../../common/scripts/install-run-rushx.js ts-checknode ../../common/scripts/install-run-rushx.js lintgit diff --check