feat(qr-scanner): prompt-free iOS clipboard chip; restore Android pre-read - #2521
Merged
innolope-dev merged 1 commit intoJul 27, 2026
Merged
Conversation
…-read Reintroduces the clipboard shortcut removed in #2520 with a platform split that can't race the camera permission dialog: - Android native: unchanged from pre-revert — read at open, preview the copied EVM address in a one-tap chip (only side effect is the system paste toast). - iOS native: a new app-local ClipboardDetect plugin exposes UIPasteboard.hasStrings — metadata only, so no iOS 16+ 'Allow Paste' alert. When true, a generic 'Use copied address' chip appears; the real Clipboard.read() runs on the chip tap, a user gesture, with the camera already live. Older binaries (OTA'd JS) resolve hasStrings to false and simply show no chip. - Web/PWA: no pre-read; the explicit 'Click to paste' stays the fallback. Needs an iOS binary release to activate the chip (new native plugin, registered via AppViewController per Capacitor's app-local plugin flow).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
innolope-dev
merged commit Jul 27, 2026
9c78dc2
into
fix/qr-scanner-clipboard-preread
8 of 10 checks passed
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.
Stacked on #2520 (base = its branch; retargets to
devautomatically when it merges). Reintroduces the clipboard shortcut #2520 removed, redesigned so it cannot race the camera permission dialog — per the discussion there ("needs a design that reads the clipboard only on gesture").Design (per platform)
Clipboard.read()exactly as pre-revertUIPasteboard.hasStringsvia new app-localClipboardDetectplugin — metadata only, no 'Allow Paste' alertiOS chip tap: read →
extractPaymentValue(evmAddress)→onScan, or an honest toast + chip hides if the copied text isn't an address.Native plumbing
ios/App/App/ClipboardDetectPlugin.swift—CAPBridgedPluginexposinghasStrings.ios/App/App/AppViewController.swift—CAPBridgeViewControllersubclass registering the plugin (capacitorDidLoad);Main.storyboardnow instantiates it; both files added toproject.pbxproj.clipboardHasStrings()resolvesfalse→ no chip, no error. The iOS chip therefore activates only with the next binary release.QA
clipboard-detectunit tests (off-iOS short-circuit, native answer passthrough, plugin-missing → false);tsc --noEmit, eslint, prettier clean.native:build/ device run to confirm plugin registration before the next iOS release. Manual device matrix: scanner opens straight to camera on iOS with text on the clipboard (no alert), chip appears, tap → prompt → pay; Android chip behavior byte-identical to pre-fix(qr-scanner): stop clipboard paste-prompt racing the camera; platform-gate the copied-address chip #2520.