Skip to content

fix: stop startup when an existing settings file cannot be read - #2294

Open
martin-forge wants to merge 2 commits into
callumalpass:mainfrom
martin-forge:martin-forge/fix-unreadable-settings-startup
Open

fix: stop startup when an existing settings file cannot be read#2294
martin-forge wants to merge 2 commits into
callumalpass:mainfrom
martin-forge:martin-forge/fix-unreadable-settings-startup

Conversation

@martin-forge

@martin-forge martin-forge commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Problem

When an existing settings file temporarily reads as null, TaskNotes blocks settings writes but can still start services using defaults. That can start background work with the wrong configuration.

Solution

Stop loading the plugin after the existing recovery reads fail. Leave the unreadable file untouched so it can be restored. A new install with no settings file still starts normally. Follow-up to #1591.

Testing

  • All three settings-loss regression tests pass, including new-install behavior.
  • npm run lint and npm run build:test pass.
  • Reloaded the standalone build in a disposable Obsidian vault; no captured errors.
  • The same startup guard passed a live null-settings check: no task, Calendar or timer services started and the damaged bytes stayed unchanged.
  • GitHub CI: full test suite and build passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant