Repository navigation
feat(remote-control): self-hosted remote control server and web/mobile app - #7
Conversation
…e app Replace Warp's hosted (paid) session-sharing / "Remote control" service with a server users run themselves. - crates/remote_control_server: `synth-remote-control-server`, an axum implementation of the public session-sharing-protocol (create, resume, join, event log replay, role-checked viewer input, size caps, reaping) with shared-token auth and same-origin websocket checks. - Embedded PWA: dashboard of every shared terminal across machines, and an xterm.js remote that runs commands at an idle prompt and types into running programs (CLI agents), with a mobile key bar and viewer-driven PTY sizing. xterm.js 5.5.0 + fit addon vendored (MIT). - Client: SYNTH_WARP_REMOTE_CONTROL_URL / _TOKEN re-enable sharing on OSS builds without a Warp login or ACL dialog; Warp hosts are refused. SYNTH_WARP_REMOTE_CONTROL_ALL_TERMINALS=1 shares every terminal on its first bootstrap without clobbering the clipboard or confirming closes. Self-hosted shares skip the local-inactivity revoke/end timer. - Spec, operator guide, FAQ and fork docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjzGqX8oGNquhmAvzCNjxR
…restart - The web app wrote PtyBytesRead payloads verbatim, but sharers send each batch as an LZ4 block with a prepended size, so the browser showed garbage. Decode it (verified against frames from a real warp-oss). - In share-all mode, a rejected resume (server restarted or session reaped) now starts a fresh share instead of an error toast, so terminals return to the dashboard on their own. Verified end to end: warp-oss under Xvfb auto-shares each new tab with no Warp login; the web app runs a command, types into a running program, sends ^C; a server restart re-shares the terminal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjzGqX8oGNquhmAvzCNjxR
Run ./script/format, which groups imports by module (imports_granularity=Module, group_imports=StdExternalCrate). Plain rustfmt left them split, failing the "Formatting + Clippy" CI check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjzGqX8oGNquhmAvzCNjxR
|
CI status for the first run ( This PR's failure, fixed in
Not caused by this PR (none of the failing code is in this diff; no fix exists yet)
I'll put these to the repo owner as a separate CI-fix PR rather than widen this one. Generated by Claude Code |
|
Update for Clippy fails on 3
All three are called only from I reproduced it locally with No fix exists yet. The proposed fix is to call Generated by Claude Code |
|
On The command is Two ways out:
This is CI configuration you're actively changing on this branch, so I haven't pushed either one. Generated by Claude Code |
|
Reopening to trigger fresh CI run |
# Conflicts: # app/src/terminal/shared_session/sharer/network.rs # docs/log.md
|
CI status on head On the first attempt, Formatting + Clippy (Linux and wasm), Misc checks, the Linux, Windows and wasm release builds, and eval features all passed. "Run Linux tests" was killed by a runner shutdown signal while it was still compiling. The macOS and Windows jobs were cancelled. A queue that sits this long is usually an Actions-side limit, not this PR. Things to check:
I'm not re-running it again; my one re-run is spent. Once a runner picks it up, I'll fix any failure that comes from this PR's code. Generated by Claude Code |
Description
Lets you remote-control every terminal from a browser or phone through a server you run yourself, with no Warp account. Warp's hosted sharing server and web viewer are closed and paid, but the protocol (
session-sharing-protocol) and the client-side sharing code are already in this repo. So this PR adds a server that speaks that protocol, plus a few client switches.New:
crates/remote_control_server(synth-remote-control-serverbinary)Client
SYNTH_WARP_REMOTE_CONTROL_URLandSYNTH_WARP_REMOTE_CONTROL_TOKENenable sharing to that server with no Warp login and no Warp permissions dialog.warp.devaddresses are refused.SYNTH_WARP_REMOTE_CONTROL_ALL_TERMINALS=1shares every terminal when it starts. In that mode the link isn't copied to the clipboard, closing a tab doesn't ask for confirmation, and a rejected resume (server restarted or session reaped) starts a fresh share instead of showing an error.Docs: spec in
specs/self-hosted-remote-control/, setup guide indocs/guides/self-hosted-remote-control.md, and an FAQ entry.Known limitations
ws://is only for a trusted LAN or Tailscale. Anywhere else, put it behind HTTPS; the guide has a Caddy example.Linked Issue
There's no tracking issue; this was requested directly in a session. The spec is in
specs/self-hosted-remote-control/.ready-to-specorready-to-implement.Testing
remote_control_server: 18 unit tests and 2 tests over real WebSocket connections pass.cargo clippy -D warningsandrustfmtare clean forremote_control_server,warp_coreandwarp(lib andwarp-ossbin).End to end with a real
warp-ossbuild under Xvfb and auto-share on:cat, and stopped it with ^C, and all of it showed on the desktop;That run caught a real bug: the client sends PTY output as LZ4 blocks with a size prefix, so the web view first showed garbage. The fix decodes it and was checked against frames captured from the real app.
The
warplib test binary was killed for lack of memory in the 15 GB build container. I ran the two newself_hostedtests word for word in a separate small crate instead, and both pass. CI should run them in place.I have manually tested my changes locally with
./script/run. (Tested withwarp-ossunder Xvfb in a cloud container, not./script/runon a desktop.)Agent Mode
CHANGELOG-NEW-FEATURE: Remote-control your terminals from a browser or phone through a self-hosted server, with no Warp account.
Generated by Claude Code