forked from eva/focus-flow
2.2 KiB
2.2 KiB
Persistence Plan 1 - SQLite Runtime Persistence
Status: Complete on 2026-07-02.
Start with PERSISTENCE_PLAN_1_SUMMARY.md, then execute the block files in
PERSISTENCE_PLAN_1_EXECUTION_ORDER.md order.
This plan replaces the current seeded/in-memory Flutter runtime with a real SQLite-backed runtime slice. The target user-visible proof is narrow:
- Start the desktop app.
- Add/capture a task.
- Optionally schedule it into Today.
- Mark it done or not done.
- Close the app.
- Reopen the app against the same SQLite file.
- See the task, placement, and completion state exactly as persisted.
The plan does not redesign the UI, add sync, add week/month views, add Shield/Recovery surfaces, or move scheduling rules into Flutter widgets.
Completion Handoff
Changed:
- Added Drift schema version 2 app-layer tables for application operations, task activities, project statistics, and notice acknowledgements.
- Added
SqliteApplicationUnitOfWorkandSqliteApplicationRuntimeinpackages/scheduler_persistence_sqlite. - Switched normal Flutter startup to
PersistentSchedulerComposition. - Kept
DemoSchedulerCompositionfor deterministic widget and visual tests. - Updated boundary tests so only the persistent composition root can import the
SQLite adapter and
dart:io.
Now persists:
- tasks captured through current command flows,
- planned schedule placement,
- completed and reopened/not-done state,
- owner settings and default Home project bootstrap,
- operation, activity, and project statistics records needed by current commands.
Validation recorded during implementation:
cd packages/scheduler_persistence_sqlite && dart analyze: passed.cd packages/scheduler_persistence_sqlite && dart test: passed.cd apps/focus_flow_flutter && flutter pub get: passed.cd apps/focus_flow_flutter && flutter analyze: passed.cd apps/focus_flow_flutter && flutter test: passed.
Not in scope:
- full task editor,
- visible Backlog navigation in the compact shell,
- backup/restore UI,
- export/import UI,
- sync/calendar/notifications,
- week/month views,
- Shield/Recovery UX.