[backport cloud/1.41] fix: Prevent corruption of workflow data due to checkState during graph loading#9537
Merged
pythongosssss merged 1 commit intocloud/1.41from Mar 7, 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)
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 560 passed, 0 failed📊 Browser Reports
|
DrJKL
approved these changes
Mar 7, 2026
⚡ Performance ReportNo baseline found — showing absolute values.
Raw data{
"timestamp": "2026-03-07T21:55:12.319Z",
"gitSha": "0b24aea57c5b84f6fc134e595abf949c96237228",
"branch": "backport-9531-to-cloud-1.41",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2030.8489999999892,
"styleRecalcs": 124,
"styleRecalcDurationMs": 18.06,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 384.067,
"heapDeltaBytes": -3428244
},
{
"name": "canvas-idle",
"durationMs": 2019.960999999995,
"styleRecalcs": 125,
"styleRecalcDurationMs": 27.709000000000003,
"layouts": 1,
"layoutDurationMs": 0.20200000000000004,
"taskDurationMs": 435.026,
"heapDeltaBytes": -3328644
},
{
"name": "canvas-idle",
"durationMs": 2016.6960000000245,
"styleRecalcs": 123,
"styleRecalcDurationMs": 28.400999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 483.21100000000007,
"heapDeltaBytes": -3687788
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2033.7940000000003,
"styleRecalcs": 186,
"styleRecalcDurationMs": 50.328,
"layouts": 12,
"layoutDurationMs": 3.4329999999999994,
"taskDurationMs": 1073.094,
"heapDeltaBytes": -2335564
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1870.1509999999928,
"styleRecalcs": 172,
"styleRecalcDurationMs": 51.589000000000006,
"layouts": 13,
"layoutDurationMs": 3.6550000000000002,
"taskDurationMs": 834.3069999999999,
"heapDeltaBytes": -3841780
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2014.5720000000438,
"styleRecalcs": 179,
"styleRecalcDurationMs": 54.311,
"layouts": 12,
"layoutDurationMs": 2.9360000000000004,
"taskDurationMs": 1040.1229999999998,
"heapDeltaBytes": -3139448
},
{
"name": "dom-widget-clipping",
"durationMs": 582.162000000011,
"styleRecalcs": 42,
"styleRecalcDurationMs": 12.312,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 359.606,
"heapDeltaBytes": 7356300
},
{
"name": "dom-widget-clipping",
"durationMs": 590.5630000000031,
"styleRecalcs": 43,
"styleRecalcDurationMs": 13.606,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 370.29999999999995,
"heapDeltaBytes": 7645540
},
{
"name": "dom-widget-clipping",
"durationMs": 594.1349999999943,
"styleRecalcs": 43,
"styleRecalcDurationMs": 13.671999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 373.226,
"heapDeltaBytes": 6715460
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 607.7620000000081,
"styleRecalcs": 74,
"styleRecalcDurationMs": 15.515,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 418.076,
"heapDeltaBytes": -8939312
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 620.2289999999948,
"styleRecalcs": 75,
"styleRecalcDurationMs": 16.682,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 433.626,
"heapDeltaBytes": -8873860
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 600.4859999999894,
"styleRecalcs": 73,
"styleRecalcDurationMs": 13.114999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 405.505,
"heapDeltaBytes": -8811020
},
{
"name": "subgraph-idle",
"durationMs": 2009.2769999999973,
"styleRecalcs": 123,
"styleRecalcDurationMs": 21.415,
"layouts": 1,
"layoutDurationMs": 0.26099999999999995,
"taskDurationMs": 376.301,
"heapDeltaBytes": -3097980
},
{
"name": "subgraph-idle",
"durationMs": 1999.3759999999838,
"styleRecalcs": 121,
"styleRecalcDurationMs": 21.381999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 385.29400000000004,
"heapDeltaBytes": -4017268
},
{
"name": "subgraph-idle",
"durationMs": 2002.7580000000285,
"styleRecalcs": 121,
"styleRecalcDurationMs": 19.389,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 375.59999999999997,
"heapDeltaBytes": -3699652
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1694.9280000000044,
"styleRecalcs": 154,
"styleRecalcDurationMs": 42.957,
"layouts": 16,
"layoutDurationMs": 3.928,
"taskDurationMs": 723.966,
"heapDeltaBytes": -5968040
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1971.271999999999,
"styleRecalcs": 171,
"styleRecalcDurationMs": 52.30500000000001,
"layouts": 16,
"layoutDurationMs": 4.364,
"taskDurationMs": 966.171,
"heapDeltaBytes": -5215352
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1977.9500000000212,
"styleRecalcs": 171,
"styleRecalcDurationMs": 48.836999999999996,
"layouts": 16,
"layoutDurationMs": 4.096,
"taskDurationMs": 954.4549999999999,
"heapDeltaBytes": -5429688
}
]
} |
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
cloud/1.41Automatically created by backport workflow.
┆Issue is synchronized with this Notion page by Unito