Note
Claude responding on behalf of Matt.
This was generated by AI during triage.
Triage: needs a person
Category: bug, evidence-affecting Summary: At launch, a database file that is present but damaged must not be silently replaced by an empty database.
Why this cannot be handed to an agent yet: what the investigator sees and can do when the app refuses to open its database is a design decision. The app has no screen for it today, only a general "could not start" message.
Recommendation: when the file is present and fails the existing integrity check, do not migrate it. Show a dialog that says the database could not be read, leaves the file untouched, and offers to open the folder that holds the database snapshots, then quit. A missing file still starts fresh, as a first launch.
What the decision has to settle
- The dialog's wording and actions (open the snapshot folder, choose a backup to restore, quit).
- Whether the damaged file is kept in place or renamed aside before the app offers a fresh start.
- Whether this check also runs when a restore leaves the database unreadable, so #1700's "do not restart" message can change.
Labelled evidence-affecting during triage: the outcome destroys every Case, and src/main/index.ts and src/main/services/db/** are on the blocking tier.