Skip to content

[backport core/1.40] fix: Prevent corruption of workflow data due to checkState during graph loading (#9531)#9579

Merged
christian-byrne merged 1 commit intocore/1.40from
backport-9531-to-core-1.40
Mar 8, 2026
Merged

[backport core/1.40] fix: Prevent corruption of workflow data due to checkState during graph loading (#9531)#9579
christian-byrne merged 1 commit intocore/1.40from
backport-9531-to-core-1.40

Conversation

@christian-byrne
Copy link
Contributor

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

…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)
@christian-byrne christian-byrne requested a review from a team as a code owner March 8, 2026 02:29
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 8, 2026
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

🎨 Storybook Build Status

Build failed!

⏰ Completed at: 03/08/2026, 02:30:31 AM UTC

🔗 Links


⚠️ Please check the workflow logs for error details.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 232daeb8-35a2-4573-8361-88701f9b41e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport-9531-to-core-1.40

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

Playwright: 🕵🏻 0 passed, 0 failed

📊 Browser Reports
  • chromium: ❌ Deployment failed
  • chromium-2x: ❌ Deployment failed
  • chromium-0.5x: ❌ Deployment failed
  • mobile-chrome: ❌ Deployment failed

@christian-byrne christian-byrne merged commit 094c4c4 into core/1.40 Mar 8, 2026
15 of 21 checks passed
@christian-byrne christian-byrne deleted the backport-9531-to-core-1.40 branch March 8, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants