From b3bb82e776fb09cf640de3919d2492531b78ecb0 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 24 Sep 2026 05:30:21 +0200 Subject: [PATCH] refac: scope ydoc update save scheduling to note documents (#30395) The ydoc document update handler now schedules the debounced save only for note documents, since notes are the only ydoc documents with a save handler. --- backend/open_webui/socket/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/socket/main.py b/backend/open_webui/socket/main.py index 796c08b9cf..f157ed2f81 100644 --- a/backend/open_webui/socket/main.py +++ b/backend/open_webui/socket/main.py @@ -890,7 +890,7 @@ async def yjs_document_update(sid, data): await asyncio.sleep(0.5) await document_save_handler(document_id, data.get('data', {}), user) - if data.get('data'): + if document_id.startswith('note:') and data.get('data'): # Only drop the pending save when a new one takes its place. # Updates without a content snapshot (the resync a client sends # after rejoining a document) would otherwise cancel the pending