iOS: port onboarding + QR pairing flow stability#18162
Conversation
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
extensions/device-pair/index.ts
Outdated
| import type { OpenClawPluginApi } from "openclaw/plugin-sdk"; | ||
| import os from "node:os"; | ||
| import { approveDevicePairing, listDevicePairing } from "openclaw/plugin-sdk"; | ||
| import { approveDevicePairing, listDevicePairing, renderQrPngBase64 } from "openclaw/plugin-sdk"; |
There was a problem hiding this comment.
renderQrPngBase64 is not exported from plugin-sdk
renderQrPngBase64 is defined in src/web/qr-image.ts but is not re-exported from src/plugin-sdk/index.ts. The existing exports (approveDevicePairing, listDevicePairing) are present at lines 164-165 of the plugin-sdk barrel, but renderQrPngBase64 is missing. This import will fail at runtime when the /pair qr action is invoked.
Either add renderQrPngBase64 to src/plugin-sdk/index.ts exports, or use a dynamic import from the internal path.
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/device-pair/index.ts
Line: 3:3
Comment:
**`renderQrPngBase64` is not exported from plugin-sdk**
`renderQrPngBase64` is defined in `src/web/qr-image.ts` but is not re-exported from `src/plugin-sdk/index.ts`. The existing exports (`approveDevicePairing`, `listDevicePairing`) are present at lines 164-165 of the plugin-sdk barrel, but `renderQrPngBase64` is missing. This import will fail at runtime when the `/pair qr` action is invoked.
Either add `renderQrPngBase64` to `src/plugin-sdk/index.ts` exports, or use a dynamic import from the internal path.
How can I resolve this? If you propose a fix, please make it concise.| agentName: self.appModel.activeAgentName, | ||
| userAccent: self.appModel.seamColor) | ||
| case .quickSetup: | ||
| GatewayQuickSetupSheet() |
There was a problem hiding this comment.
GatewayQuickSetupSheet is not defined anywhere in the codebase
GatewayQuickSetupSheet() is instantiated here but no struct/class with this name exists in the repo. This will cause a compilation error. Was this type meant to be included in this PR, or should the .quickSetup sheet case be removed until the view is ready?
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/Sources/RootCanvas.swift
Line: 107:107
Comment:
**`GatewayQuickSetupSheet` is not defined anywhere in the codebase**
`GatewayQuickSetupSheet()` is instantiated here but no struct/class with this name exists in the repo. This will cause a compilation error. Was this type meant to be included in this PR, or should the `.quickSetup` sheet case be removed until the view is ready?
How can I resolve this? If you propose a fix, please make it concise.| Text(self.statusLine) | ||
| .font(.footnote) | ||
| .foregroundStyle(.secondary) | ||
| .multilineTextAlignment(.center) | ||
| .padding(.horizontal, 24) | ||
| .padding(.horizontal, 24) | ||
| .padding(.bottom, 48) |
There was a problem hiding this comment.
Duplicate .padding(.horizontal, 24) — likely copy-paste error
The Text view gets .padding(.horizontal, 24) on line 329, then the indentation shifts and a second .padding(.horizontal, 24) is applied on line 330 (which attaches to the parent VStack due to the indentation break). This results in 48pt total horizontal padding on the status line, whereas the surrounding buttons only get 24pt (via the VStack). The .padding(.bottom, 48) on line 331 also lands on the VStack rather than the Text.
| Text(self.statusLine) | |
| .font(.footnote) | |
| .foregroundStyle(.secondary) | |
| .multilineTextAlignment(.center) | |
| .padding(.horizontal, 24) | |
| .padding(.horizontal, 24) | |
| .padding(.bottom, 48) | |
| Text(self.statusLine) | |
| .font(.footnote) | |
| .foregroundStyle(.secondary) | |
| .multilineTextAlignment(.center) | |
| .padding(.horizontal, 24) | |
| .padding(.bottom, 48) | |
| } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/ios/Sources/Onboarding/OnboardingWizardView.swift
Line: 325:331
Comment:
**Duplicate `.padding(.horizontal, 24)` — likely copy-paste error**
The `Text` view gets `.padding(.horizontal, 24)` on line 329, then the indentation shifts and a second `.padding(.horizontal, 24)` is applied on line 330 (which attaches to the parent `VStack` due to the indentation break). This results in 48pt total horizontal padding on the status line, whereas the surrounding buttons only get 24pt (via the `VStack`). The `.padding(.bottom, 48)` on line 331 also lands on the `VStack` rather than the `Text`.
```suggestion
Text(self.statusLine)
.font(.footnote)
.foregroundStyle(.secondary)
.multilineTextAlignment(.center)
.padding(.horizontal, 24)
.padding(.bottom, 48)
}
```
How can I resolve this? If you propose a fix, please make it concise.421b6f9 to
b0a3d22
Compare
iOS: - QR scanner view using DataScannerViewController - Photo library QR detection via CIDetector for saved QR images - Deep link parser for openclaw://gateway URLs and base64url setup codes - Onboarding wizard: full-screen welcome with "Scan QR Code" button, auto-connect on scan, back navigation, step indicators for manual flow Backend: - Add /pair qr action to device-pair extension for QR code generation - TUI/WebUI differentiation: ASCII QR for TUI, markdown image for WebUI - Telegram: send QR as media attachment via sendMessageTelegram - Add data URI support to loadWebMedia for generic base64 media handling - Export renderQrPngBase64 from plugin SDK for extension use Co-Authored-By: Claude Opus 4.6 <[email protected]> (cherry picked from commit d79ed65)
…tewayQuickSetupSheet
b0a3d22 to
a87eade
Compare
|
The formal models extracted constants ( This check is informational (not blocking merges yet). If this change is intentional, follow up by updating the formal models repo or regenerating the extracted artifacts there. |
|
@Marvae Hi, just noticing the QR scanning feature was merged to main. Would appreciate a mention in the description and Changelog. Thanks! |
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: a87eade Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: a87eade Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky (cherry picked from commit 130e59a) # Conflicts: # CHANGELOG.md # apps/ios/Sources/Gateway/GatewayTrustPromptAlert.swift
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: a87eade Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky (cherry picked from commit 130e59a) # Conflicts: # CHANGELOG.md # apps/ios/Sources/Gateway/GatewayTrustPromptAlert.swift # extensions/device-pair/index.ts
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: a87eade Co-authored-by: mbelinky <[email protected]> Co-authored-by: mbelinky <[email protected]> Reviewed-by: @mbelinky
Summary
Ports iOS onboarding/QR pairing flow improvements from
ios-new-alpha-coreintomainas an isolated pack.Included
NodeAppModelaccess in onboarding surfacesScope
Testing
code 28).Greptile Summary
Ports the iOS onboarding wizard, QR pairing flow, and reconnect stability improvements from the alpha branch into main. Adds a full-screen onboarding wizard (
OnboardingWizardView) with QR scanning, manual connection, and pairing approval flows; introducesGatewayConnectionIssuefor classifying connection errors; adds a keepalive mechanism toGatewayChannelActorto prevent NAT/proxy idle drops; and extends thedevice-pairextension with a/pair qraction for QR code generation.GatewayQuickSetupSheetis referenced inRootCanvas.swiftbut never defined — iOS will not compilerenderQrPngBase64is imported fromopenclaw/plugin-sdkin the device-pair extension but is not exported from the plugin-sdk barrel (src/plugin-sdk/index.ts).padding(.horizontal, 24)inOnboardingWizardView.swiftwelcome step causes double horizontal padding on the status textGatewayTrustPromptAlertis correct — binding setter is now a no-op to prevent SwiftUI dismissal from racing with button handlersConfidence Score: 2/5
GatewayQuickSetupSheetis used inRootCanvas.swiftbut the type does not exist anywhere in the codebase, and (2)renderQrPngBase64is imported in the device-pair extension fromopenclaw/plugin-sdkbut not exported from that module. The underlying logic for onboarding, pairing, keepalive, and talk mode sync is well-structured and correctly implemented.apps/ios/Sources/RootCanvas.swift(missingGatewayQuickSetupSheettype),extensions/device-pair/index.ts(missingrenderQrPngBase64export from plugin-sdk),apps/ios/Sources/Onboarding/OnboardingWizardView.swift(duplicate padding layout bug)Last reviewed commit: 421b6f9