Comfy-Org / Comfy-Org/ComfyUI_frontend
[Bug]: Should make link_fixer non-blocking (and, also update).
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Frontend Version
Latest.
### Expected Behavior
Corrupted workflows still try to load.
### Actual Behavior
Corrupted workflows may throw an error.
### Steps to Reproduce
See https://github.com/rgthree/rgthree-comfy/issues/483 for example workflow.
### Debug Logs
```powershell
N/A
```
### Browser Logs
N/A
### Setting JSON
N/A
### What browsers do you use to access the UI ?
_No response_
### Other Information
I got a report at https://github.com/rgthree/rgthree-comfy/issues/483 about the link_fixer causing an error, which confused me as I implemented it into rgthree-comfy to never block loading. Upon investigation, I found the error was coming from ComfyUI_frontend, which had pulled the rgthree-comfy code in at [src/utils/linkFixer.ts](https://github.com/Comfy-Org/ComfyUI_frontend/blob/c1984f7ccd3445fc23f53c7adec584ac64eb28bd/src/utils/linkFixer.ts#L2)
That's all well and good, but it looks like it's executing as part of the initialization and, as for the bug, throwing an error which stops the execution. This was not intended as part of rgthree-comfy, which checks for corruption _after_ the workflow has loaded. This is because even corrupt workflows can have utility in the UI, from being nearly fully workable or just re-connecting the corrupted links, etc.
Consider updating the invocation so that it happens _after_ the workflow is loaded so if there is an error, there's still something to show.
Also, I've re-written the fixer in response to the filed bug, so that it won't throw an error for that case, and also more cleanly separate checking for corruption from fixing it. I'd urge you to consider updating when you can. Thx
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-3796-Bug-Should-make-link_fixer-non-blocking-and-also-update-1ec6d73d36508105abafd1a19834b675) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.