Vectrum
Sign In

Document the Android companion app

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JjohannSocommitted 1 parent 13c8435commit8465e48

Showing 2 changed files with 75 additions and 0 deletions.

+14−0README.mdView File
@@ -209,6 +209,11 @@ Gruvbox, Rosé Pine, Solarized and Dracula.
209209 with settings that differ from yours, a dialog asks whether to give it your settings or
210210 leave its own as they are. The connection is a WebSocket guarded by the key but not
211211 encrypted, so use it on trusted networks or over a VPN.
212+ - An Android companion app ([`android/`](android/README.md)), in Kotlin and Jetpack Compose:
213+ a remote client that looks like the desktop, in the same themes. Pair it by scanning the QR
214+ code under Settings → Connections; the sidebar, threads, composer and its pickers,
215+ approvals and questions, diffs, settings, terminals and the Device panel work from the
216+ phone, on the desktop's agents and files.
212217 - A settings view (Ctrl+, or **Settings** in the sidebar), laid out like T3 Code's: a
213218 search field over the pages (press `/` to search, ↑/↓ and Enter to jump to a setting,
214219 which scrolls into view and pulses), a "Settings / Page" breadcrumb, and every setting as
@@ -355,6 +360,15 @@ version not tagged yet, and a read & write API token in `VECTRUM_TOKEN` or
355360 `VECTRUM_URL` (`https://vectrum.cc`) and `VECTRUM_REPO` (from the origin remote) pick where
356361 it goes.
357362
363+ ### Android
364+
365+ `cd android && ./gradlew :app:assembleDebug` builds the companion app into
366+ `android/app/build/outputs/apk/debug/` (`assembleRelease` for a shrunk build, signed with the
367+ debug key until there's an upload key). It needs JDK 21 and the Android SDK (platform 37) in
368+ `ANDROID_HOME` or `android/local.properties`. The themes come from the desktop's palettes:
369+ after changing them, `cargo test export_android_themes -- --ignored` rewrites
370+ `android/app/src/main/assets/themes.json`.
371+
358372 ## Layout
359373
360374 - `src/claude.rs`: spawns and owns the agent process, `claude`, `pi` or `jcode api --stdio`
+61−0android/README.mdaddedView File
@@ -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).