Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

Feature: make simulator barcode QA end-to-end testable#114

Merged
justanotheratom merged 4 commits into
mainfrom
feature/simulator-scan-e2e-debug
Mar 8, 2026
Merged

Feature: make simulator barcode QA end-to-end testable#114
justanotheratom merged 4 commits into
mainfrom
feature/simulator-scan-e2e-debug

Conversation

@justanotheratom

@justanotheratom justanotheratom commented Mar 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a debug launch mode that signs in a guest session, bypasses onboarding restore, and opens the scanner directly in simulator QA
  • expand the debug barcode injector with sample barcode presets and user-initiated clipboard paste
  • remove simulator-only camera permission friction so injected barcode testing starts immediately

How To Use

  • build and launch the app with --debug-scan-qa
  • the app lands directly in scanner mode on simulator
  • tap the top-right injector button and use a sample barcode or paste a numeric barcode

Tracking

  • Beads: IngrediCheck-iOS-286

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 for 049000028911 -> Diet Coke Soft Drink\n- verified duplicate scan reuses the existing card instead of creating a duplicate\n- verified invalid barcode 000000000000 renders 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

@justanotheratom justanotheratom marked this pull request as ready for review March 8, 2026 05:59
@justanotheratom justanotheratom merged commit fdbdcf1 into main Mar 8, 2026
@justanotheratom justanotheratom deleted the feature/simulator-scan-e2e-debug branch March 8, 2026 05:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +70 to +73
await authController.ensureDebugSession()
OnboardingPersistence.shared.markCompleted()
restoredState = (canvas: .home, sheet: .homeDefault)
shouldNavigateToHome = true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant