mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 13:59:54 +00:00
## Summary - Keep all drafts in localStorage, mirroring the logic from VSCode. - Fix a bug where newly created blank workflow tabs would incorrectly restore as defaultGraph instead of blankGraph after page refresh. Resolves https://github.com/Comfy-Org/desktop/issues/910, Resolves https://github.com/Comfy-Org/ComfyUI_frontend/issues/4057, Fixes https://github.com/Comfy-Org/ComfyUI_frontend/issues/3665 ## Changes ### What - Fix `restoreWorkflowTabsState` to parse and pass workflow data from drafts when recreating temporary workflows - Add error handling for invalid draft data with fallback to default workflow - Fix E2E test `should not serialize color adjustments in workflow` to wait for workflow persistence before assertions - Add proper validation for workflow nodes array in test assertions ### Breaking - None ### Dependencies - No new dependencies added ## Review Focus 1. **Workflow restoration**: Verify that blank workflows correctly restore as blankGraph after page refresh 2. **Error handling**: Check that invalid draft data gracefully falls back to default workflow 3. **Test coverage**: Ensure E2E test correctly waits for workflow persistence before checking node properties 4. **Edge cases**: Test with multiple tabs, switching between tabs, and rapid refresh scenarios --------- Co-authored-by: Yourz <crazilou@vip.qq.com>