Commit Graph
3 Commits
Author SHA1 Message Date
Thomas Camlong 79b27815fe fix: harden backup/restore error handling and security
- Stop analysis on WASM migration failure instead of continuing silently
- Fail import when secrets exist but no encryption key is provided
- Fail import on malformed secret values instead of skipping them
- Tighten onboarding auth: missing onboarding row no longer grants access
- Wrap WAL/SHM cleanup in try/catch so post-rename failure doesn't mask success
- Show API errors immediately instead of waiting for animation to finish
- Handle non-JSON server responses during restore (e.g. restart mid-request)
- Surface fetchMigrations() failures as errors instead of empty array
- Wrap migrations route I/O in try/catch with structured error response
- Add server-side console.error logging to all backup API catch blocks
- Fix export finally block: cleanup wrapped in try/catch to avoid masking
- Fix misleading "Up to date" badge shown when migrations are pending
- Remove dead PHASE_ICONS constant
2026-06-07 01:15:07 +02:00
Thomas Camlong 76eacf8353 feat: expand migration phase into per-migration timeline steps
Show each migration as its own 100ms step in the restore progress
timeline instead of a single generic "Applying migrations" phase.
2026-06-07 01:06:45 +02:00
Thomas Camlong 0c14e715a0 feat: add SQLite backup & restore with WASM preview and onboarding integration
Full database backup/restore for SQLite instances with client-side WASM
migration preview, type-to-confirm safety dialogs, and graceful server
restart without container recycling.

- Export/import API routes with encryption key re-encryption
- Client-side backup analysis via sql.js WASM (served through API route)
- Drizzle migrations applied in-browser with animated progress timeline
- "Type I understand" confirmation for both export and import
- Onboarding flow integration for restoring during initial setup
- SQLite-only guards on sidebar, page, onboarding, and all API routes
- run.sh restart loop: only Next.js restarts, nginx/redis stay up
- Backward-compatible with older backups using encryption-key.txt
- Version injected at build time via next.config.ts
2026-06-07 00:20:13 +02:00