5.5 KiB
5.5 KiB
V1 Block 29 — Flutter UI Foundation
Purpose: Restart the V1 Flutter UI foundation after the SQLite-first backend refresh, without moving scheduling or persistence rules into widgets.
Note for Codex: Keep the scheduler core Flutter-free. UI code may depend on public package APIs and read models only.
Chunk 29.1 — Flutter app shell and in-memory composition
Recommended level: HIGH
Status: Complete on 2026-06-26.
Tasks
- Add
apps/focus_flow_flutteras a Flutter application outside the root Dart workspace for now. - Wire a minimal in-memory composition root using public scheduler packages.
- Render provisional Today and Backlog shells from application/read-model data.
- Add app startup, theme/token placeholders, and a widget test harness.
- Document UI-specific analyze/test commands without changing
scripts/test.shuntil Flutter CI gating is intentionally added.
Acceptance criteria
cd apps/focus_flow_flutter && flutter analyzepasses.cd apps/focus_flow_flutter && flutter testpasses.- Core packages remain Flutter-free and
scripts/test.shstill passes. - UI code does not import Drift, SQLite, platform notification APIs, or core
lib/src/paths directly. - Today and Backlog screens render from read-model objects, not duplicated scheduling rules.
BREAKPOINT: Stop here. Confirm high before adding navigation/controllers and
component contracts.
Completed implementation
- Added
apps/focus_flow_flutteras a Flutter desktop app outside the root Dart workspace. - Added a local path dependency on
packages/scheduler_core. - Replaced the starter counter template with
FocusFlowApp, a seededDemoSchedulerComposition, and Today/Backlog tabs rendered fromTodayStateandBacklogQueryResult. - Added a widget test that verifies Today and Backlog read-model data renders through the Flutter shell.
- Documented app-local Flutter analyze/test commands in the README.
Verification
flutter pub getinapps/focus_flow_flutter: passed.dart format apps/focus_flow_flutter/lib/main.dart apps/focus_flow_flutter/test/widget_test.dart: passed.cd apps/focus_flow_flutter && flutter analyze: passed, no issues found.cd apps/focus_flow_flutter && flutter test: passed, 1 widget test.
Chunk 29.2 — UI controllers and component contracts
Recommended level: HIGH
Status: Complete on 2026-06-26.
Tasks
- Split seeded composition, read controllers, and widgets into focused files
under
apps/focus_flow_flutter/lib/. - Add controller states for loading, empty, typed failure, and retry paths for Today and Backlog.
- Add provisional component contracts for timeline rows, compact panels, backlog rows, notice banners, and staleness markers.
- Centralize token-to-visual mapping for project color, task type background, reward icon, and difficulty icon.
- Add widget tests for compact rendering, backlog empty state, and typed failure state.
Acceptance criteria
cd apps/focus_flow_flutter && flutter analyzepasses.cd apps/focus_flow_flutter && flutter testpasses.scripts/test.shstill passes.- Widgets import app controllers/read models, not persistence adapters or scheduler internals.
- Component contracts satisfy the remaining MVP-AC-05 token-mapping gap without locking final visual design.
BREAKPOINT: Stop here. Confirm high before adding command flows and a vertical
quick-capture smoke slice.
Completed implementation
- Split
lib/main.dartinto app shell, seeded composition, read controllers, visual-token mapping, and focused widgets underapps/focus_flow_flutter/lib/. - Added
UiReadController<T>andApplicationReadController<T>with loading, data, empty, typed-failure, and retry states. - Added provisional component contracts for compact panels, timeline rows, backlog rows, notice banners, staleness markers, empty state, and failure state.
- Centralized project color, task-type background, reward icon, difficulty
icon, and staleness-marker visual mapping in
SchedulerVisualTokens. - Added widget tests for seeded Today/Backlog rendering, compact rendering, Backlog empty state, and typed failure retry.
Verification
dart format lib testinapps/focus_flow_flutter: passed.cd apps/focus_flow_flutter && flutter analyze: passed, no issues found.cd apps/focus_flow_flutter && flutter test: passed, 4 widget tests.- Forbidden-import scan for app
lib/andtest/: no persistence adapters, schedulersrc/imports, Drift, or SQLite imports found.
Chunk 29.3 — Command flows and vertical quick-capture slice
Recommended level: HIGH
Status: Open.
Tasks
- Add UI controllers for quick capture, schedule-from-backlog, and mark-done commands using public application command use cases.
- Add forms/actions for title-only quick capture, duration entry, and done.
- Refresh Today and Backlog controllers after successful commands.
- Add typed conflict/failure states for command attempts.
- Add a widget/integration smoke test for quick capture → Backlog → schedule → Today → done using in-memory composition.
Acceptance criteria
cd apps/focus_flow_flutter && flutter analyzepasses.cd apps/focus_flow_flutter && flutter testpasses.scripts/test.shstill passes.- Widgets continue to call public app controllers/use cases only.
- No scheduling rules are implemented in Flutter widgets.
BREAKPOINT: Stop here. Confirm high before adding persistent SQLite-backed UI
composition or broader screen expansion.