fix(rn-wallet): keep QR scanner "camera unavailable" message in bounds - #625
Conversation
The permission-denied message on the Scan screen rendered as a single line that overflowed both screen edges and sat dimmed behind the dark overlay. Wrap it to two lines, draw it on top of the overlay, and position it below the scan frame with margin (matching the instruction text). Mirror the same below-frame placement on web. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Claude finished @ignaciosantise's task in 1m 24s —— View job Code Review
Found 1 issue(s)Issue 1: Redundant/conflicting color prop on error TextID: scan-errortext-dual-color-a3f1 Context:
Recommendation: Drop the redundant <Text variant="lg-400" style={styles.errorText}>
Camera unavailable.{'\n'}Enable camera access in Settings.
</Text>Overall the fix is well-structured. Moving the error view above the SVG overlay (so it renders on top) is the right approach, and mirroring the |
There was a problem hiding this comment.
🔵 Needs a closer look
The web error block can be clipped on short viewports and needs responsive positioning before approval.
Pull request overview
Updates the rn_cli_wallet Scan screen so camera-unavailable messaging remains readable and within bounds on native and web.
Changes:
- Wraps and repositions the native error message above the scanner overlay.
- Moves web error content below the scan frame.
- Adds centered layout and spacing styles.
File summaries
| File | Summary |
|---|---|
wallets/rn_cli_wallet/src/screens/Scan/styles.ts |
Adds native error layout and text styles. |
wallets/rn_cli_wallet/src/screens/Scan/index.web.tsx |
Repositions web error content below the scanner frame. |
wallets/rn_cli_wallet/src/screens/Scan/index.tsx |
Renders native error messaging above the overlay. |
Review details
Suppressed comments (1)
wallets/rn_cli_wallet/src/screens/Scan/index.web.tsx:292
- On short web viewports this stacked error block can be clipped by the desktop frame.
frameHeightis capped by100vh - 32pxand the frame usesoverflow: hidden; for a 468px frame, thistopis about 375px, leaving only ~93px for the two-line message, 16px gap, and padded button, so the bottom of the content is outside the frame. Please make the placement responsive for short frames (for example, measure/reposition the block or reduce the scan area/spacing) instead of always using this fixed offset.
webStyles.errorBelow,
{ top: scanAreaTop + SCAN_AREA_SIZE + Spacing[8] },
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Problem
On the
rn_cli_walletScan screen, when camera permission is denied/unavailable, the message "Camera unavailable. Enable camera access in Settings." rendered as a single line that overflowed both screen edges (first/last words clipped) and appeared dimmed because it sat behind the dark scanner overlay.Fix
Native (
index.tsx+styles.ts)paddingHorizontal+textAlign: 'center'so it stays within bounds.Web (
index.web.tsx)errorContainerstyle;allowCameraButtonis now a flex child instead of absolutely positioned.Testing
Manual, native-only screen (
react-native-vision-camera). Verified on iPhone 17 simulator (iOS 26.4) with camera access denied: the message renders as two centered lines below the scan frame, fully on-screen and crisp. Web renders the equivalent placement below the square.🤖 Generated with Claude Code