From 88381674ab2699fa2e4126f87ea284061d9eccc3 Mon Sep 17 00:00:00 2001 From: Jonas Date: Tue, 14 Oct 2025 11:02:27 +0200 Subject: [PATCH] fix(sync): Reset document sessions on upgrade A bug in synchronizing the document state might have resulted in a Yjs document state with missing steps being persisted into the Ydoc that we store on the server. If no client that had the missing step did an autosave afterwards, future sync session members will never recover from this situation. We implemented several improvements recently that should result in less out-of-sync situations where a step becomes missing. To start with fresh editing sessions and not carry on with possibly unrecoverable document states, let's reset all editing sessions with the next app update. See #7692 for further context. Signed-off-by: Jonas --- appinfo/info.xml | 2 +- lib/Migration/ResetSessionsBeforeYjs.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index b6078f9f0eb..19a1047d571 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -15,7 +15,7 @@ - **๐Ÿ’พ Open format:** Files are saved as [Markdown](https://en.wikipedia.org/wiki/Markdown), so you can edit them from any other text app too. - **โœŠ Strong foundation:** We use [๐Ÿˆ tiptap](https://tiptap.scrumpy.io) which is based on [๐Ÿฆ‰ ProseMirror](https://prosemirror.net) โ€“ huge thanks to them! ]]> - 7.0.0-dev.1 + 7.0.0-dev.2 agpl Julius Hรคrtl Text diff --git a/lib/Migration/ResetSessionsBeforeYjs.php b/lib/Migration/ResetSessionsBeforeYjs.php index 1c35729ad59..8c0426e621e 100644 --- a/lib/Migration/ResetSessionsBeforeYjs.php +++ b/lib/Migration/ResetSessionsBeforeYjs.php @@ -29,7 +29,7 @@ public function getName(): string { public function run(IOutput $output): void { $appVersion = $this->config->getValueString('text', 'installed_version'); - if (!$appVersion || version_compare($appVersion, '4.0.1') !== -1) { + if (!$appVersion || version_compare($appVersion, '7.0.0-dev.2') !== -1) { return; }