feat(settings): expose opt-in SyncGuard in both Obsidian settings UIs

This commit is contained in:
Artem Ovchinnikov committed 2026-10-21 21:25:35 +03:00
1 parent f7c7ef364c
commit 95c7d6cb69
5 files changed
+24

No files matched your search

+14
View File
@@ -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
@@ -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: {
@@ -333,6 +333,8 @@ describe("ObsidianLiveSyncSettingTab native page lifecycle", () => {
"showOnlyIconsOnEditor",
"showStatusOnStatusbar",
"hideFileWarningNotice",
"syncGuardEnabled",
"syncGuardMinimumFiles",
"networkWarningStyle",
]);
expect(
@@ -130,6 +130,8 @@ describe("General setting specifications", () => {
"showOnlyIconsOnEditor",
"showStatusOnStatusbar",
"hideFileWarningNotice",
"syncGuardEnabled",
"syncGuardMinimumFiles",
"networkWarningStyle",
"lessInformationInLog",
"showVerboseLog",
+4
View File
@@ -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