Repository navigation
Description
Parent: #1643
Problem Statement
Away from the computer, the Human has no comfortable way to talk to their PersonaBots. The Web Client technically opens in a phone browser through a tunnel, but it is a desktop layout: small touch targets, the keyboard covers the composer, scrolling and back gestures do not feel native, and the session dies whenever the tab is reclaimed. The Human wants a real app.
Solution
An Expo React Native app, "DeepSeekBot", that connects to the Human's paired computer and opens on the Roster. Tapping a PersonaBot opens the Human–PersonaBot DM as a native chat: history loads instantly from cache and the Host, the Bot's reply streams in live, the composer sits above the keyboard, and Markdown renders natively. Anything the app does not yet do natively opens in the full Web Client inside the app.
User Stories
- As the Human, I want to install DeepSeekBot on iOS and Android, so that I can reach my Bots from my phone.
- As the Human, I want the first launch to ask me to pair with my computer by scanning a QR code, so that setup takes seconds.
- As the Human, I want the app to remember my computer and reconnect on launch, so that I do not pair again.
- As the Human, I want to see whether the app is connected, reconnecting, or cannot reach my computer, so that I know whether my message will be delivered.
- As the Human, I want a clear "your computer is offline or unreachable" state with the route it tried, so that I know to check the computer or Tailscale.
- As the Human, I want the Roster of my PersonaBots and Channels with their live state, so that I can see who is working.
- As the Human, I want PersonaBot avatars and display names exactly as on the computer, so that the phone feels like the same product.
- As the Human, I want unread indicators on the Roster, so that I know where new replies are.
- As the Human, I want to open a Human–PersonaBot DM and see its recent messages immediately, so that I can pick up where I left off.
- As the Human, I want to scroll back through older DM history with smooth paging, so that I can find earlier context.
- As the Human, I want to send a text message to a PersonaBot, so that I can give it work from my phone.
- As the Human, I want my sent message to show pending, then committed, then failed with retry, so that I trust delivery.
- As the Human, I want the Bot's reply to appear live while it is being written, so that the phone feels as responsive as the desktop.
- As the Human, I want Markdown, code blocks, links and lists rendered natively and selectable, so that replies are readable and copyable.
- As the Human, I want the composer to stay above the keyboard and grow with my text, so that typing feels native.
- As the Human, I want native back-swipe, pull-to-refresh and haptics, so that navigation feels like a real app.
- As the Human, I want light and dark mode following the system, so that the app matches my phone.
- As the Human, I want Chinese and English UI following the system language, so that the app matches the Web Client's zh/en support.
- As the Human, I want an "Open full client" action on any screen, so that I can reach settings, memory, the marketplace or Session details that are not native yet.
- As the Human, I want the full client inside the app to be already signed in with my paired device, so that I do not log in twice.
- As the Human, I want the app to resume the live stream after coming back from background, without losing or duplicating messages, so that I can switch apps freely.
- As the Human, I want message history cached on the phone, so that the DM opens instantly and stays readable offline.
- As the Human, I want to unpair from the app's settings, so that I can clear the phone.
- As the Human, I want attachments shown with a placeholder and an "open in full client" action in v1, so that nothing is silently hidden.
- As a BotHarness developer, I want the app in the monorepo as a workspace package that shares Channel/roster frame types with the Host, so that protocol drift is a type error.
Implementation Decisions
- App workspace: a new Expo app in the monorepo's
apps/*, using Expo Router (or the navigation stack t3code uses) and EAS for builds. Before committing to the toolchain, verify Expo/Metro with this pnpm workspace (pnpm 12,linkWorkspacePackages) and record anynode-linker/hoisting requirement; t3code runs Expo inside a pnpm monorepo and is the reference. - Reference implementation: t3code
apps/mobilefor structure, list virtualization (@legendapp/list), native Markdown text, composer, connection state, secure storage and camera pairing. Copied code keeps its MIT notice. - Host client module (one deep module inside the app): owns the route list, credential, unary bridge calls and Remote stream subscriptions, reconnection with last cursor, and connection state. Screens never talk HTTP directly.
- Reads: Roster via the typed roster stream; DM history and live tail via the typed Channel stream (
followChannel) and the existing Channel timeline paging methods (ADR-0181, ADR-0179). Stream reconnection resumes from the last revision so nothing is lost or duplicated. - Writes: sending a Human DM uses the same bridge method and receipt semantics as the live CLI
send/send-statusverbs (ADR-0159): idempotent message id generated on the phone, pending → committed → failed. - Carrier: the app speaks the DSH Remote stream protocol on its WebSocket. If that protocol is too unstable to depend on from outside the Web Client, use the kept SSE route (
/api/botharness/stream) for v1 and record the decision. This choice is the first thing the tracer bullet settles. - Authentication: uses the paired-device credential from the pairing spec. Until that lands, the first tracer may use the launch-token login over a tailnet HTTPS route exactly as the live CLI does, clearly marked as development-only.
- Full-client fallback: an in-app WebView loading the Host's Web Client on the current route with the device's authority, opened as a modal screen, not as the app's main surface.
- Local cache: a small on-device cache of Roster and recent Channel pages keyed by Channel revision; it is a cache, never an authority, and is cleared on unpair.
- Design: native components first; colors and type tokens derived from the DeepSeekBot design tokens (ADR-0194) so the phone and Web Client read as one product.
Testing Decisions
- Good tests exercise the app's Host client module through its public interface against a fake Host that speaks the real wire shapes (recorded from a live isolated Host), covering: connect, Roster baseline + update, DM page load, send with receipt, stream drop and resume without loss or duplicates, credential refused.
- Component tests for the DM screen's message states (pending/committed/failed/streaming) using React Native Testing Library; t3code's mobile component tests are prior art.
- One tracer acceptance on a physical device against a real isolated Host (
scripts/dev-instance.mjs) over Tailscale HTTPS: send a uniquely marked DM, see a real PersonaBot reply stream in, background the app, resume, verify no duplicates. Capture a screen recording for the PR.
Out of Scope
- Human Inbox, approvals, questions and push (workstream 3).
- Group Channels, Activity Center, memory, settings, marketplace and DSH Session history as native screens (reachable through "Open full client").
- Sending attachments, voice input, tablet layouts, widgets, Live Activities.
- App Store / Play Store release process beyond internal EAS builds.
Further Notes
The first slice is a tracer bullet: pair (or dev token login) → Roster → one DM → send → live reply, on a real phone and a real Host. Pause for Human QA on device before broadening.
Activity
DoodleBears commentedon Oct 17, 2026
Human-authorized issue reconciliation (2026-10-18). The native foundation, DM, paired full client and initial remote-viewer slices are implemented in main (#1661 / #1665 / #1671 / #1817). Remaining performance refinement is tracked by #1845 / #2028. Closing this delivered foundation specification per Human instruction.