Skip to content

Connect phones by scanning or entering one Host address - #4927

Draft
DoodleBears wants to merge 12 commits into
mainfrom
codex/4900-mobile-owner-sign-in
Draft

DoodleBears wants to merge 12 commits into
mainfrom
codex/4900-mobile-owner-sign-in

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Mobile Owner sign-in #4900 | Scan or enter, Host decides sign-in #4962 | Remote Host sign-in #4896

Why the change

手机的配对菜单原来把电脑端的线路(私有连接 / 同一 Wi-Fi / Tailscale)和登录方式(Owner 账密 / 成员加入)都摊在第一屏。从手机看,这些线路是同一个扫码流程;Owner 和成员登录也是同一套账密机制。现在手机只有两条路:扫码或输入,以及 登录 Tobs 账号;输入 Host 地址后由 Host 决定以 Owner 还是成员身份登录。

Harness / Model

Harness: codex, claude-code
Model: gpt-6.2-sol, claude-opus-5-5

Special things to note

  • Merge risk: two-way door, medium-high blast radius. The Host gains a public discovery field (signIn.password) and a new encrypted password-sign-in message that resolves Owner or member by username. Existing owner-sign-in, team-sign-in, invitations and QR pairing are unchanged. Review identity resolution, no username enumeration and the per-channel single attempt in packages/core/src/team/member-auth.ts and encrypted-gateway.ts.
  • Team mode security suite: gate still open. The head-bound run at the Host commit passed 12 of 18 scenarios. A0 passed on retry. B2 was inconclusive because the model skipped the Shell probe. Four Claude/Codex engine checks were blocked because those engines were signed out on the runner. It must be rerun with signed-in engines before merge.
  • Design review: 首屏只剩扫码/输入框和「登录 Tobs 账号」,前置条件并入「安装与配对教程」行;输入框自动识别配对链接、邀请链接和 Host 地址;输入地址后先选择「用用户名和密码登录(无需电脑确认)」或「在电脑上批准(扫码并核对指纹)」,Host 指纹收进「查看 Host 指纹」(Host 端按地址发起配对窗口见 Pair a phone by address with computer approval (pairing window) #4976);字段标签填写后仍可见;不允许账密的 Host 在询问密码前引导回扫码。图标、可见标签和无障碍名称一致。Expo Web 浅色/深色、中英文已核对;原生键盘、大字号和读屏待原生验收。
  • Verification at b083443cf: repo pnpm typecheck passed. Mobile tests: 124 targeted tests across 13 files passed. host-session-multiple timed out once under parallel load and passed 5/5 twice when run alone. host-client sign-in tests passed 18/18. Host worker: lint, format, typecheck, CLI parity, source policy, changelog and 150 targeted core/host-client/relay tests passed. A live isolated Host returned signIn: {"password": true}. check-package-boundaries fails on main for unrelated packages/client baseline entries.

Change outline

/pair  (first setup, Add computer)
  ├─ Scan or enter ──┬─ pairing code / link ─→ fingerprint check → approve on computer   (unchanged)
  │                  ├─ invitation link/QR ──→ member sign-in (password, first-time change)
  │                  └─ Host address ────────→ GET /botharness-device/channel  (signIn.password?)
  │                                              ├─ true  → choose: ① username + password (fingerprint behind a disclosure)
  │                                              │                    → Noise password-sign-in → Host returns role owner|member
  │                                              │                  ② approve on the computer → open + scan the pairing code
  │                                              └─ false → "show a pairing code and scan it" (no password sent)
  └─ Sign in with a Tobs account (unchanged)

入口合并说明

  • 首次设置(无 Host 时自动打开、空状态「配对电脑」)和工作区 Add computer 都进入同一个 /pair。
  • 私有连接 / Quick Tunnel / Cloudflare Tunnel / 同一 Wi-Fi / Tailscale:手机端完全相同(都是扫电脑出的码,线路由码里的地址决定),合并为一个扫码或输入入口。旧的 /pair/tailscale?mode=… 路由保留给深链接和连接详情页。
  • Owner 账密与成员登录:同一套 HTTPS 发现 + Noise 账密机制,用户名唯一,改由 Host 判断身份;删除单独的 Owner 表单。
  • 邀请链接也可在同一输入框粘贴或扫码。
  • 未采用:无配对码的「手机发起、电脑批准」(公网入口易被骚扰,步骤也不更少);跳过指纹核对(保持现有安全设计);手机先试 Owner 再试成员(重复提交密码并提前触发限流)。

Pair screen — Expo Web layout preview · 390 × 844

Before export 913b7db067e8408950c87ad78aba1b024423d918 (previous PR head), after export b083443cfc231becc6b067cd870def498dcbb158. Both use the documented opt-in Web preview adapters. No saved Host, first-setup state.

浅色 Light · zh-CN

改前 Before — six rows, three repeated icons.

Before, Light zh-CN pair menu

改后 After — scan or enter, then Tobs account and the setup guide with prerequisites.

After, Light zh-CN pair screen

深色 Dark · zh-CN

改前 Before

Before, Dark zh-CN pair menu

改后 After

After, Dark zh-CN pair screen

深色 Dark · en-US

改前 Before

Before, Dark en-US pair menu

改后 After

After, Dark en-US pair screen

Host address step — Expo Web layout preview · 390 × 844

New screen, no direct predecessor; the old Owner form asked for address, username and password together. Captured with studio.example, which the preview cannot reach, so it shows the unreachable error beside the labelled field. The Host fingerprint and credential step needs a reachable HTTPS Host and is covered by tests plus native QA.

改后 After · 浅色 Light · zh-CN

After, Light zh-CN Host address step

改后 After · 深色 Dark · zh-CN

After, Dark zh-CN Host address step

改后 After · 深色 Dark · en-US

After, Dark en-US Host address step

Android emulator — native, Human-authorized separate run

Emulator BotHarness_AX_Android (Android, x86_64), fresh Debug dev client built from b083443cf, JavaScript served at the SHA in each URL. Isolated QA Host reached through a temporary HTTPS quick tunnel. Results: new Pair screen in en/zh, light/dark and maximum font pass; address → chooser → password form with collapsible fingerprint pass; approve-on-computer guidance returns to the scanner pass; Owner sign-in records an owner-password device pass; repeating the address is refused with no extra grant pass; member ada one-time password → change → mustChangePassword:false pass; invitation link pasted into the same field → "As ada" pass; password sign-in off → pairing-code guidance with no password field pass; pairing-link regression (fingerprint check + key approval) pass. Existing issue, not from this PR: the shared sheet header title truncates at maximum font.

改前 Before · 浅色 Light · zh-CN (eb073ce6d)

Before, Android Light zh-CN pair menu

改后 After · 浅色 Light · zh-CN (e0dce14fa)

After, Android Light zh-CN pair screen

改前 Before · 深色 Dark · zh-CN (eb073ce6d)

Before, Android Dark zh-CN pair menu

改后 After · 深色 Dark · zh-CN (c585581a7, Pair screen unchanged since)

After, Android Dark zh-CN pair screen

改后 After · 地址后的选择 · 浅色 Light · zh-CN (e0dce14fa)

After, Android Light zh-CN connect chooser

改后 After · 账密表单(已展开指纹)· 浅色 Light · zh-CN (e0dce14fa)

After, Android Light zh-CN password form with fingerprint shown

改后 After · 在电脑上批准 · 浅色 Light · zh-CN (e0dce14fa)

After, Android Light zh-CN approve on the computer

改后 After · 成员首次改密 · Light · en-US (c585581a7)

After, Android Light en-US member password change

改后 After · 粘贴邀请链接 · Light · en-US (c585581a7)

After, Android Light en-US invitation sign-in

改后 After · 配对链接回归:核对电脑指纹 · Light · en-US (c585581a7)

After, Android Light en-US pairing fingerprint check

改后 After · 最大字号 · 深色 Dark · en-US (c585581a7)

After, Android Dark en-US pair screen at maximum font

Native review pending

  • iOS Simulator/iPhone (not run: the Mac has 12 GB free, below the 15 GB build stop line; Android emulator results above): from a fresh install and from Add computer, scan a pairing code, paste an invitation link, and enter a trusted HTTPS Host address. For the address, verify fingerprint display, Owner sign-in, member sign-in with the first-time password change, and a Host with password sign-in off (no password field, back to scan).
  • Software keyboard; default, intermediate and maximum text sizes; light and dark; zh and en; VoiceOver/TalkBack names.
  • Team mode security suite rerun with signed-in engines.
  • Journey: phone-pairing verification.

Implementation provenance is recorded in the issue claim. Host slice: task codex/t3 (delegated), phone slice: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6.

Closes #4900
Closes #4962
Refs #4976

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 2 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Product Terms Follow The Glossary Warning The PR adds user-visible copy that uses glossary Avoid words for two product nouns. The check covers the 12 phone-pairing commits (f2c1a5e^..HEAD) and the PR description. 1. Host Connection Route.… Change the added copy so it uses glossary terms: - apps/mobile/src/features/environments/pairing-strings.ts (lines 25, 287): replace "Host address" / "Host 地址" with "Host Connection Route" wording (zh 连接线路). - apps/mobile/src/features/team/…
Touched Features Are Verified Warning Two mapped features have runtime changes from this PR, and the verification notes name neither a run of their journeys nor a reason they were not run. Scope: The local range 011f35ce..HEAD holds 108… 1. remote-hosts: Run the journey "Standalone Owner password sign-in (#4898)" against the changed owner-sign-in.ts and sign-in-discovery.ts paths. Record the run in the PR verification notes. If the run is not possible, record the reason…
Passed Passed checks: 2 passed

Check name Status Explanation
Fix Targets The Root Cause Passed The check applies only when the PR title starts with "fix". The provider-reported title is "Connect phones by scanning or entering one Host address", which does not start with "fix". The check is ther…
Consistent With Adrs And Existing Features Passed Summary: The PR (#4927, author DoodleBears, head codex/4900-mobile-owner-sign-in into main) does not contradict an accepted ADR and does not add a duplicate implementation of an existing module. The c…
Full details: Fix Targets The Root Cause

Explanation

The check applies only when the PR title starts with "fix". The provider-reported title is "Connect phones by scanning or entering one Host address", which does not start with "fix". The check is therefore inapplicable, and it passes without a root-cause assessment. The PR is a feature change (phone pairing consolidation and Host address sign-in), and the linked issues (#4900, #4962) describe new functionality rather than a defect fix. No code inspection was needed to decide applicability.

Full details: Consistent With Adrs And Existing Features

Explanation

Summary: The PR (#4927, author DoodleBears, head codex/4900-mobile-owner-sign-in into main) does not contradict an accepted ADR and does not add a duplicate implementation of an existing module. The check applies because the PR changes behaviour. Evidence, scoped to the PR diff against its true base 04a2358 (the local main ref 011f35c is stale, so the wider diff is not used): 1. ADR contradiction: docs/adr/ holds nine ADRs (0353–0361). None covers pairing, sign-in, Noise, Host discovery or member credentials. The PR does not change docs/adr/. The related decisions live in docs/decisions/connections.md and team-mode.md. The PR adds a decision paragraph to connections.md (+2 lines) for HTTPS address sign-in with signIn.password, one unified password attempt per channel, and no username enumeration. That paragraph matches the code. The team-mode.md "Host password sign-in" section already existed at the PR base. Nothing the PR does contradicts it. Explicit approval for QR and pasted pairing is kept, and the fingerprint check before sign-in is kept. 2. Second implementation: the PR reuses or consolidates existing code rather than adding parallel copies. - packages/host-client/src/team-sign-in.ts: addressInvitation previously fetched /botharness-device/channel inline. It now calls the shared discoverSignInHost from sign-in-discovery.ts. - packages/host-client/src/password-sign-in.ts (new) reuses ownerSignInRefusals, withPasswordSignInChannel, signedOwnerHost and discoverSignInHost from owner-sign-in.ts, and signedMemberHost from team-client.ts. - packages/core/src/team/member-auth.ts: the PR extracts signInMemberGrant and ownerPasswordIdentity. signIn, signInOwnerDevice and the new signInPasswordDevice all call these helpers. The new unified entry point is required by the accepted design, and the legacy owner-sign-in and team-sign-in paths stay in use (devices.ts, cli-device-client.ts). - apps/mobile/app/pair/tailscale.tsx: at the PR base it held its own CameraView scanner. It now renders the shared PairScanner from src/ui/shell/pair-scanner.tsx, and app/pair/index.tsx also uses it. The PR removes the duplicate instead of adding one. - Pre-existing cloud scanners in join-screen.tsx and services-screen.tsx are unchanged and serve a different flow. Residual observation, not a failure: the PR keeps owner-sign-in and team-sign-in alongside the new password-sign-in path. The accepted design says these legacy message types remain unchanged, so this is intended. Prior standing FAIL: its details are unavailable. I checked both failure conditions directly against the current state (ADR contradiction and duplicate implementation), and neither is present. Prior failure refuted: The prior FAIL gave no specific claim (details unavailable). Checked both failure conditions on current code. (1) No docs/adr/ ADR covers pairing, sign-in or Noise, and the PR does not touch docs/adr/. The PR adds a matching decision paragraph to docs/decisions/connections.md. (2) No duplicate implementation: team-sign-in discovery now uses shared discoverSignInHost; password-sign-in reuses own...

Full details: Product Terms Follow The Glossary

Explanation

The PR adds user-visible copy that uses glossary Avoid words for two product nouns. The check covers the 12 phone-pairing commits (f2c1a5e^..HEAD) and the PR description. 1. Host Connection Route. GLOSSARY.md lists "Host (for an address)" under Avoid. GLOSSARY.zh.md lists "以 Host 指代地址" (use Host to mean an address). The PR adds "Or paste a link or Host address" (EN) and "或粘贴链接、输入 Host 地址" (zh) in apps/mobile/src/features/environments/pairing-strings.ts (lines 25 and 287 at HEAD). The field accepts an HTTPS address that reaches a Host, which is a Host Connection Route. The PR title ("…entering one Host address") and the PR description ("输入 Host 地址") use the same term. Preferred term: "Host Connection Route" (zh 连接线路), for example "Or paste a link or connection route" / "或粘贴链接,或输入连接线路地址". 2. Remote Host and Environment. GLOSSARY.md lists "Computer, other computer, machine, server, peer" for Remote Host, and "computer, 电脑, machine, device" for Environment. The PR adds copy that calls the paired Host "the computer" or "电脑": apps/mobile/src/features/team/strings.ts line 295 ("No approval on the computer"), 296 ("Approve on the computer"), 301 (approveHint: "在电脑上打开配对码并扫码…在电脑上批准这台手机"), 310 ("无需在电脑上确认"), 311 ("在电脑上批准"), 313, and 316 ("在它的电脑上打开配对码"). Preferred term: "Host" (glossary term "Remote Host", zh UI 远程), for example "Approve on the Host" / "在 Host 上批准". Not counted: "username" and "用户名" are not Avoid words for the sign-in credential. The glossary defines Member Credential as a local username and password. Pre-existing lines outside the diff were not counted. Previous standing FAIL: its details are unavailable. This verdict rests on the current copy, and the same concern still applies.

Resolution

Change the added copy so it uses glossary terms: - apps/mobile/src/features/environments/pairing-strings.ts (lines 25, 287): replace "Host address" / "Host 地址" with "Host Connection Route" wording (zh 连接线路). - apps/mobile/src/features/team/strings.ts (lines 295, 296, 301, 310, 311, 313, 316): replace "the computer" / "电脑" that refers to the paired Host with "Host" (or "Remote Host"; zh UI 远程). - Update the PR title and description to use the same terms. - Update any test assertions that match the changed strings.

Full details: Touched Features Are Verified

Explanation

Two mapped features have runtime changes from this PR, and the verification notes name neither a run of their journeys nor a reason they were not run. Scope: The local range 011f35ce..HEAD holds 108 commits. Twelve commits carry no other PR number. I treated those as this PR's own commits. The changed files in those twelve commits were matched against every ## Sources glob in .agents/skills/verify-deepseekbot/features/. Mapped features touched by this PR: 1. phone-pairing: Satisfied. The PR runtime changes touch apps/mobile/app/pair/*, connect-input.ts, pair-scanner.tsx, native-carrier.ts, and packages/core/src/devices/pairing.ts. The PR adds the journey "Owner sign-in over HTTPS (#4900)". The PR description names an Android emulator run of that journey, with a result for each step. It gives a reason for the missing iOS run (12 GB free disk, below the build limit). 2. team-mode: Satisfied. The PR changes packages/core/src/team/{devices,member-auth,service}.ts, packages/host-client/src/sign-in-discovery.ts, and team-client.ts. The PR description names a run of the M15 security suite (e2e-team-security.mjs) at the Host commit. It gives reasons for the gaps: B2 skipped the Shell probe, and four engine checks were blocked by signed-out engines. 3. remote-hosts: Not satisfied. The PR changes packages/host-client/src/owner-sign-in.ts (+78/−36) and sign-in-discovery.ts (+13/−3). The journey "Standalone Owner password sign-in (#4898)" needs two Profiles, Team mode off, and an Owner Client Add remote over HTTPS. The PR notes cite only host-client unit tests and a live discovery probe that returns signIn: {"password": true}. They do not name this journey and give no reason it was not run. 4. phone-multiple-hosts: Not satisfied. The PR changes apps/mobile/src/host/host-session.ts (+54). The journey needs two isolated QA Hosts and native qualification, and it states that a component test does not establish native behavior. The PR notes cite only host-session-multiple.test.ts runs. They do not name this journey and give no reason it was not run. The FAIL rests on remote-hosts and phone-multiple-hosts. The full range also touches many other features, so the result would not improve if every commit counted. A previous FAIL with unavailable details is standing. This independent review reached the same result on the current PR state.

Resolution

  1. remote-hosts: Run the journey "Standalone Owner password sign-in (#4898)" against the changed owner-sign-in.ts and sign-in-discovery.ts paths. Record the run in the PR verification notes. If the run is not possible, record the reason in the PR notes. 2. phone-multiple-hosts: Run the journey "Mobile multiple paired Hosts — Chats and Activity (#2782)" for the changed host-session.ts path, on two QA Hosts. Native qualification is required by that journey. Record the run, or give a specific reason it was not run (for example, native QA pending), in the PR verification notes. A unit test run does not satisfy this journey. 3. Re-run this check after the PR notes are updated.
  • 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

@DoodleBears DoodleBears added harness:codex model:gpt-6.2-sol Code authored by GPT-6.2 Sol needs-human A human maintainer must decide whether to merge this PR labels Nov 22, 2026
@DoodleBears
DoodleBears marked this pull request as draft November 22, 2026 07:31
@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Human merge required (needs-human)

The current diff and author have no active TB11 trigger. The existing label stays in place for a maintainer.

Merge policy

@DoodleBears

Copy link
Copy Markdown
Contributor Author

Download the mobile Owner sign-in review explainer. It covers the HTTPS and Noise sign-in flow, grant storage, and review steps for head 913b7db067e8408950c87ad78aba1b024423d918. The Expo Web captures cover the pairing menu and form layout. Android and iOS native checks and Human acceptance remain pending.

Base automatically changed from codex/4898-pr-prep to main November 22, 2026 16:34
BotHarness and others added 4 commits November 23, 2026 02:21
Issue: #4900

Agent-Task: codex/local/01a1ff25-bf04-7871-9287-3625c3cb9dcd
Issue: #4900

Agent-Task: codex/local/01a1ff25-bf04-7871-9287-3625c3cb9dcd
Issue: #4900

Agent-Task: codex/local/01a1ff25-bf04-7871-9287-3625c3cb9dcd
First setup and Add computer already share one Pair menu. Its six
methods were one flat list with three repeated icons. Private
connection and the account now come first, joining someone else's
Host has its own group, and Wi-Fi, Tailscale and Owner sign-in sit
under Advanced methods as on desktop. Each method gets its own icon.

Issue: #4900
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BotHarness and others added 6 commits November 23, 2026 02:39
Issue: #4962
Agent-Task: codex/t3/thread:delegated-task:command%3Amcp%3A3a18d807-9047-4b07-bed3-5995619cdc9c%3Adelegate-task%3A06bb3537-673f-45fa-a036-9912c9d03a3e
Issue: #4962
Agent-Task: codex/t3/thread:delegated-task:command%3Amcp%3A3a18d807-9047-4b07-bed3-5995619cdc9c%3Adelegate-task%3A06bb3537-673f-45fa-a036-9912c9d03a3e
Password sign-in collapsed these member refusals into a generic denial.
The phone already explains both, so pass them through.

Issue: #4962
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone Pair screen now offers two ways in: scan or enter, and
Tobs account sign-in. One field accepts a pairing link, an invitation
link or a Host address. An address shows the Host fingerprint beside a
single username and password form, and the Host decides whether the
person signs in as its Owner or a member. A Host without password
sign-in sends the person back to scan a pairing code before any
password is asked for. The separate Owner form and the per-route menu
rows are gone.

Issue: #4962
Refs: #4900
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The connect screen is now the first Pair screen, so the optional name
field moved out of the way until it applies. Hosts can still be renamed
later in the Host look editor.

Issue: #4962
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue: #4962
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DoodleBears DoodleBears changed the title Add HTTPS Owner sign-in on iOS and Android Connect phones by scanning or entering one Host address Nov 22, 2026
Android draws the field label inside the field, so the separate heading
repeated it.

Issue: #4962
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a Host address, the phone asks whether to sign in with a username
and password or to approve on the computer. Approval guides the person
to open and scan the pairing code; an address-only pairing window is
tracked in #4976. The Host fingerprint moves behind a disclosure on the
password form, so it no longer reads as a step password sign-in needs.

Issue: #4962
Refs: #4976
Agent-Task: claude-code/t3/b210abc1-d233-47f1-b85f-185fb6a9aee6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

harness:claude-code harness:codex model:claude-opus-5-5 model:gpt-6.2-sol Code authored by GPT-6.2 Sol needs-human A human maintainer must decide whether to merge this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

手机连接:扫码或输入一个入口,Host 决定登录方式 Remote Host 账密登录 T3:iOS 和 Android 通过 HTTPS 添加 Host

1 participant