Skip to content

feat(mobile): connect a computer with one tap, camera opens straight away - #48729

Merged
AmoabaKelvin merged 1 commit into
mainfrom
mobile-connect-computer-flow
Nov 27, 2026
Merged

AmoabaKelvin merged 1 commit into
mainfrom
mobile-connect-computer-flow

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

Getting the phone connected to your computer took three screens that each explained pairing again. Now the empty Feed says what to open on your computer and gives you Scan code or Paste code. Scan code opens the camera straight away.

Files Added Deleted Net
Test 0 0 0 0
Prod 25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​465 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1107 $\color{#cf222e}{\Huge{\mathbf{−}}}$​642

What Changed

  • Feed with nothing paired: one title ("Connect your computer"), one line ("Open Orca on your computer, then Settings → Mobile."), and Scan code / Paste code pinned above the tabs. The 40-word paragraph, the three numbered steps and the blue "Pair desktop" pill are gone. Paste code opens the paste sheet right on Feed.
  • Scan: a nav bar with Back and "Scan code", and the camera fills the screen under it. The three steps above the camera are gone. The screen asks for the camera as it opens, with no "Pair with desktop / Continue" page first. Over the camera: one line of help and a Paste code pill. If the camera is off, the app's state view says so and offers Allow camera (or Open Settings) and Paste code.
  • Connecting shows only the spinner. The developer pairing log no longer shows on every pair.
  • Failure: "Couldn’t pair", the reason in one sentence, and the log behind Details. The actions match how you tried: Try again / Paste code after a scan, Paste code / Scan code after a paste. Error screens scroll, so an open log can't push the buttons off screen.
  • Pairing links (orca://pair): the same nav bar and state view: "Pair with this computer?", "Only pair with a computer you trust.", then Pair / Cancel at the bottom.
  • Onboarding: one sentence per page. Both pages use the sheet buttons (SheetPrimaryButton plus the new quiet SheetSecondaryButton), so the whole flow has one primary style.
  • Words: "computer" instead of "desktop" or "host", and sentence case. The timeout, expired-code and download-code messages are shorter.

Mechanism: Feed's paste hands the code to the scan screen in memory (pasted-pairing-code.ts). It never goes in a route param, so a link like orca://pair-scan?code= can't pair without the confirm screen.

Matched screens: Home tab empty states (MobileHomeTabEmpty, used by Bots/Agents/Usage), SheetPrimaryButton with a quiet action under it (MobileBotShareReceiveSheet foot), the settings nav bar (settings-screen-frame.tsx SettingsNavBar), and MobileStateView for the error and denied states.

Why

The approved phone UX audit (getting connected, R4) found three hero title sizes, three primary button styles, the steps shown twice, and a confirm that never named the machine. It also found the connection log on every pair.

Two places differ from the mock:

  • The link confirm doesn't name the computer. The pairing code only carries an endpoint, a token and a key, and the name only arrives after connecting. Naming it needs the desktop to add its name to the code.
  • The link confirm stays a screen instead of a sheet over Feed. A link that cold-starts the app has no Home under it.

A camera scan still pairs without a confirm. Without a name to show, a confirm would only add a tap.

Linked Issue

None. This is part of the phone UX round.

Visual Proof

Each image shows before (dark), after (dark), before (light) and after (light), at the same data and viewport. They are real components rendered in Chromium at 393×852. The camera is a stand-in gradient, and pairing is a fake that fails after logging two lines.

Feed with nothing paired
feed-empty.png

Scan: before (Continue page), before (camera), after dark, after light
scan.png

Pairing failed
scan-failed.png

orca://pair link
pair-link.png

Onboarding
onboarding.png

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
  • Every added test fails without this change and avoids the test anti-patterns

I rendered every state (empty Feed, camera, camera off, connecting, failed with Details open, pasted code failing, link confirm, onboarding) in dark and light. I also checked that a pasted code never triggers the camera prompt. pnpm check:changed and the mobile typecheck pass. No tests were added because the change is UI and copy.

Performance

None, because this only changes what the pairing screens draw. The camera stays paused behind the paste sheet as before. The page bundle's eager size is unchanged, since every changed file is native-only.

Risk

Level: Low

The riskiest part is the camera permission timing. The prompt now opens with the scan screen. If someone denies it, they get the "Camera is off" state with Allow camera (Android) or Open Settings (iOS), plus Paste code. Pairing itself (startPreProfilePairing) is unchanged. A plain revert backs it all out.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Mobile only, native screens. There is no host or RPC change, so older desktops are unaffected.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mobile home empty state now offers scan and paste pairing actions. Pasted codes pass to the scan screen through an in-memory, one-time handoff. The pairing screens use updated navigation and state-specific views for confirmation, scanning, camera permission, connecting, and errors. The onboarding page uses shared sheet buttons. Pairing, home, and onboarding locale strings are updated.

Merge Risk: Low · up to c649b

Users of the Korean, Portuguese, Russian, Turkish and Chinese locales will see the new pairing confirmation title and caution in English instead of their language. Pairing still works. Adding the two translated strings to those six locale files closes the gap; this is a small, low-risk fix.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a one-tap pairing flow for connecting a computer, with the camera opening immediately on scan. The changeset matches this: an empty Feed with Scan code and Paste code …
Description check Passed The description follows the repository template, with every required section present: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skil…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: a one-tap pairing flow for connecting a computer, with the camera opening immediately on scan. The changeset matches this: an empty Feed with Scan code and Paste code actions, camera requested as the scan screen opens, and the paste handoff. The title is specific and follows the conventional type(scope) format.

Full details: Description check

Explanation

The description follows the repository template, with every required section present: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. It explains the before and after behavior, the mechanism (in-memory paste handoff), the reasons behind the design choices, and the risk and revert path. Gaps: the Linked Issue section reads 'None' and gives no 'Fixes #' issue, which the template says should always exist for outside contributors. The Risk 'Level' is set to Low, and the AI Disclosure section is blank. The Performance line is completed. Visual Proof is provided with images. The template's Review section is empty.

Resolution

Optional improvements: link an issue in the Linked Issue section (or confirm that the author is a maintainer, since the template only requires an issue for outside contributors), and fill in the AI Disclosure section or mark it not applicable.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b93d103-b876-4c24-bf4a-cfba7296d28d
Commits

Reviewing files that changed from the base of the PR and between bf406c1 and c649be9.

Files selected for processing: 11

  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
Files with no reviewable changes: 2

  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
Files skipped from review as they are similar to previous changes: 9

  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 81d2ae6d-16b9-467f-ae14-4d70e2b6dfd0
Commits

Reviewing files that changed from the base of the PR and between ac69cbd and bf406c1.

Files selected for processing: 25

  • mobile/app/pair-confirm.tsx
  • mobile/app/pair-scan.tsx
  • mobile/src/components/sheets/SheetSecondaryButton.tsx
  • mobile/src/home/MobileHomeEmptyState.tsx
  • mobile/src/home/MobileHomeScreen.tsx
  • mobile/src/home/tabs/MobileHomeFeedTab.tsx
  • mobile/src/home/tabs/MobileHomeTabEmpty.tsx
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/onboarding/MobileOnboardingPage.tsx
  • mobile/src/onboarding/mobile-onboarding-styles.ts
  • mobile/src/pair-scan-styles.ts
  • mobile/src/pairing/pairing-failure-message.ts
  • mobile/src/pairing/pairing-scan-error-message.ts
  • mobile/src/pairing/pairing-visuals.tsx
  • mobile/src/pairing/pasted-pairing-code.ts
Files with no reviewable changes: 1

  • mobile/src/pairing/pairing-visuals.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

"pairingFailed": "페어링 실패: {{error}}",
"pairingLog": "페어링 로그",
"title": "이 데스크톱과 페어링하시겠습니까?"
"pairingFailed": "페어링 실패: {{error}}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Add translations for the new confirmation title and caution in the six locales.

The confirmation screen now reads app.pairConfirm.pairThisComputer and app.pairConfirm.onlyYourOwn. Neither key has a value in the Korean, Portuguese, Russian, Turkish, Traditional Chinese, or Simplified Chinese catalogs. The same change removes the translated pairConfirm.title and pairConfirm.description from those files. For users of those locales, the title and the caution render in English. The screen does not show raw keys.

Add translated values for pairThisComputer and onlyYourOwn under pairConfirm in each of the six locale files. Keep the English values in en.json.

…traight away

Feed with nothing paired shows one line and Scan code / Paste code above the tabs. Scan opens the camera full bleed under a nav bar and asks for camera access as it opens. The pairing log only shows behind Details when pairing fails. Pairing links and onboarding use the same buttons and say less.
@AmoabaKelvin
AmoabaKelvin force-pushed the mobile-connect-computer-flow branch from bf406c1 to c649be9 Compare November 27, 2026 08:37
@AmoabaKelvin
AmoabaKelvin merged commit bbf40bd into main Nov 27, 2026
28 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