Comfy-Org / Comfy-Org/ComfyUI_frontend
fix: link endpoints broken on draft workflow restore and legacy-to-Vue mode switch
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Context
From PR #10195 comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10195#issuecomment-4112080164
Related PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10395
## Problem
### Draft workflow restore
The Vue node manager initializes against a partially-configured graph during draft restore. Link endpoints appear at incorrect positions (header fallback) because slot measurements haven't completed.
### Legacy-to-Vue mode switch
Switching to Vue mode triggers `initializeNodeManager` before ResizeObserver completes DOM measurements. Link endpoints converge to correct positions only after all measurement cycles settle.
## Proposed fix
From @jaeone94's PR #10395:
1. **Draft restore**: Call `handleVueNodeLifecycleReset` after `initializeWorkflow` completes so the node manager sees the fully-configured graph
2. **Legacy-to-Vue**: Debounce `layoutStore.onChange` (800ms, 3s fallback) to wait for ResizeObserver measurement cycles to settle before resetting
These changes in #10395 touch `GraphCanvas.vue` and were too entangled with the larger identity refactor to cherry-pick cleanly into #10195.
cc @jaeone94
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10405-fix-link-endpoints-broken-on-draft-workflow-restore-and-legacy-to-Vue-mode-switch-32c6d73d36508142a8eee1bfad12c40f) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.