Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .agents/skills/verify-deepseekbot/features/phone-pairing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Sources

- `apps/mobile/app/pair/{_layout,index,team,tailscale}.tsx`
- `apps/mobile/src/ui/shell/pair-scanner.tsx`
- `apps/mobile/src/host/connect-input.ts`
- `apps/mobile/src/host/{host-session,native-carrier}.ts`
- `apps/mobile/app/member-pairing.tsx`
- `apps/mobile/src/host/{account-pairing,pairing-image}.ts`
- `apps/mobile/src/ui/pairing-failure.ts`
Expand All @@ -16,6 +20,12 @@
- Paired Device
- Host Relationship

## Owner sign-in over HTTPS (#4900)

In the shared device QA lanes, use two isolated Hosts with separate Feed markers and trusted HTTPS addresses. On each platform, start without a saved Host, then open **Pair with your computer**, type the Host's HTTPS address into the scan-or-enter field and choose **Connect**. Choose **Sign in with username and password**, sign in with the Owner username and password, and open **View Host fingerprint** to compare it. **Approve on the computer** must show where to open the pairing code and return to the scanner. Repeat with a member username and confirm the member path continues to the password change. A Host without password sign-in must show the scan-a-code guidance before any password field. Paste an invitation link into the same field and confirm it opens member sign-in. The Host records an Owner password-enrolled device and the phone opens its Feed. Open the workspace drawer, choose **Add computer**, and sign in to the second Host through the same entry. Open each Feed and verify the markers stay scoped to their Host. Confirm a duplicate attempt leaves the original saved grant intact.

Exercise an untrusted certificate, a redirect and a changed key for a saved Host. In each case, verify the Host receives no password. Correct a wrong credential and retry with the address and username still populated. Verify QR pairing, fingerprint comparison and approval from the same menu. Repeat the form with the software keyboard and default, intermediate and maximum text sizes in both themes. Save redacted visuals for the menu and form on each platform.

## Connect desktop self-check (#4170)

In a task-owned signed-in Host, open Connections → Tobs Connect and verify automatic check progress after sign-in/connector recovery. Compare the card and `deepseekbot connect-check` with `connect-status` through the same authenticated Host. A running connector alone must remain neutral. Require relay online plus a fresh Host-pinned public encrypted handshake before success; observe checked time and copy only bounded diagnostics. Inject task-owned DNS/TLS/HTTP/handshake failures, retry after recovery, expire the observation and fail the snapshot/retry request: none may retain green success. Opening the dialog must not start extra probes. Transient public failures retry at most four attempts with 1/3/6-second waits within the same 20-second deadline; certificate/identity failures refuse immediately, including incomplete certificate chains. Handshake payloads are limited to1KiB without compression before Noise decoding. A stale checking snapshot must allow retry when no local request is active; manual requests time out after25seconds and abort on card close. Each completed check refreshes the account computer list once without closing an existing management confirmation. A health refresh that interrupts a post-revoke list read must start a replacement read and leave controls usable. Do not change production DNS, other Host bindings or device grants. Record official-service versus isolated transport-fixture proof separately; desktop self-check does not qualify every phone network or reproduce a customer fault.
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/app/pair/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function PairLayout() {
<Stack.Screen name="index" options={{ title: t.pairTitle }} />
<Stack.Screen name="account" options={{ title: t.pairChoice.account }} />
<Stack.Screen name="tailscale" options={{ title: t.pairChoice.tailscale }} />
<Stack.Screen name="team" options={{ title: t.pairChoice.team }} />
<Stack.Screen name="team" options={{ title: t.teamSignIn.hostTitle }} />
</SheetStack>
);
}
70 changes: 13 additions & 57 deletions apps/mobile/app/pair/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { useFocusEffect, useLocalSearchParams, useRouter } from 'expo-router';
import { useCallback, useRef, useState } from 'react';
import { Linking, ScrollView } from 'react-native';
import { Linking } from 'react-native';

import { cloudAvailable } from '../../src/cloud/available';
import { pairingLinkMode } from '@botharness/host-client/pairing';
import { SHEET_GROUP } from '../../src/ui/chat/sheet';
import { useDesignTheme } from '../../src/ui/design/theme';
import { space } from '../../src/ui/design/tokens';
import { Button } from '../../src/ui/primitives/button';
import { SettingsRow, SettingsSection } from '../../src/ui/primitives/settings-row';
import { Text } from '../../src/ui/primitives/text';
import { PairScanner } from '../../src/ui/shell/pair-scanner';
import { useStrings } from '../../src/ui/strings';

export default function PairChoiceScreen() {
const t = useStrings();
const theme = useDesignTheme();
const router = useRouter();
const [linkError, setLinkError] = useState(false);
const params = useLocalSearchParams<{ p?: string; account?: string }>();
Expand All @@ -41,43 +39,8 @@ export default function PairChoiceScreen() {
);

return (
<ScrollView
style={{ flex: 1, backgroundColor: theme.overlay.fill }}
contentContainerStyle={{ padding: space.x5, gap: space.x4 }}
>
<SettingsSection on={SHEET_GROUP} footer={t.pairChoice.needs}>
<SettingsRow
testID="pair-choice-private"
on={SHEET_GROUP}
title={t.pairChoice.private}
detail={t.pairChoice.privateDetail}
icon="lan"
disclosure
onPress={() => router.push({ pathname: '/pair/tailscale', params: { mode: 'private' } })}
/>
<SettingsRow
testID="pair-choice-lan"
on={SHEET_GROUP}
title={t.pairChoice.lan}
detail={t.pairChoice.lanDetail}
icon="lan"
disclosure
onPress={() =>
router.push({
pathname: '/pair/tailscale',
params: { mode: 'lan' },
})
}
/>
<SettingsRow
testID="pair-choice-team"
on={SHEET_GROUP}
title={t.pairChoice.team}
detail={t.pairChoice.teamDetail}
icon="account"
disclosure
onPress={() => router.push('/pair/team')}
/>
<PairScanner steps={t.pairChoice.connectPath}>
<SettingsSection on={SHEET_GROUP}>
<SettingsRow
testID="pair-choice-account"
on={SHEET_GROUP}
Expand All @@ -88,24 +51,17 @@ export default function PairChoiceScreen() {
onPress={() => router.push('/pair/account')}
/>
<SettingsRow
testID="pair-choice-tailscale"
testID="pair-guide-open"
on={SHEET_GROUP}
title={t.pairChoice.tailscale}
detail={t.pairChoice.tailscaleDetail}
icon="encrypted"
disclosure
onPress={() => router.push('/pair/tailscale')}
title={t.pairGuide.open}
detail={t.pairChoice.needs}
icon="open"
onPress={() => {
setLinkError(false);
void Linking.openURL(t.pairGuide.url).catch(() => setLinkError(true));
}}
/>
</SettingsSection>
<Button
testID="pair-guide-open"
label={t.pairGuide.open}
variant="text"
onPress={() => {
setLinkError(false);
void Linking.openURL(t.pairGuide.url).catch(() => setLinkError(true));
}}
/>
{linkError ? (
<Text accessibilityRole="alert" tone="danger">
{t.pairGuide.linkError}
Expand All @@ -118,6 +74,6 @@ export default function PairChoiceScreen() {
onPress={() => router.dismissTo('/cloud-services')}
/>
)}
</ScrollView>
</PairScanner>
);
}
Loading
Loading