Auto-save not works #20926

Closed
opened 2026-02-21 20:09:49 -05:00 by yindo · 4 comments
Owner

Originally created by @kyle0418 on GitHub (Dec 10, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.1-fix.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Why doesn't the edited workflow trigger auto-save? When I close the tab, all my changes disappear. It only saves when I click “Publish.”

Has the auto-save mechanism changed?

✔️ Expected Behavior

Auto-save modifications. Or provide the latest detailed explanation of the auto-save mechanism.

Actual Behavior

Auto-save not works.

Originally created by @kyle0418 on GitHub (Dec 10, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.10.1-fix.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Why doesn't the edited workflow trigger auto-save? When I close the tab, all my changes disappear. It only saves when I click “Publish.” Has the auto-save mechanism changed? ### ✔️ Expected Behavior Auto-save modifications. Or provide the latest detailed explanation of the auto-save mechanism. ### ❌ Actual Behavior Auto-save not works.
yindo added the 🐞 bug label 2026-02-21 20:09:49 -05:00
yindo closed this issue 2026-02-21 20:09:49 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (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'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.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 10, 2025): <!-- Answer --> 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](https://github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts#L12-L135). 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. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20auto-save%20mechanism%20for%20workflow%20drafts%20in%20Dify%20v1.10.1%20is%20designed%20to%20automatically%20sync%20changes%20every%205%20seconds%20after%20edits%2C%20using%20a%20debounced%20function%20in%20the%20frontend.%20It%20collects%20the%20current%20state%20of%20your%20workflow%20%28nodes%2C%20edges%2C%20viewport%2C%20features%2C%20environment%20variables%2C%20and%20conversation%20variables%29%20and%20sends%20it%20to%20the%20backend%20endpoint%20%60/apps/%24%7BappId%7D/workflows/draft%60.%20It%20also%20tries%20to%20save%20your%20work%20when%20you%20close%20or%20hide%20the%20tab%2C%20using%20the%20browser%27s%20%60sendBeacon%60%20API.%20If%20the%20server%20responds%20with%20a%20specific%20error%2C%20the%20draft%20is%20refreshed%20from%20the%20backend.%20There%20have%20been%20no%20recent%20changes%20to%20this%20mechanism%20in%20the%20code%20or%20merged%20pull%20requests%20for%20v1.10.1%2C%20and%20the%20intended%20behavior%20is%20for%20auto-save%20to%20work%20without%20needing%20to%20click%20%22Publish%22%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts%23L12-L135%29.%0A%0AIf%20auto-save%20is%20not%20working%20and%20changes%20are%20lost%20unless%20you%20click%20%22Publish%2C%22%20this%20suggests%20a%20bug%20or%20malfunction%20in%20the%20current%20implementation.%20There%20are%20no%20documented%20configuration%20flags%20or%20environment%20variables%20that%20disable%20auto-save%20in%20self-hosted%20Docker%20setups.%20As%20a%20next%20step%2C%20check%20your%20browser%27s%20developer%20console%20for%20errors%20and%20verify%20that%20network%20requests%20to%20%60/apps/%7BappId%7D/workflows/draft%60%20are%20being%20made%20and%20not%20failing.%20This%20can%20help%20identify%20if%20the%20issue%20is%20with%20the%20frontend%2C%20backend%2C%20or%20network%20setup.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29411)
Author
Owner

@kyle0418 commented on GitHub (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'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.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

It does indeed call the draft API 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 version

@kyle0418 commented on GitHub (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'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](https://github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts#L12-L135). > > 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. > > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1288ac84-51ae-43f8-82a8-e7747241d824?feedback_type=other) > > [![Chat with Dosu](https://camo.githubusercontent.com/7c571478962a6b8a5d47cac74b6824c75e4f6731bba52377e6007f9150462923/68747470733a2f2f646f73752e6465762f646f73752d636861742d62616467652e737667)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github) [![Open in Cursor](https://camo.githubusercontent.com/bdf7dbded65ee585887f47e5fd6fa099ea0933088b4b03d02e83b4def50154d4/68747470733a2f2f646f73752e6465762f646f73752d696e2d637572736f722e737667)](https://cursor.com/link/prompt?text=The%20auto-save%20mechanism%20for%20workflow%20drafts%20in%20Dify%20v1.10.1%20is%20designed%20to%20automatically%20sync%20changes%20every%205%20seconds%20after%20edits%2C%20using%20a%20debounced%20function%20in%20the%20frontend.%20It%20collects%20the%20current%20state%20of%20your%20workflow%20%28nodes%2C%20edges%2C%20viewport%2C%20features%2C%20environment%20variables%2C%20and%20conversation%20variables%29%20and%20sends%20it%20to%20the%20backend%20endpoint%20%60/apps/%24%7BappId%7D/workflows/draft%60.%20It%20also%20tries%20to%20save%20your%20work%20when%20you%20close%20or%20hide%20the%20tab%2C%20using%20the%20browser%27s%20%60sendBeacon%60%20API.%20If%20the%20server%20responds%20with%20a%20specific%20error%2C%20the%20draft%20is%20refreshed%20from%20the%20backend.%20There%20have%20been%20no%20recent%20changes%20to%20this%20mechanism%20in%20the%20code%20or%20merged%20pull%20requests%20for%20v1.10.1%2C%20and%20the%20intended%20behavior%20is%20for%20auto-save%20to%20work%20without%20needing%20to%20click%20%22Publish%22%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts%23L12-L135%29.%0A%0AIf%20auto-save%20is%20not%20working%20and%20changes%20are%20lost%20unless%20you%20click%20%22Publish%2C%22%20this%20suggests%20a%20bug%20or%20malfunction%20in%20the%20current%20implementation.%20There%20are%20no%20documented%20configuration%20flags%20or%20environment%20variables%20that%20disable%20auto-save%20in%20self-hosted%20Docker%20setups.%20As%20a%20next%20step%2C%20check%20your%20browser%27s%20developer%20console%20for%20errors%20and%20verify%20that%20network%20requests%20to%20%60/apps/%7BappId%7D/workflows/draft%60%20are%20being%20made%20and%20not%20failing.%20This%20can%20help%20identify%20if%20the%20issue%20is%20with%20the%20frontend%2C%20backend%2C%20or%20network%20setup.) [![Join Discord](https://camo.githubusercontent.com/7d2066700925db1e370d956834f9ea0e5bc92cecbe84963fbd2a363e45091b4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/a8bd7f3fcf3f5e3bd124eee9ae50ae2ac17b40971726665ac2121d48f9aee155/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29411) It does indeed call the `draft` API 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 version`
Author
Owner

@dosubot[bot] commented on GitHub (Dec 10, 2025):

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.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 10, 2025): <!-- Answer --> 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](https://github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts#L12-L135). 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](https://github.com/langgenius/dify/issues/18675#issuecomment-2826519324). For maintainers, adding payload size checks, error handling, or a user warning before tab close could help prevent this issue. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94the%20auto-save%20on%20tab%20close%20relies%20on%20the%20browser%20firing%20the%20%60visibilitychange%60%20event%20and%20successfully%20sending%20data%20with%20%60navigator.sendBeacon%60.%20If%20the%20browser%20doesn%27t%20fire%20this%20event%2C%20or%20if%20the%20payload%20is%20too%20large%20for%20%60sendBeacon%60%2C%20the%20draft%20won%27t%20be%20saved%2C%20which%20can%20cause%20data%20loss%20if%20you%20close%20the%20tab%20before%20the%20next%20periodic%20auto-save.%20This%20is%20a%20limitation%20of%20the%20current%20implementation%20and%20browser%20behavior%2C%20not%20a%20recent%20code%20change%20or%20a%20configurable%20setting%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts%23L12-L135%29.%0A%0ATo%20avoid%20losing%20changes%3A%20wait%20for%20the%20periodic%20auto-save%20to%20trigger%20before%20closing%20the%20tab%2C%20manually%20click%20%22Publish%22%20before%20leaving%2C%20or%20keep%20workflows%20smaller%20to%20reduce%20payload%20size.%20For%20large%20workflows%2C%20%60sendBeacon%60%20may%20silently%20fail%E2%80%94monitor%20your%20browser%27s%20network%20tab%20for%20errors%20if%20you%20suspect%20this%20is%20happening%C2%A0%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/issues/18675%23issuecomment-2826519324%29.%0A%0AFor%20maintainers%2C%20adding%20payload%20size%20checks%2C%20error%20handling%2C%20or%20a%20user%20warning%20before%20tab%20close%20could%20help%20prevent%20this%20issue.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29411)
Author
Owner

@kyle0418 commented on GitHub (Dec 10, 2025):

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.

To reply, just mention @dosu.

How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

In my test, there are only two nodes: start and end, so the payload cannot be very large.

@kyle0418 commented on GitHub (Dec 10, 2025): > 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](https://github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts#L12-L135). > > 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](https://github.com/langgenius/dify/issues/18675#issuecomment-2826519324). > > 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](https://go.dosu.dev/dosubot)._ > > How did I do? [Good](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ba8183fc-9594-452b-9e62-caa16be4729d?feedback_type=other) > > [![Chat with Dosu](https://camo.githubusercontent.com/7c571478962a6b8a5d47cac74b6824c75e4f6731bba52377e6007f9150462923/68747470733a2f2f646f73752e6465762f646f73752d636861742d62616467652e737667)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github) [![Open in Cursor](https://camo.githubusercontent.com/bdf7dbded65ee585887f47e5fd6fa099ea0933088b4b03d02e83b4def50154d4/68747470733a2f2f646f73752e6465762f646f73752d696e2d637572736f722e737667)](https://cursor.com/link/prompt?text=You%27re%20right%E2%80%94the%20auto-save%20on%20tab%20close%20relies%20on%20the%20browser%20firing%20the%20%60visibilitychange%60%20event%20and%20successfully%20sending%20data%20with%20%60navigator.sendBeacon%60.%20If%20the%20browser%20doesn%27t%20fire%20this%20event%2C%20or%20if%20the%20payload%20is%20too%20large%20for%20%60sendBeacon%60%2C%20the%20draft%20won%27t%20be%20saved%2C%20which%20can%20cause%20data%20loss%20if%20you%20close%20the%20tab%20before%20the%20next%20periodic%20auto-save.%20This%20is%20a%20limitation%20of%20the%20current%20implementation%20and%20browser%20behavior%2C%20not%20a%20recent%20code%20change%20or%20a%20configurable%20setting%C2%A0%5Breference%5D%28https%3A//github.com/langgenius/dify/blob/88b20bc6d00cc668d733c69e0316af8c8f71e734/web/app/components/workflow-app/hooks/use-nodes-sync-draft.ts%23L12-L135%29.%0A%0ATo%20avoid%20losing%20changes%3A%20wait%20for%20the%20periodic%20auto-save%20to%20trigger%20before%20closing%20the%20tab%2C%20manually%20click%20%22Publish%22%20before%20leaving%2C%20or%20keep%20workflows%20smaller%20to%20reduce%20payload%20size.%20For%20large%20workflows%2C%20%60sendBeacon%60%20may%20silently%20fail%E2%80%94monitor%20your%20browser%27s%20network%20tab%20for%20errors%20if%20you%20suspect%20this%20is%20happening%C2%A0%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/issues/18675%23issuecomment-2826519324%29.%0A%0AFor%20maintainers%2C%20adding%20payload%20size%20checks%2C%20error%20handling%2C%20or%20a%20user%20warning%20before%20tab%20close%20could%20help%20prevent%20this%20issue.) [![Join Discord](https://camo.githubusercontent.com/7d2066700925db1e370d956834f9ea0e5bc92cecbe84963fbd2a363e45091b4e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot) [![Share on X](https://camo.githubusercontent.com/a8bd7f3fcf3f5e3bd124eee9ae50ae2ac17b40971726665ac2121d48f9aee155/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29411) In my test, there are only two nodes: `start` and `end`, so the `payload` cannot be very large.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20926