diff --git a/.clinerules b/.clinerules index e3ccaea..ea9179c 100644 --- a/.clinerules +++ b/.clinerules @@ -52,4 +52,6 @@ Each feature MUST contain: - Check code quality: flutter analyze - Run test suites: - flutter test \ No newline at end of file + flutter test + +Before starting any task, read BUILD_STATE.md to determine the current milestone. Upon satisfying all implementation steps and verification commands, update the checkboxes in BUILD_STATE.md before prompting the user. \ No newline at end of file diff --git a/BUILD_STATE.md b/BUILD_STATE.md new file mode 100644 index 0000000..d4144e3 --- /dev/null +++ b/BUILD_STATE.md @@ -0,0 +1,30 @@ +# Build Execution Ledger + +## Active Target +- **Current Milestone:** Phase 3: Nutrition, Protein Target Tracking & HealthGateway Sync +- **Status:** Phase 2 Complete + +## Phase Checklist +- [x] Phase 1: Foundation & Identity (Passwordless SSO & Encrypted Drift DB) +- [x] Phase 2: Medication Domain, Injection Rotation, Serum Modeling +- [ ] Phase 3: Nutrition, Protein Target Tracking, HealthGateway Sync +- [ ] Phase 4: Recipe Web Scraper Engine & Meal Planning Calendar +- [ ] Phase 5: Pantry Delta Engine & Auto-Shopping Generator +- [ ] Phase 6: Hardening, Native Desktop/Web Polish, CI/CD + +## Phase 2 Deliverables (2026-10-16) +- [x] Domain: `DoseEntry` entity, 12-quadrant `InjectionSite` rotation model, `Glp1Compound` value object (Sema 168h / Tirze 120h / Lira 13h), `IMedicationRepository` contract. +- [x] Domain: `CalculateSerumLevel` use case implementing `C(t) = Σ D_i · 0.5^((t − t_i)/t_half)`. +- [x] Data: injection-history CRUD on `AppDatabase` + drift-backed `MedicationRepository` (record ↔ entity mapping). +- [x] Presentation: `MedicationController` (Riverpod StateNotifier) with serum estimation, least-recently-used site rotation, and reminder scheduling; refactored `MedicationScreen` (serum card, rotation suggestion, interactive log dialog, history with delete). +- [x] Platform: `INotificationService` / `PlatformNotificationService` (flutter_local_notifications 17.x; Android/iOS/macOS scheduled reminders, graceful no-op on Web/Windows/Linux); Android boot-receiver manifest entries; `timezone` dependency added. +- [x] Regression fix: `SupabaseAuthService` now resolves its client lazily (baseline widget test no longer throws when Supabase is uninitialized). +- [x] Tests: 33 new unit/widget-fake tests (PK calculator, rotation policy, repository w/ in-memory drift, controller); baseline smoke test green. + +## Post-Phase-2 Additions +- [x] Development auth bypass (2026-10-16): debug-only "Continue Without Signing In" button on the login screen (`kDebugMode`-gated, in-memory `devAuthBypassProvider`) lets reviewers enter the app without a Supabase session; the router guard honors the flag and the shell shows an orange "Development mode - not signed in" banner while active. Covered by `test/features/auth/dev_auth_bypass_test.dart` (3 tests). + +## Active Verification Gates +- [x] `flutter pub run build_runner build --delete-conflicting-outputs` +- [x] `flutter analyze` (Zero issues) +- [x] `flutter test` (37/37 passing) \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d14d7df..edd5269 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,8 @@ + + + + + + + + + + + +