diff --git a/docs/settings.md b/docs/settings.md index 0885589c..12baec3d 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -200,6 +200,20 @@ Setting key: networkWarningStyle How to display network errors when the sync server is unreachable. +#### Protect the workspace during a large catch-up (opt-in) + +Setting key: syncGuardEnabled + +When enabled on this device, the workspace temporarily blocks interaction after a large batch of incoming note changes is detected during CouchDB LiveSync startup or resume. Incoming changes continue to be received and applied while the workspace is protected. The overlay can be bypassed at any time, including when synchronisation fails or the remote is unavailable. The preference is device-local; it does not affect other synchronising devices. + +The threshold avoids interruption for ordinary small transfers. However, the number of changes cannot be known before they arrive: some notes may be updated before the guard activates. The guard is a user-interface aid, not an atomic Vault snapshot or a restriction on other plug-ins and external tools. It does not apply to other remote types or to ordinary live changes after the initial catch-up. + +#### Minimum received files to protect the workspace + +Setting key: syncGuardMinimumFiles + +The number of distinct incoming note Metadata documents required to activate the guard during a catch-up (default: 20). Chunk documents and repeated revisions of the same note do not increase the count. After activation, the guard remains until the network catch-up completes successfully and all observed local application work settles. If the catch-up fails, use **Continue without waiting** to work offline. + ### 2. Logging #### Show only notifications diff --git a/src/modules/features/SettingDialogue/GeneralSettingSpecs.ts b/src/modules/features/SettingDialogue/GeneralSettingSpecs.ts index a839a2e1..e3af3906 100644 --- a/src/modules/features/SettingDialogue/GeneralSettingSpecs.ts +++ b/src/modules/features/SettingDialogue/GeneralSettingSpecs.ts @@ -35,6 +35,8 @@ export function createGeneralSettingSpecGroups({ }, { key: "showStatusOnStatusbar", control: { type: "toggle" } }, { key: "hideFileWarningNotice", control: { type: "toggle" } }, + { key: "syncGuardEnabled", control: { type: "toggle" } }, + { key: "syncGuardMinimumFiles", control: { type: "number", min: 1 } }, { key: "networkWarningStyle", control: { diff --git a/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.declarative.unit.spec.ts b/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.declarative.unit.spec.ts index d45582bb..2ee177d7 100644 --- a/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.declarative.unit.spec.ts +++ b/src/modules/features/SettingDialogue/ObsidianLiveSyncSettingTab.declarative.unit.spec.ts @@ -333,6 +333,8 @@ describe("ObsidianLiveSyncSettingTab native page lifecycle", () => { "showOnlyIconsOnEditor", "showStatusOnStatusbar", "hideFileWarningNotice", + "syncGuardEnabled", + "syncGuardMinimumFiles", "networkWarningStyle", ]); expect( diff --git a/src/modules/features/SettingDialogue/SettingSpec.unit.spec.ts b/src/modules/features/SettingDialogue/SettingSpec.unit.spec.ts index 62958bc4..0702baf0 100644 --- a/src/modules/features/SettingDialogue/SettingSpec.unit.spec.ts +++ b/src/modules/features/SettingDialogue/SettingSpec.unit.spec.ts @@ -130,6 +130,8 @@ describe("General setting specifications", () => { "showOnlyIconsOnEditor", "showStatusOnStatusbar", "hideFileWarningNotice", + "syncGuardEnabled", + "syncGuardMinimumFiles", "networkWarningStyle", "lessInformationInLog", "showVerboseLog", diff --git a/updates.md b/updates.md index ca2e3497..b0bc4486 100644 --- a/updates.md +++ b/updates.md @@ -12,6 +12,10 @@ Earlier releases remain available in the 1.0 release history, the 1.0 preview hi ## Unreleased +### Synchronisation + +- Added an optional, device-local editing guard for substantial CouchDB LiveSync catch-up transfers. When enough incoming notes are detected, it covers the workspace until the transfer and local application queues have settled. The overlay can always be bypassed, and ordinary small transfers remain uninterrupted. + ## 1.0.39 20th October, 2026