Relay
OfflineStart the relay before sockets can connect.
The repo includes a remote inspector path built on the WebSocket bridge transport.
Interactive example
Simulate the relay-backed host and inspector apps to see how remote commands become local snapshot updates.
Relay
OfflineStart the relay before sockets can connect.
Host app
DisconnectedThe host owns the real controller and MSW runtime.
Inspector app
DisconnectedThe inspector mounts a React panel against a bridge client.
pnpm dev:example-remote-relayThe relay defaults to ws://localhost:4197.
pnpm dev:example-reactThe host app mounts a local MswPanel against a bridge client backed by BroadcastChannel. The WebSocket bridge to the remote relay is opt-in — it only activates when VITE_MSW_PANEL_RELAY_URL is set in the environment.
pnpm dev:example-remote-inspectorBy default, both host and inspector connect to the example-react session on the relay.
Set VITE_MSW_PANEL_RELAY_URL when starting the host app to activate the WebSocket bridge:
VITE_MSW_PANEL_RELAY_URL=ws://localhost:4197 pnpm dev:example-reactTo connect to a different relay, point either app at its URL with this variable.