Skip to content

Conversation

simula-r
Copy link
Contributor

@simula-r simula-r commented Oct 4, 2025

Summary

Fix node deletion when switching from litegraph -> vue node mode.

Background:

There is a race condition where we have 2 watch() functions that are both tracking shouldRenderVueNodes.value:

  • For vue node lifecycle
  • For slot/link sync lifecycle

Each watch() separately sets graph.onNodeRemoved to its own cleanup handler. But without flush: 'sync', the slot sync watch runs AFTER vue nodes and overwrites the callback. So when deletion happens, graph.onNodeRemoved points to the slot handler (or undefined) instead of the vue cleanup handler, and the vue node never gets removed from the DOM.

Review Focus

We are making use of the watch() option "fush: sync" in the link and slot watch() so maybe there is side effects from firing this when dependencies change synchronously.

Screenshots (if applicable)

vue-nodes-fix-delete-node.mp4

┆Issue is synchronized with this Notion page by Unito

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Oct 4, 2025
Copy link

github-actions bot commented Oct 4, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 10/04/2025, 02:04:03 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

Copy link

github-actions bot commented Oct 4, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 10/04/2025, 02:14:46 AM UTC

📈 Summary

  • Total Tests: 484
  • Passed: 449 ✅
  • Failed: 2 ❌
  • Flaky: 3 ⚠️
  • Skipped: 30 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 440 / ❌ 2 / ⚠️ 3 / ⏭️ 30
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@christian-byrne
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants