Feature: make simulator barcode QA end-to-end testable#114
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b71d9ed5d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await authController.ensureDebugSession() | ||
| OnboardingPersistence.shared.markCompleted() | ||
| restoredState = (canvas: .home, sheet: .homeDefault) | ||
| shouldNavigateToHome = true |
There was a problem hiding this comment.
Gate debug-home navigation on successful session creation
This branch always routes to home after await authController.ensureDebugSession(), but ensureDebugSession delegates to signInWithNewAnonymousAccount() which swallows auth errors and returns without guaranteeing session is set. In transient auth/network failures, debug-scan QA still enters Home unauthenticated, and scanner/network flows that require a Supabase access token fail immediately, so the launch mode becomes flaky exactly when backend auth is unstable.
Useful? React with 👍 / 👎.
Summary
How To Use
--debug-scan-qaTracking
Test Evidence
xcodebuild build -project IngrediCheck.xcodeproj -scheme IngrediCheck -destination 'id=45B28D24-EE51-4BE9-9F78-62572B67784B' -derivedDataPath /tmp/IngrediCheckDerivedData\n-xcodebuild build -project IngrediCheck.xcodeproj -scheme IngrediCheck -destination 'id=8FA6A311-D245-4201-ABEA-50DF9C78140D' -derivedDataPath /tmp/IngrediCheckDerivedData\n- simulator manual QA on iPhone 16 Pro and iPhone 16 with--debug-scan-qa\n- verified happy path for049000028911->Diet Coke Soft Drink\n- verified duplicate scan reuses the existing card instead of creating a duplicate\n- verified invalid barcode000000000000renders the error path\n- verified scanner opens on simulator without camera permission prompt\n- verified injector opens without passive paste permission prompt and only reads clipboard on explicit tap\n