glp-companion/test/features
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
..
auth feat(medication): complete Phase 2 GLP-1 tracking, reminders, and dev bypass 2026-10-16 06:20:23 -04:00
health_sync/presentation feat(platform,settings,tests): complete Phase 3B platform health integrations and HealthGateway end-to-end 2026-10-17 12:01:59 -04:00
meal_planner feat(app,exercise,recipes,settings): complete Phase 7 navigation and domain expansion 2026-10-16 19:19:02 -04:00
medication feat(app,exercise,recipes,settings): complete Phase 7 navigation and domain expansion 2026-10-16 19:19:02 -04:00
nutrition feat(nutrition,pantry): add Phase 3C nutritional search engine, barcode scanning, and dual-source food cache 2026-10-17 19:37:06 -04:00
pantry feat(platform,tests,ci): complete Phase 6 cross-platform hardening, integration tests, and Forgejo CI/CD 2026-10-16 14:59:15 -04:00
settings feat(platform,settings,nutrition): add Google Health cloud sync for desktop 2026-10-17 18:06:36 -04:00