Commit Graph

6 Commits

Author SHA1 Message Date
Mike Kell 0a77b13032 ci(release): fixed google callback authentication 2026-10-18 10:29:06 -04:00
Mike Kell e43603be1b feat(nutrition,pantry): add Phase 3C nutritional search engine, barcode scanning, and dual-source food cache
Implements the architecture 4.8 resolution ladder: local SQLCipher cache ->
Open Food Facts (4s timeout) -> USDA FoodData Central fallback, with every
remote hit written through to the new FoodProductsTable (schema v5).

- domain: FoodProduct entity + IFoodSearchRepository contract (pure Dart)
- data: UsdaFdcClient (FDC nutrient-ID mapper 1008/1003/1004/1005/1079/1093,
  api_key sent as query parameter - FDC ignores body keys and 403s otherwise),
  OpenFoodFactsClient (userAgent with app identity, SearchTerms search,
  getProductV3 barcode lookup), shared RemoteFoodDataSource interface
- presentation: FoodSearchController (400ms debounce, request-token
  supersession), FoodSearchScreen (MobileScanner sheet on mobile, manual UPC
  dialog + notification on desktop/web, macro action sheet with serving
  multipliers, Log to Diary / Add to Pantry actions)
- integration: /food-search route with ?preset=pantry, Nutrition screen entry
  button, Pantry screen Scan Item action
- hardening: FoodSearchUnavailableException distinguishes total source outage
  from a healthy empty result; GoogleHealthConnector dotenv reads now guarded
  with isInitialized (fixes NotInitializedError crashing app_navigation_test)
- tests: +16 (fallback sequence cache->OFF->USDA for text and barcode,
  USDA request shape via MockClient); full suite 170/170, analyze clean
2026-10-17 19:37:06 -04:00
Mike Kell 298cadef32 feat(platform,auth,app): align identity to companionglp.com and harden OAuth deep-link handoff
Identity: rename the application identity to com.companionglp.glpcompanion on every platform (Android applicationId/namespace + MainActivity package, iOS/macOS bundle IDs incl. RunnerTests, Windows CompanyName/copyright, web manifest id, Supabase OAuth redirect scheme).

Deep links: register the custom scheme com.companionglp.glpcompanion:// in iOS/macOS Info.plist (CFBundleURLTypes), the Android VIEW/BROWSABLE intent-filter, and Windows per-user HKCU protocol registration. Server-side steps (Supabase uri_allow-list, Entra optional email claim) are recorded in BUILD_STATE.md.

Windows runner: single-instance mutex (Local\GLPCompanionSingleInstance) so login callbacks are delivered deterministically; SendAppLinkToInstance forwarding with foreground/taskbar-flash fallback so protocol activation can never look like a hang; protocol diagnostics appended to TEMP glpcompanion-protocol.log.

macOS: add the missing com.apple.security.network.client entitlement so the sandboxed runner can reach Supabase at all.

Auth UX: surface deferred OAuth/magic-link handshake failures as snackbars on the login screen; make isAuthenticatedProvider reactive (watches authStateProvider) with a microtask-deferred router refresh so live sign-in and sign-out redirect correctly; add a debug package:logging listener so supabase_flutter diagnostics are visible under flutter run.

Field-verified on Windows: Google, Microsoft (Entra ID), and email magic-link sign-in round trips plus sign-out redirect to /login.
2026-10-17 15:28:22 -04:00
Mike Kell 2f818ab850 feat(app,web,platform): brand all platform icons with the cg leaf monogram
- Master asset assets/icon/app_icon.jpg (2048x2048) plus idempotent
  assets/icon/generate_icons.py (Python/Pillow, Lanczos resampling) that
  regenerates every platform icon size; preview_contact_sheet.png
  documents the rendered variants.
- Web: favicon.png (32px) and icons/Icon-192/512.png gain a feathered
  circular alpha mask (removes the master's white JPEG corners); new
  Icon-maskable-192/512.png place the logo in the 80% safe circle over
  brand sage #D4E4C7; manifest.json and index.html swapped from Flutter
  placeholders to "GLP-1 Companion" naming with theme #375A53 /
  background #D4E4C7.
- Android: legacy mipmap-*/ic_launcher.png (48-192px) with transparent
  corners, plus first-ever adaptive icons: mipmap-anydpi-v26
  ic_launcher{,_round}.xml, a sage vector background, and 5-density
  foreground PNGs confining the logo to the 66/108dp safe circle.
- iOS: all 15 AppIcon.appiconset PNGs (20px-1024px) rendered opaque RGB
  with no alpha channel per App Store validation.
- macOS: app_icon_{16..1024}.png with transparent corners.
- Windows: multi-resolution app_icon.ico (16/24/32/48/64/128/256px).
- Docs: BUILD_STATE.md Post-Phase-7 icon branding entry.

Verified: PIL assertions on dimensions, color mode, alpha, and ICO
frames; adaptive-icon XML well-formedness; flutter build web
--no-tree-shake-icons and flutter build apk --debug package the new
assets.
2026-10-16 20:13:34 -04:00
Mike Kell 7b6b646d2c feat(auth): complete Phase 1 passwordless identity and encrypted DB foundation 2026-10-16 05:01:54 -04:00
Mike Kell 98e0d318f3 feat(init): baseline multiplatform architecture with clean arch shell, clinerules, and docs 2026-10-15 21:01:52 -04:00