Skip to content

fix(storage): add disaster recovery fallback UI when LocalDb fails to open on startup - #1382

Merged
ZhuchkaTriplesix merged 2 commits into
devfrom
issue/1375-localdb-disaster-recovery-ui
Oct 10, 2026
Merged

ZhuchkaTriplesix merged 2 commits into
devfrom
issue/1375-localdb-disaster-recovery-ui

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1375

Summary

  • In lib/main.dart, wraps early LocalDb initialization and controller loading in a try-catch block.
  • On startup failure (e.g. SQLite database locked, WAL corruption, or filesystem permission error), launches QueryaStartupRecoveryApp instead of freezing with a blank window.
  • Provides disaster recovery actions:
    • Retry opening the database.
    • Unlock database / remove stale WAL, SHM, and lock files.
    • Export / create a timestamped backup copy of querya.db.
    • Start in Safe Mode with a clean profile.
  • Adds LocalDb recovery methods (databasePath, open, removeWalAndLockFiles, backupDatabaseFile, resetDatabaseFile).
  • Adds widget and unit tests in test/features/recovery/querya_startup_recovery_app_test.dart.

@github-actions github-actions Bot added bug Something isn't working frontend Theme parser epic label: frontend stability Theme parser epic label: stability storage Theme parser epic label: storage core Core library logic and services P2 Medium priority / Parity & Refactoring labels Oct 10, 2026
- use ThemeController dark shadcn theme instead of nonexistent preset.data
- add AppDataRoot.setSafeModeRootPath instead of writing a test-only field
- remove unused imports and unused test variable
- make static Text const
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 4893eb7 into dev Oct 10, 2026
10 of 13 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1375-localdb-disaster-recovery-ui branch October 11, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core Core library logic and services frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring stability Theme parser epic label: stability storage Theme parser epic label: storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant