You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The auto-save mechanism for workflow drafts in Dify v1.10.1 is designed to automatically sync changes every 5 seconds after edits, using a debounced function in the frontend. It collects the current state of your workflow (nodes, edges, viewport, features, environment variables, and conversation variables) and sends it to the backend endpoint /apps/${appId}/workflows/draft. It also tries to save your work when you close or hide the tab, using the browser's sendBeacon API. If the server responds with a specific error, the draft is refreshed from the backend. There have been no recent changes to this mechanism in the code or merged pull requests for v1.10.1, and the intended behavior is for auto-save to work without needing to click "Publish" reference.
If auto-save is not working and changes are lost unless you click "Publish," this suggests a bug or malfunction in the current implementation. There are no documented configuration flags or environment variables that disable auto-save in self-hosted Docker setups. As a next step, check your browser's developer console for errors and verify that network requests to /apps/{appId}/workflows/draft are being made and not failing. This can help identify if the issue is with the frontend, backend, or network setup.
The auto-save mechanism for workflow drafts in Dify v1.10.1 is designed to automatically sync changes every 5 seconds after edits, using a debounced function in the frontend. It collects the current state of your workflow (nodes, edges, viewport, features, environment variables, and conversation variables) and sends it to the backend endpoint /apps/${appId}/workflows/draft. It also tries to save your work when you close or hide the tab, using the browser's sendBeacon API. If the server responds with a specific error, the draft is refreshed from the backend. There have been no recent changes to this mechanism in the code or merged pull requests for v1.10.1, and the intended behavior is for auto-save to work without needing to click "Publish" reference.
If auto-save is not working and changes are lost unless you click "Publish," this suggests a bug or malfunction in the current implementation. There are no documented configuration flags or environment variables that disable auto-save in self-hosted Docker setups. As a next step, check your browser's developer console for errors and verify that network requests to /apps/{appId}/workflows/draft are being made and not failing. This can help identify if the issue is with the frontend, backend, or network setup.
You're right—the auto-save on tab close relies on the browser firing the visibilitychange event and successfully sending data with navigator.sendBeacon. If the browser doesn't fire this event, or if the payload is too large for sendBeacon, the draft won't be saved, which can cause data loss if you close the tab before the next periodic auto-save. This is a limitation of the current implementation and browser behavior, not a recent code change or a configurable setting reference.
To avoid losing changes: wait for the periodic auto-save to trigger before closing the tab, manually click "Publish" before leaving, or keep workflows smaller to reduce payload size. For large workflows, sendBeacon may silently fail—monitor your browser's network tab for errors if you suspect this is happening discussion.
For maintainers, adding payload size checks, error handling, or a user warning before tab close could help prevent this issue.
You're right—the auto-save on tab close relies on the browser firing the visibilitychange event and successfully sending data with navigator.sendBeacon. If the browser doesn't fire this event, or if the payload is too large for sendBeacon, the draft won't be saved, which can cause data loss if you close the tab before the next periodic auto-save. This is a limitation of the current implementation and browser behavior, not a recent code change or a configurable setting reference.
To avoid losing changes: wait for the periodic auto-save to trigger before closing the tab, manually click "Publish" before leaving, or keep workflows smaller to reduce payload size. For large workflows, sendBeacon may silently fail—monitor your browser's network tab for errors if you suspect this is happening discussion.
For maintainers, adding payload size checks, error handling, or a user warning before tab close could help prevent this issue.
Activity
dosubot commentedon Dec 10, 2025
The auto-save mechanism for workflow drafts in Dify v1.10.1 is designed to automatically sync changes every 5 seconds after edits, using a debounced function in the frontend. It collects the current state of your workflow (nodes, edges, viewport, features, environment variables, and conversation variables) and sends it to the backend endpoint
/apps/${appId}/workflows/draft. It also tries to save your work when you close or hide the tab, using the browser'ssendBeaconAPI. If the server responds with a specific error, the draft is refreshed from the backend. There have been no recent changes to this mechanism in the code or merged pull requests for v1.10.1, and the intended behavior is for auto-save to work without needing to click "Publish" reference.If auto-save is not working and changes are lost unless you click "Publish," this suggests a bug or malfunction in the current implementation. There are no documented configuration flags or environment variables that disable auto-save in self-hosted Docker setups. As a next step, check your browser's developer console for errors and verify that network requests to
/apps/{appId}/workflows/draftare being made and not failing. This can help identify if the issue is with the frontend, backend, or network setup.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
kyle0418 commentedon Dec 10, 2025
It does indeed call the
draftAPI every 5 seconds. But when I close the tab, it doesn't call it. This seems to be the cause of the problem.BTW, it works on my
1.9.1 versiondosubot commentedon Dec 10, 2025
You're right—the auto-save on tab close relies on the browser firing the
visibilitychangeevent and successfully sending data withnavigator.sendBeacon. If the browser doesn't fire this event, or if the payload is too large forsendBeacon, the draft won't be saved, which can cause data loss if you close the tab before the next periodic auto-save. This is a limitation of the current implementation and browser behavior, not a recent code change or a configurable setting reference.To avoid losing changes: wait for the periodic auto-save to trigger before closing the tab, manually click "Publish" before leaving, or keep workflows smaller to reduce payload size. For large workflows,
sendBeaconmay silently fail—monitor your browser's network tab for errors if you suspect this is happening discussion.For maintainers, adding payload size checks, error handling, or a user warning before tab close could help prevent this issue.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
kyle0418 commentedon Dec 10, 2025
In my test, there are only two nodes:
startandend, so thepayloadcannot be very large.