fix(android): explain camera permission for setup scans#98280
fix(android): explain camera permission for setup scans#98280TurboTheTurtle wants to merge 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 30, 2026, 6:40 PM ET / 22:40 UTC. Summary PR surface: Other +143. Total +143 across 2 files. Reproducibility: yes. at source level: current main maps QR scanner startup failure to generic copy while Android already declares and tracks CAMERA permission state. The contributor also posted an exact-head emulator flow for the denied-camera path, but I did not independently run an emulator in this read-only review. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Merge this focused Android onboarding fix after normal maintainer review, let it close #98044, and leave broader auth recovery messaging to #98046 and #98094. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main maps QR scanner startup failure to generic copy while Android already declares and tracks CAMERA permission state. The contributor also posted an exact-head emulator flow for the denied-camera path, but I did not independently run an emulator in this read-only review. Is this the best way to solve the issue? Yes, this is the best current fix shape: it stays at Android onboarding's scan/error boundary, preserves manual setup fallback, and synchronizes scan-time permission results into the existing onboarding permission owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3811001d2783. Label changesLabel justifications:
Evidence reviewedPR surface: Other +143. Total +143 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Real behavior proofVerified on a local Android emulator from this PR head ( Flow observed:
This verifies the denied-camera scanner failure path now leaves the user with specific recovery guidance instead of the generic scanner failure. |
dd27930 to
95764ee
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
95764ee to
4e9ef75
Compare
|
Maintainer verdict: closing this candidate because it requests the wrong permission and does not fix the reproduced failure. Google's Code Scanner contract is explicitly permissionless for the calling app: scanning runs in Google Play services, and OpenClaw must not request its own I reproduced both sides on Android 16:
The PR maps every scanner failure to OpenClaw's camera state, then requests OpenClaw The supported alternatives are already present: let Google Code Scanner own its permission UI and keep paste/manual setup available. A future focused change could distinguish scanner-module or Play-services availability using the dependency's structured failure contract, but it should not request OpenClaw camera permission. Official contract: https://developers.google.com/ml-kit/vision/barcode-scanning/code-scanner Thank you for the careful UI work and emulator evidence; that evidence made the ownership mismatch possible to verify conclusively. |
Closes #98044.
What Problem This Solves
When Android setup QR scanning failed because Camera permission was denied, onboarding only showed generic scanner failure copy and did not guide users to grant the permission.
Evidence
At PR head
4e9ef75fcc, focused Play and third-party unit tests pass forOnboardingFlowLogicTest. They cover camera-specific scanner copy, the app-settings recovery decision, non-camera setup errors hiding the camera settings action, and the scan-time CAMERA grant updating the final onboarding permission state.Manual UI validation:
On
sdk_gphone64_arm64, Android 16 / API 36, using the Play debug APK (versionName=2026.6.10,targetSdk=36), Camera was revoked for OpenClaw and Google Play services.Connect Gateway->Scan setup codefirst showed Google scannerCamera permission required; after dismissing it, Android requestedAllow OpenClaw Node to take pictures and record video?; afterDon’t allow, Gateway Setup showedCamera permission is required to scan setup codes. Open Android app settings to grant Camera permission, then try again.with theOpen app settingsaction. A follow-up UI dump after leaving the camera-specific state no longer containedOpen app settings.