| @@ -0,0 +1,61 @@ |
| 1 | + # Vectrum Code for Android |
| 2 | + |
| 3 | + A companion app for [Vectrum Code](../README.md): the desktop's projects and threads on a phone, |
| 4 | + in the desktop's look and themes. It's a remote client like another desktop: threads run on |
| 5 | + the computer, with its agents, files, terminals and devices. |
| 6 | + |
| 7 | + ## Pairing |
| 8 | + |
| 9 | + On the computer, open Settings → Connections and turn on **Allow remote connections**. Then, on |
| 10 | + the phone, scan the QR code shown under **Pairing code**, or paste the code |
| 11 | + (`192.168.2.10:47823/<key>`). A `vectrum://…` link pairs too. Several computers can be paired; |
| 12 | + their threads share the sidebar, tagged with each one's name. The connection isn't encrypted, |
| 13 | + so pair on networks you trust or over a VPN such as Tailscale or WireGuard. |
| 14 | + |
| 15 | + ## What it has |
| 16 | + |
| 17 | + - The sidebar's inbox: pinned and active threads, the Working, Snoozed and Settled shelves, |
| 18 | + search, the project filter, and the thread menu on a long press (pin, settle, snooze, wake, |
| 19 | + rename, copy, delete) with the desktop's undo notices. |
| 20 | + - The transcript: Markdown, tool calls folded into **Worked for** rows, subagents, plans, |
| 21 | + questions, the changed-files card and the diff view. |
| 22 | + - The composer: model, reasoning and access pickers from the computer's agents, attachments, |
| 23 | + the `/` menu, steering and queueing, and the dock for approvals, questions, plans, queued |
| 24 | + messages, background tasks, usage limits and the task list. |
| 25 | + - New threads on any paired computer's projects, in the current checkout or a new worktree, |
| 26 | + and adding projects (a folder there, a new one, or a clone). |
| 27 | + - Settings: the computer's environment settings (with project overrides), Appearance with every |
| 28 | + theme family, Providers, Source Control, Connections, Archive and About. |
| 29 | + - The right panel: subagents, terminals (shells on the computer, in the thread's folder, with |
| 30 | + an extra-keys row) and the Device panel (the computer's emulators and simulators, streamed |
| 31 | + and controlled from the phone). |
| 32 | + |
| 33 | + Left out because the remote connection doesn't carry them: the browser panel, usage reports, |
| 34 | + `@` file mentions, editing providers and starring models. |
| 35 | + |
| 36 | + ## Build |
| 37 | + |
| 38 | + ```sh |
| 39 | + ./gradlew :app:assembleDebug # app/build/outputs/apk/debug/app-debug.apk |
| 40 | + ./gradlew :app:testDebugUnitTest |
| 41 | + ``` |
| 42 | + |
| 43 | + JDK 21 and the Android SDK (platform 37) are needed; point `local.properties` at the SDK |
| 44 | + (`sdk.dir=…`) or set `ANDROID_HOME`. |
| 45 | + |
| 46 | + ## Layout |
| 47 | + |
| 48 | + - `net/`: the desktop's remote protocol (`Protocol.kt`, mirroring `src/remote/mod.rs`) and the |
| 49 | + WebSocket that keeps a host connected (`Connection.kt`). |
| 50 | + - `data/`: the app's state as Compose state: paired hosts, their projects, threads and open |
| 51 | + transcripts (`AppState.kt`), and this phone's own preferences (`DevicePrefs.kt`). |
| 52 | + - `theme/`: MetalUI. `Palette.kt` reads `assets/themes.json`, which the desktop exports |
| 53 | + (`cargo test export_android_themes -- --ignored`), so every theme matches it exactly; |
| 54 | + `Metal.kt` has the surfaces (raised, well, plate, with the desktop's layered shadows), caps, |
| 55 | + switches, LEDs, keycaps and engraved labels. |
| 56 | + - `ui/`: `sidebar/`, `chat/` (header, transcript, Markdown), `composer/` (composer, pickers, |
| 57 | + dock, start screen), `diff/`, `settings/`, `pair/` (pairing, adding projects), `panels/` |
| 58 | + (right panel, subagents, command palette), `terminal/` and `device/`. |
| 59 | + - `term/`: the terminal emulator the terminal panel draws. |
| 60 | + - `scripts/lucide.py`: turns the desktop's Lucide icons into vector drawables (`icons.txt` |
| 61 | + lists the ones in use). |