-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Data loss when using ComfyUI in multiple browser tabs #2251
Comments
Thank you for the detailed report. At first, I thought this issue might be related to #2238, but it appears unrelated to both that and browser tabs. Currently, only the active workflow is persisted in localStorage, allowing it to be restored on reload even if unsaved. However, other unsaved workflows are lost since this behavior applies exclusively to the active workflow. In #2238, we introduced persistence of tabs, but this is done lazily and not by actually saving the workflow content. From a user perspective, the issue can be mitigated by enabling this option: From a development perspective, potential solutions include adding an auto-save feature or extending the current persistence mechanism to all open tabs, not just the active one. Let me know your thoughts! |
I have also filed a Feature Request to improve the confirm-close dialog feature #2254 |
Reloading persisting some tabs but not others is not obvious or expected. I'm not sure what the logic is behind this either. Either unsaved work is important enough to be persisted or it isn't. Having it only happen some of the time and not even having it explained in the UI makes it very difficult to predict. The setting you suggest is not enough either. Its message says "Reload site? Changes that you made may not be saved". It doesn't describe when things are or aren't saved. So if you normally work in one tab and you hit reload, you will be used to having your work saved and you won't pay much attention to the message because it will always be wrong. Then you happen to have two tabs open, and bam - data loss. It also doesn't make sense to show the message in situations where there won't be any data loss. Why show the message when the user only has one tab open and there won't be any changes unsaved? All this does is teach users to ignore the message. This is also a regression from when there weren't tabs. Before tabs, hitting reload would never result in data loss. Now it can, but only some of the time, and the circumstances that cause it to happen are not explained by the UI. I guess I'm just confused at this whole approach, there doesn't seem to be any logic behind it. A fix to me would be consistent behaviour where all unsaved tabs are persisted and there is no warning, or none are persisted and there is a warning. There doesn't seem to be any upside to having it the way it is now. |
You make good points. This will likely be improved in the near future. I think #2258 does a bit to remedy it. |
Frontend Version
Expected Behavior
Actual Behavior
The first ComfyUI tab with the second unsaved workflow disappeared. I was left with just one empty ComfyUI tab in the second browser window.
Steps to Reproduce
See above.
Debug Logs
N/A
Browser Logs
N/A
Setting JSON
What browsers do you use to access the UI ?
Google Chrome
Other
No response
┆Issue is synchronized with this Notion page by Unito
The text was updated successfully, but these errors were encountered: