feat: surface startup restore failures with an aggregated notice - #24
Merged
Conversation
Add restore diagnostics: a windowed collector gathers issues from the four restore stages (layout, tab, metadata, history) during startup and the chat view drains them into a single aggregated notice. Each issue is also logged to the developer console with a stage prefix. - Report layout read failures, per-tab rebuild failures, session metadata read failures, and history hydration gaps instead of failing silently; first-run vaults with no data never report. - Deduplicate repeated issues so the notice count reflects real root causes, and always close the report window from the restore path. - Add localized notice copy in all ten languages and CHANGELOG entry. Co-authored-by: QoderAI (Qwen 3.8 Max) <qoder_ai@qoder.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
collector (
src/core/diagnostics/restore-report.ts) gathers issues fromfour restore stages — tab layout read, per-tab rebuild, session metadata,
and conversation history hydration — and the chat view surfaces a single
aggregated notice (10s, localized in all 10 languages) when anything could
not be restored. Every issue is also logged to the developer console with
a
[qoderian-restore:<stage>]prefix.explanation when persisted data was corrupt or unreadable. The notice now
tells them something went wrong and where to look, while the restore flow
stays best-effort: first-run vaults with no data never trigger a notice,
and duplicate issues (the layout is read twice on startup) are deduplicated
so the issue count reflects real root causes.
Verification
npm run typechecknpm run lintnpm run test(3325 passed, including 17 new diagnostics tests)npm run buildnpm run release:checknpm run audit:prodmanually verified in a real Obsidian vault: corrupting an active tab's
session meta file produced the aggregated notice on reload, and restoring
the file made the notice disappear on the next reload.
Safety
CHANGELOG.md