Skip to content

fix: use default camera autofocus for QR scanning - #459

Draft
hermes-alby wants to merge 2 commits into
getAlby:masterfrom
hermes-alby:fix/ios-qr-camera-focus
Draft

hermes-alby wants to merge 2 commits into
getAlby:masterfrom
hermes-alby:fix/ios-qr-camera-focus

Conversation

@hermes-alby

@hermes-alby hermes-alby commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Remove the autofocus prop entirely from the shared QR scanner, using Expo's defaults on every platform as requested in review. The production diff is a one-line deletion; no platform conditional, lens/zoom override, new dependency, or UI change.

Keep this draft pending iPhone 15 Pro and Android device tests. This removes a one-shot-focus override on iOS, but is not a verified macro/lens-switching fix.

Platform behavior

Other-wallet research

These are implementation comparisons, not device-test results. Our pinned Expo version selects lenses by localized names, and virtual cameras need device-derived zoom normalization. No brittle lens override is added. The upstream reporter still experienced close-range blur after trying the focus setting; a physical lens's minimum focusing distance remains a separate issue.

Verification on the updated code

  • RED: all three platform omission assertions failed before removing the prop; QR callback forwarding still passed.
  • yarn test --runInBand28 passed.
  • yarn test --preset jest-expo/android --runInBand --testMatch '**/__tests__/**/*.[jt]s?(x)'the same 28 tests passed under the Android preset. The explicit glob matches this repo's existing test filenames.
  • yarn lint:js, yarn tsc:compile, yarn format, git diff --check — passed.
  • CI=1 yarn expo export --platform android --output-dir /tmp/alby-go-default-focus-android — passed.
  • CI=1 yarn expo export --platform ios --output-dir /tmp/alby-go-default-focus-ios — passed.

Exports are JavaScript/Hermes bundles, not native APK/Xcode builds. Unit tests check the omitted-prop contract and QR callback, not optics. No Android SDK/device tooling or physical iPhone is available here. The previous fork CI Android build was blocked before compilation by missing Expo authentication; current-head CI must be checked separately.

Device checks before marking ready

  • Cold native launch on iPhone 15 Pro and Android, rather than Fast Refresh. Open the scanner pointing far away, then aim at a QR and move near/far; confirm refocusing and successful scans.
  • Repeat after reopening the scanner and backgrounding/foregrounding the app; record device model and OS version.
  • Test small/dense QRs at normal and close distances, including dim light. Compare the iPhone with Blink using the same QR and distance.
  • Smoke-test an older iPhone; check web focus behavior if that target is supported.
  • If close-range blur persists, investigate capability-aware multi-camera selection separately; do not claim this patch fixes macro limitations.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@hermes-alby hermes-alby changed the title fix: use continuous autofocus for iOS QR scanning fix: use default camera autofocus for QR scanning Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant