[backport core/1.40] fix: Prevent corruption of workflow data due to checkState during graph loading (#9531)#9579
Conversation
…ph loading (#9531) 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() } }) ``` - **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 Build Status❌ Build failed! ⏰ Completed at: 03/08/2026, 02:30:31 AM UTC 🔗 Links
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 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 |
|
Playwright: 🕵🏻 0 passed, 0 failed 📊 Browser Reports
|
Backport of #9531 to core/1.40. Critical data corruption fix.
Conflicts resolved: restructured try/catch in app.ts to wrap with ChangeTracker.isLoadingGraph. Removed appModeStore.ts (app mode not on 1.40).
Original PR: #9531
Pipeline ticket: 15e1f241-efaa-4fe5-88ca-4ccc7bfb3345