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,/startor/framerequest. The first/framewaits up to 3 seconds for a frame and answers503 no frameif 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.
How it captures
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.