From b332be69245585799cd1d3b802feca0bd5df7eec Mon Sep 17 00:00:00 2001
From: vorotamoroz
Date: Mon, 19 Oct 2026 18:49:54 +0000
Subject: [PATCH] Show diagnostic name and report format choices as radio
buttons
---
docs/troubleshooting.md | 4 +-
.../dialogues/DatabaseDiagnosticDialog.svelte | 44 ++++++----
test/e2e-obsidian/README.md | 2 +-
.../scripts/database-diagnostics-couchdb.ts | 16 +++-
.../scripts/database-diagnostics.ts | 88 ++++++++++++++++---
updates.md | 2 +-
6 files changed, 122 insertions(+), 34 deletions(-)
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index afd14d67..e8649667 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -163,9 +163,9 @@ Enable Obsidian's `Detect all file extensions`, then check LiveSync selectors, i
## Collect a report
-For a database-wide inspection, use **Hatch** → **Inspect database integrity**. Choose **Pseudonyms (recommended)** or **Original names** before beginning. The inspection reads normal-file Metadata and current conflict branches locally and in CouchDB, then compares bytes within suspect groups and against the current Vault files. It reports unavailable sources, unreadable content, and detected changes during the run. Older revision history and other remote types are outside this inspection. A completed run means the stated inspection finished; it does not mean every entry is healthy or safe to delete.
+For a database-wide inspection, use **Hatch** → **Inspect database integrity**. Choose **Pseudonyms (recommended)** or **Original names** before beginning. Both choices are visible as radio buttons, with pseudonyms selected initially. The inspection reads normal-file Metadata and current conflict branches locally and in CouchDB, then compares bytes within suspect groups and against the current Vault files. It reports unavailable sources, unreadable content, and detected changes during the run. Older revision history and other remote types are outside this inspection. A completed run means the stated inspection finished; it does not mean every entry is healthy or safe to delete.
-The result dialogue provides Markdown and JSON reports with the same name policy. Pseudonyms preserve exact path equality across sources while keeping different document IDs distinct. They are temporary and are not saved as a global setting. Counts and relationships remain visible. Both modes omit file contents and credentials; review the report before sharing it. Cancelling keeps the evidence collected so far and marks the result as cancelled.
+The result dialogue provides Markdown and JSON reports with the same name policy. Available formats are displayed as radio buttons. Pseudonyms preserve exact path equality across sources while keeping different document IDs distinct. They are temporary and are not saved as a global setting. Counts and relationships remain visible. Both modes omit file contents and credentials; review the report before sharing it. Cancelling keeps the evidence collected so far and marks the result as cancelled.
For storage accounting, use **Hatch** → **Analyse database usage** → **Analyse**. It offers the same name choice and reads existing local revisions without changing on-demand Chunk fetching. Complete runs retain the existing TSV columns and first-reference unique/shared Chunk accounting. Sizes count stored string units, not physical database size. Incomplete runs provide JSON so their status and reasons remain attached to the rows. **Save report** requests a download; **Copy report** remains available on devices which do not support downloads.
diff --git a/src/modules/services/LiveSyncUI/dialogues/DatabaseDiagnosticDialog.svelte b/src/modules/services/LiveSyncUI/dialogues/DatabaseDiagnosticDialog.svelte
index 87c85856..b7b56b5f 100644
--- a/src/modules/services/LiveSyncUI/dialogues/DatabaseDiagnosticDialog.svelte
+++ b/src/modules/services/LiveSyncUI/dialogues/DatabaseDiagnosticDialog.svelte
@@ -90,13 +90,19 @@
? translate("Read available local revisions and report their Chunk references. Settings are left unchanged.")
: translate("Read normal-file Metadata, current conflicts, and content for suspect groups from this device and CouchDB. Other remote types and older revision history are outside this inspection. Results do not authorise deletion.")}