Skip to content

refactor(mobile): replace QR pairing with account sign-in - #3242

Merged
wgqqqqq merged 1 commit into
mainfrom
wgq/mobile-account-signin
Sep 28, 2026
Merged

wgqqqqq merged 1 commit into
mainfrom
wgq/mobile-account-signin

Conversation

@wgqqqqq

@wgqqqqq wgqqqqq commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the mobile QR / pairing-link connect flow with account sign-in. Android, iOS, and HarmonyOS now list the desktops of the signed-in account and connect from a device picker, so a temporary scan pairing is no longer the entry point.
  • Consolidate mobile settings into one sheet per platform: a new current-control section and a remote-permission section replace the separate general/remote settings surfaces.
  • Drop the camera and scanner stack that only served pairing: Android camera-* and ML Kit dependencies plus the CAMERA manifest entries, iOS NSCameraUsageDescription, and HarmonyOS ohos.permission.CAMERA. HarmonyOS ohos.permission.READ_PASTEBOARD goes too, because the pasteboard read path and its runtime permission request were the pairing-link paste; ClipboardService keeps only the mini-app writeText path, which needs no permission.
  • Move the HarmonyOS i18n catalogues, native string resources, the iOS project file, and the HarmonyOS architecture contract's required presentation files with the same change.

Deleted: InlineQrScanner/InlineQrDecoderTest/pairing-qr.png/AccountScreen/ConnectView/GeneralSettingsScreen/OtherConnectionSection/SignedOutConnectionActions (Android), PairingSheet/QRCodeScannerView (iOS), ConnectManualPairingOverlay/RemoteControlSettingsSheet/InlineQrScanner/QrScanService/ConnectScanDecisionPolicy/RemoteControlSettingsPagePolicy/welcome_scan.svg (HarmonyOS).
Added: AccountLoginScreen.kt, AccountDevicePickerSheet.swift, AccountLoginSheet.ets, CurrentControlSection.ets, RemotePermissionSection.ets, SettingsPagePolicy.ets.

Validation

Run on macOS against the pushed commit; the Android and HarmonyOS toolchains were the bundled JBRs from Android Studio / DevEco Studio.

  • git diff --cached --check — passed
  • pnpm run mobile:ui:check — passed
  • pnpm run theme:color-audit:all — passed (24 surfaces)
  • pnpm run harmony:architecture — passed
  • cd src/apps/mobile/ios && ./Testing/run-pure-swift-tests.sh — passed
  • cd src/apps/mobile/android && ./gradlew :app:assembleDebug :app:compileDebugAndroidTestKotlin :app:testDebugUnitTest — passed
  • cd src/apps/mobile/harmonyos && node --test miniapps/*.test.cjs — 6 passed, 0 failed
  • cd src/apps/mobile/harmonyos && source scripts/ohos-env.sh && "$HVIGORW" --mode module -p module=entry@default -p ohos.test.type=LocalTest test --no-daemon — Tests run: 511, Failure: 0, Error: 0, Pass: 511

Not green, and pre-existing on the base commit d4e96d430 — the same commands fail identically in a clean worktree of that commit, so they are not caused by this branch:

  • cd src/apps/mobile/shared && ./gradlew jvmTest — 503 tests, 1 failed: RemoteSessionStoreTest.imageSendFailureDoesNotConsumeAttachmentsAndAckKeepsNewTyping
  • cd src/apps/mobile/harmonyos && node --test tools/tests/*.test.cjs — 194 tests, 1 failed: sidebar final entry hierarchy keeps modes in workspace plus and tools in the footer
  • pnpm run mobile:architecture — 4 violations (sharedReachesPlatformTrees, defaultArgsInFeatureApi); AppSidebar.ets already lacked workspaceTools.title at d4e96d430, and the reported files are untouched here

Risks

  • Removes a user-facing connect path. A desktop reached only through a temporary QR pair now needs an account sign-in on both ends.
  • Camera permission removal is a behaviour change on Android, iOS, and HarmonyOS; the scanners no longer exist, so the permission asks disappear with them.
  • Local-only evidence. The Remote workspace, Remote control, Peer Device Mode, and Detached Dispatch scenarios from AGENTS.md were not exercised on a device or a second host.
  • Existing installs keep their saved connections and persisted state; no stored shape changes in this branch.

Generated with OpenBitFun

Mobile connect no longer scans a desktop QR code or pastes a pairing link.
Android, iOS, and HarmonyOS discover the desktops of the signed-in account
and pick one from the account device list, and the settings surfaces are
consolidated into one sheet per platform.

Removed with the pairing flow: the camera scanners and their dependencies
(Android camera/ML Kit, `NSCameraUsageDescription` on iOS, `ohos.permission.CAMERA`
and `ohos.permission.READ_PASTEBOARD` on HarmonyOS), the pairing sheets and
scanners, and the separate general/remote settings screens. Added in their
place: an account login surface plus a device picker on each platform, and
current-control and remote-permission sections inside the settings sheet.

HarmonyOS i18n catalogues, native string resources, the iOS project file, and
the HarmonyOS architecture contract's required presentation files move with
the same change.

Co-authored-by: OpenBitFun <318544290+bitfun-ai@users.noreply.github.com>
@wgqqqqq
wgqqqqq marked this pull request as ready for review September 28, 2026 09:36
@wgqqqqq
wgqqqqq merged commit 42e376b into main Sep 28, 2026
13 checks passed
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