feat(demo): grocery scan demo with ingredient check (stethoscope) mode - #283
Merged
Conversation
Full UI for scanning a product's ingredient list on camera: - new ScanMode.ingredients (stethoscope dock icon + hint) - capture flow: shutter (stethoscope identity) → scanning stage → on-camera results overlay (never leaves the viewfinder) - IngredientsOverlay: gluten verdict pill (contains/may/free), nutrition score ring, factor breakdown bars, ingredient chips with gluten sources red-flagged, Re-scan / Back to camera - mock package-back scene to frame + MockGroceryProvider.scanIngredients - IngredientsAnalysis model (productName, brand, verdict, score, factors, ingredients, glutenSources) — the AI backend contract when wired (model: 'ingredients', ZikZakScore-style)
Contributor
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (39)
📒 Files selected for processing (86)
📝 WalkthroughWalkthroughThis PR adds a new standalone Flutter grocery scan demo. It includes app models, mock scan data, provider logic, a scan-page state machine, camera and overlay widgets, smoke tests, project documentation, and Android, iOS, macOS, and web scaffolding. ChangesGrocery scan demo app
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant GroceryScanPage
participant MockGroceryProvider
participant StoresCatalog
User->>GroceryScanPage: grant permission or start scan
GroceryScanPage->>MockGroceryProvider: scanText() / scanObject() / scanIngredients()
MockGroceryProvider-->>GroceryScanPage: detection or analysis result
alt item needs price comparison
GroceryScanPage->>MockGroceryProvider: comparePrices(item)
MockGroceryProvider->>StoresCatalog: offersForItem(itemId)
StoresCatalog-->>MockGroceryProvider: ranked offers
MockGroceryProvider-->>GroceryScanPage: offers
GroceryScanPage-->>User: show comparison or variant chooser
else ingredient mode
GroceryScanPage-->>User: show ingredients overlay
end
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Resolve AGENTS.md herdr rule conflict: adopt base's canonical 'zfa build' wording (v5 contract) over the branch's 'dart run build_runner build'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the standalone grocery_scan_demo app (apps/grocery_scan_demo) with the full camera UI suite — barcode/text/produce/meat price-compare flows plus the NEW ingredient check (stethoscope) mode:
Verified end-to-end on the Android emulator (dock, capture, overlay, dismiss, re-scan). The zik_zak wiring (upload to MinIO fire-and-forget + base64 AI call + branded overlay) is in progress separately.
Summary by CodeRabbit
New Features
Documentation
Tests