Status: AVAILABLE (internal). Every Allternit Desktop and cloud computer runs the phone-remote server (surfaces/phone-remote/server) on 127.0.0.1:8477. The Desktop app starts and supervises it (surfaces/allternit-desktop/src/main/phone-remote-manager.ts). The Fabric desktop viewer and the phone remote proxy /hello and /frame to it; a phone viewer connects over WebSocket.

When it captures

Capture runs only while someone wants frames:
  • It starts when a viewer connects, or on a /hello, /start or /frame request. The first /frame waits up to 3 seconds for a frame and answers 503 no frame if none arrives (poll again).
  • It stops after 15 seconds with no viewer connected and no request, and drops its cached frame, so nobody is served an old screen.
Until 2026-10-07 capture ran for the whole life of the process. On a Linux cloud computer that meant about ten screenshot processes a second with nobody watching, which slowed small computers and loaded their host.

How it captures

On macOS the sc_capture helper is compiled with swiftc the first time capture runs, because the build does not ship it. Inside Allternit Desktop it is compiled into ~/Library/Caches/com.allternit.desktop/phone-remote/<source hash>/, never into the app bundle: a file added to the bundle breaks the app’s code signature (codesign --verify reports “a sealed resource is missing or invalid”). A changed helper source gets a new folder, so an app update rebuilds it. ALLTERNIT_CAPTURE_CACHE moves the folder. Outside the app (a dev checkout, a cloud computer image) it is still built next to its source. On macOS a watchdog requires a frame at least every 5 seconds while capture runs. If frames stop, the server restarts the helper once, then exits so the Desktop app restarts it. /hello reports stale: true with an error when capture is dead.

Where the change ships

The server is part of the Desktop app bundle, not a runtime package. Desktop users get changes with the next app build; cloud computers get them with the next cloud computer image.