Skip to content

Persist QR scan warning past permission prompt - #6194

Open
j0ntz wants to merge 1 commit into
developfrom
jon/scan-modal-warning-persist
Open

Persist QR scan warning past permission prompt#6194
j0ntz wants to merge 1 commit into
developfrom
jon/scan-modal-warning-persist

Conversation

@j0ntz

@j0ntz j0ntz commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Description

Asana: https://app.asana.com/0/1215088146871429/1217260776591432

ScanModal chose between the scam warning and the camera scanner purely on the
camera permission status, and it fired the permission request the instant the
modal mounted. On a first camera use that produced the reported bug: the warning
rendered, the OS prompt landed on top of it before it could be read, and granting
the permission flipped the render branch, so the warning vanished as the scanner
opened. The warning was only readable when permission was denied, which is
backwards.

The scam warning is now the gate. It stays on screen until the user taps
"Got it!", whichever way the permission prompt was answered, and the permission
request is delayed a beat so the warning is painted before the system prompt
covers it.

  • The camera branch renders on isCameraAllowed && isWarningAcknowledged instead
    of the permission status alone.
  • The permission request runs 750ms after mount, on a timer cleared at unmount.
  • Primary button: "Got it!" disabled while the permission is still resolving,
    "Got it!" once allowed, "Open Settings" (with the existing enable-camera
    guidance) when denied or blocked.

Covers all three entry points (Side Menu Scan QR, Send Scan, WalletConnect New
Connection); they all render this one component.


Note

Low Risk
Localized QR scan UX change with no auth, payment, or data-handling impact; behavior is gated in a single modal component.

Overview
ScanModal no longer switches straight to the camera when permission is granted. The financial scam AlertCardUi4 stays visible until the user taps Got it!, and the live scanner only opens when isCameraAllowed && isWarningAcknowledged.

Camera permission is requested 750ms after mount so the warning renders before the OS prompt. The footer uses Got it! (disabled until the permission flow finishes; enabled once camera access is allowed) or Open Settings with the existing denied copy when access is blocked. CHANGELOG documents the fix; eslint.config.mjs drops a legacy override entry for this modal.

Reviewed by Cursor Bugbot for commit 9c81aa6. Bugbot is set up for automated code reviews on this repo. Configure here.

@j0ntz

j0ntz commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

📸 Test evidence

warning shown first

warning shown first

warning behind android permission prompt

warning behind android permission prompt

warning persists after allow

warning persists after allow

scanner opens after dismiss

scanner opens after dismiss

denied shows settings guidance

denied shows settings guidance

ios warning gates scanner

ios warning gates scanner

ios scanner opens after dismiss

ios scanner opens after dismiss

Captured by the agent's in-app test run (build-and-test).

@j0ntz
j0ntz force-pushed the jon/scan-modal-warning-persist branch from 8069b73 to 9c81aa6 Compare September 3, 2026 23:18
@j0ntz
j0ntz marked this pull request as ready for review September 3, 2026 23:18
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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