feat(android): native phone app for Remote Access - #292
Open
BigWebstas wants to merge 8 commits into
Open
BigWebstas wants to merge 8 commits into
BigWebstas wants to merge 8 commits into
Conversation
1 of 2 tasks
A Kotlin/Compose client for the Connect Phone API in android/. - Connect by QR code or link, pair with the desktop PIN, and link several computers, each with its own pairing - Agent list with minimized tasks, usage meters (when the desktop serves /api/mobile/usage), pull to refresh, and a home-screen widget - Swipe sideways between open tasks, with the position in the header - Terminal: desktop colors, lazy rendering, reliable follow (optionally always jump to the latest), quick keys, quick replies, voice input, and an opt-in mode that sizes the PTY to the phone - Changes tab with per-file diffs, notes, new tasks, and closing tasks with the desktop's warnings - Built-in chat tasks: transcript, approvals and questions, send / stop - Optional notifications when an agent needs input, errors or finishes - Obsidian dark and light themes, splash, themed icon, predictive back, animations and haptics; release builds shrink with R8 Desktop support: - POST /api/mobile/tasks/:id/close (paired) and GET /api/mobile/tasks/:id/diff (view-only and paired), renderer-backed - `view-size` socket message: a paired phone may size a terminal while viewing it; the desktop's size returns on release or disconnect - Subscribing sends a rendered snapshot with up to 1000 lines of history (@xterm/addon-serialize over the existing headless mirror) - Minimized tasks appear in the phone's agent list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BigWebstas
force-pushed
the
feat/android-phone-app
branch
from
September 29, 2026 23:38
93175ca to
f8ed67b
Compare
Settings -> Widget now sets how opaque the home-screen widget's card is (100/75/50/25%) and what color it is (Obsidian, Slate, Light). The fill and border are one color faded together, and each card carries text colors that stay readable, so a light card gets dark text. Both settings push to placed widgets immediately instead of waiting for the next publish, and Settings previews the real card at the chosen transparency. RemoteViews can only set a background from a resource, so the stops are shape drawables: three colors by four stops. A contrast test keeps each palette's text on its own card at or above the 4.5:1 WCAG AA floor; it caught Slate's timestamp color at 4.1:1, now lightened.
Add a Diff tab to the phone UI and merge/close actions behind a read-only readiness dialog. Diffs come from the renderer's own loadTaskDiff rather than the MCP coordinator: Coordinator.tasks only tracks delegated sub-tasks, so the coordinator route would 404 for phone-created and ordinary desktop tasks. Readiness reuses the desktop's pure buildMergeReadiness so both surfaces agree on what blocks a merge. Read routes (diff, readiness) follow notes and accept the view-only token; merge and close run real git and require the PIN-elevated paired token. All task ids are rejected at the boundary when they name a prototype-chain key.
Add a Merge action beside Close on the agent screen, opening a dialog that renders the desktop's own merge-readiness checks read-only and gates the confirm button on them. A blocked verdict disables merging; a warning does not, so someone away from their desk can still merge with eyes open. canMerge defaults to false when the field is missing, so an unreadable reply can never enable a git write.
The phone app now offers the same 15 looks as the desktop instead of its own Obsidian/Light pair. Appearance in Settings picks a look with a live swatch, and the theme (follow system, always dark, always light) chooses the tone, with the dark and light look remembered separately so a theme switch brings the matching look with it. LookPalettes.kt is generated from the sources the desktop already keeps its looks in: src/lib/look.ts for ids, labels, order and tone, src/styles.css for the colors and radius scale, and src/lib/theme.ts for the terminal ANSI palettes and look pairings. The generator resolves each preset's full cascade (no phone-side fallbacks), flattens radial-gradients to their middle stop, and falls back to the muted Noir ANSI set for dark looks the desktop leaves on xterm defaults. LookPresetsTest pins the default Obsidian values so a new desktop theme cannot quietly change the out-of-the-box appearance. npm run generate:android-looks rewrites the file and npm run check:android-looks fails when it drifts; the Kotlin tests run the same check.
…/android-phone-app Brings the desktop's 15 look presets to the phone (Settings → Appearance), with LookPalettes.kt generated from src/lib/look.ts, src/styles.css and src/lib/theme.ts so the two stay in step. Touches Screens.kt alongside the phone diff review and task lifecycle work already on this branch.
A task with git isolation 'none' edits the project folder in place, so it has no branch or worktree of its own. handleGetDiff fell through to loadTaskDiff, which diffed the project folder against the base branch: the phone either showed a git error or, worse, listed unrelated work already sitting in the repo as if the task had made it. Answer with an empty diff and an `unsupported` flag instead, and have both phone clients say why there is nothing to compare. The flag is optional, so an older desktop that omits it still renders its diff. The Kotlin client read the response as a Pair, which had no room for a third field; fetchDiff now returns a TaskDiff parsed in one place. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Header Switch menu plus latency in the Agents subtitle when multiple computers are saved. - Terminal Stop button, Material icons for stop/history/mic and larger arrow quick keys (-> takes Tab's slot, / restored). - Send-quick-replies-immediately setting and per-agent local prompt history with a Recent-messages dialog. - Custom connection labels, editable in Settings > Computers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a native Android app (
android/, Kotlin/Compose) for Remote Access, plus the small desktop additions it relies on.Android app
/api/mobile/usage, from feat: add phone usage meters and Antigravity usage #291; hidden otherwise).Desktop support
POST /api/mobile/tasks/:id/close(paired token) andGET /api/mobile/tasks/:id/diff(view-only and paired), both renderer-backed like notes. Withoutforce, close answers 409 with the warnings instead of closing.view-sizeWebSocket message: a paired phone may size a terminal while viewing it. The desktop pane's size is remembered and restored on release or disconnect; only the phone that set the size can hand it back.@xterm/addon-serialize, pinned to the same beta as the other xterm packages), instead of the raw byte replay, which redraw-heavy agents fill with repaints of one screen. Exited agents still get the raw replay.Build and install instructions are in
android/README.md. Note: #291 also adds an earlier version ofandroid/; whichever merges second will need a rebase, and I'm happy to do it.Issues Resolved
None directly. Related to #192 (installing on Android); this offers a native app instead of the PWA.
Check List
android/README.md.)🤖 Generated with Claude Code