You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 56093be
Browse filesBrowse the repository at this point in the historyBrowse files
feat(remote-control): add Pusher sync so desktop shows overlay and refreshes iframe when mobile edits
- Server triggers remote-control-start/complete events on sandbox-${sandboxId} channel
- Desktop chat panel shows full-cover overlay while mobile agent is editing
- iFrame remounts on complete to guarantee latest preview is shown
- Mobile ChatScreen sends source: 'remote-control' to identify requests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a mobile user triggers a chat via the Remote Control package, the desktop web chat panel should show a blocking overlay ("Remote Control is editing the app"), then refresh the iframe preview once the agent completes.
6
+
7
+
## Pusher Events
8
+
9
+
Add to `packages/visual-edits/src/types/index.ts` on the existing `sandbox-${sandboxId}` channel:
10
+
11
+
-`remote-control-start` — fired when server begins processing a mobile chat request
12
+
-`remote-control-complete` — fired when server finishes streaming the response
13
+
14
+
## Server Changes
15
+
16
+
The chat API route (`apps/web/app/api/chat/route.ts`) detects mobile requests via `source: 'remote-control'` in the request body. At stream start it triggers `remote-control-start`; at stream end it triggers `remote-control-complete`.
17
+
18
+
## Web Hook
19
+
20
+
New `useRemoteControlStatus(sandboxId, onComplete)` hook in `packages/visual-edits/src/web/`:
0 commit comments