[backport core/1.41] fix: Prevent corruption of workflow data due to checkState during graph loading (#9531)#9561
Merged
christian-byrne merged 1 commit intocore/1.41from Mar 8, 2026
Conversation
…ph loading (#9531) ## Summary During workflow loading, the workflow data & active workflow object can be out of sync, meaning any checkState calls will overwrite data into the wrong workflow. Recreation steps: * Open 2-3 workflows * Enter builder mode > select step * Select some different inputs on each * Quickly tap the shift key (this triggers checkState) while switching tabs * After a while, you'll see the wrong inputs on the workflows Alternatively, register an extension that guarantees to call checkState during the bad phase, run this in browser devtools and switch tabs: ``` window.app.registerExtension({ name: 'bad', async afterConfigureGraph() { window.app.extensionManager.workflow.activeWorkflow.changeTracker.checkState() } }) ``` ## Changes - **What**: - Add loading graph flag - Prevent checkState calls while loading - Prevent app mode data sync while loading ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9531-fix-Prevent-corruption-of-workflow-data-due-to-checkState-during-graph-loading-31c6d73d365081e2ab91d9145bf1d025) by [Unito](https://www.unito.io)
🎭 Playwright: ✅ 556 passed, 0 failed · 2 flaky📊 Browser Reports
|
Contributor
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🎨 Storybook: ✅ Built — View Storybook |
⚡ Performance ReportNo baseline found — showing absolute values.
Raw data{
"timestamp": "2026-03-08T02:16:12.700Z",
"gitSha": "eb86534fe1a483c77fb3c6553486c688ef6f1b16",
"branch": "backport-9531-to-core-1.41",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2024.180000000058,
"styleRecalcs": 123,
"styleRecalcDurationMs": 19.387,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.076,
"heapDeltaBytes": -3973580
},
{
"name": "canvas-idle",
"durationMs": 2023.1850000000122,
"styleRecalcs": 122,
"styleRecalcDurationMs": 18.478,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 394.9440000000001,
"heapDeltaBytes": -3976804
},
{
"name": "canvas-idle",
"durationMs": 2025.865000000067,
"styleRecalcs": 123,
"styleRecalcDurationMs": 22.536,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.784,
"heapDeltaBytes": -3721308
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1910.050999999953,
"styleRecalcs": 176,
"styleRecalcDurationMs": 49.221000000000004,
"layouts": 12,
"layoutDurationMs": 3.56,
"taskDurationMs": 863.8430000000002,
"heapDeltaBytes": -4051572
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2015.6379999999672,
"styleRecalcs": 178,
"styleRecalcDurationMs": 47.119,
"layouts": 12,
"layoutDurationMs": 3.0660000000000003,
"taskDurationMs": 974.4150000000001,
"heapDeltaBytes": -3752384
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2036.2119999999777,
"styleRecalcs": 183,
"styleRecalcDurationMs": 53.399,
"layouts": 13,
"layoutDurationMs": 3.281,
"taskDurationMs": 1010.9189999999999,
"heapDeltaBytes": -2762528
},
{
"name": "dom-widget-clipping",
"durationMs": 598.6660000000938,
"styleRecalcs": 44,
"styleRecalcDurationMs": 12.865000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 382.78000000000003,
"heapDeltaBytes": 7505132
},
{
"name": "dom-widget-clipping",
"durationMs": 527.3260000000164,
"styleRecalcs": 39,
"styleRecalcDurationMs": 12.446,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 338.727,
"heapDeltaBytes": 7045188
},
{
"name": "dom-widget-clipping",
"durationMs": 585.456000000022,
"styleRecalcs": 42,
"styleRecalcDurationMs": 11.857,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 349.74000000000007,
"heapDeltaBytes": 7894944
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 594.6780000000444,
"styleRecalcs": 75,
"styleRecalcDurationMs": 17.698999999999998,
"layouts": 1,
"layoutDurationMs": 0.27200000000000013,
"taskDurationMs": 417.203,
"heapDeltaBytes": -7912568
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 581.3950000000432,
"styleRecalcs": 72,
"styleRecalcDurationMs": 14.184,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.6500000000001,
"heapDeltaBytes": -8850292
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 587.8989999999931,
"styleRecalcs": 72,
"styleRecalcDurationMs": 15.28,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.225,
"heapDeltaBytes": -8885636
},
{
"name": "subgraph-idle",
"durationMs": 1991.233999999963,
"styleRecalcs": 120,
"styleRecalcDurationMs": 20.269000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 383.27500000000003,
"heapDeltaBytes": -3676340
},
{
"name": "subgraph-idle",
"durationMs": 2011.0280000000103,
"styleRecalcs": 123,
"styleRecalcDurationMs": 23.278,
"layouts": 1,
"layoutDurationMs": 0.2790000000000001,
"taskDurationMs": 386.121,
"heapDeltaBytes": -3085576
},
{
"name": "subgraph-idle",
"durationMs": 2009.7099999999273,
"styleRecalcs": 123,
"styleRecalcDurationMs": 21.845999999999997,
"layouts": 1,
"layoutDurationMs": 0.24399999999999997,
"taskDurationMs": 383.749,
"heapDeltaBytes": -3005088
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1977.1449999999504,
"styleRecalcs": 171,
"styleRecalcDurationMs": 50.394,
"layouts": 16,
"layoutDurationMs": 3.8389999999999995,
"taskDurationMs": 949.7249999999999,
"heapDeltaBytes": -5116656
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1679.3349999999236,
"styleRecalcs": 154,
"styleRecalcDurationMs": 42.49,
"layouts": 16,
"layoutDurationMs": 4.116999999999999,
"taskDurationMs": 695.743,
"heapDeltaBytes": -6278828
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1963.602999999921,
"styleRecalcs": 170,
"styleRecalcDurationMs": 49.77,
"layouts": 16,
"layoutDurationMs": 4.3500000000000005,
"taskDurationMs": 946.0509999999999,
"heapDeltaBytes": -5150148
}
]
} |
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.
Backport of #9531 to core/1.41.
Cherry-pick of merge commit ec129de applied cleanly.
Original PR: #9531
Pipeline ticket: 15e1f241-efaa-4fe5-88ca-4ccc7bfb3345
┆Issue is synchronized with this Notion page by Unito