feat(desktop): Mobile pane shows a workspace's EAS simulators
Merged
SA
17d ago+2113+2113+0123456789012345678901234567890123456789-323-323-012345678901234567890123456789
Stacked on #8280.
What it does
On a cloud sandbox the Mobile pane attaches to the EAS simulator sessions an agent started for the workspace. It only watches: it does not start or stop sessions.
- host-service (
mobile.easSessions): lists the project's in-progress sessions tagged with the workspace id, and returns the preview host, token and device for each. The Expo token stays on the sandbox; the renderer gets only the per-session preview token. - Pane: streams the session over WebRTC with the same controls, logs and tools as a local device. With more than one session, the picker lists them.
- Shared UI: the device UI moves into
DeviceView. The local hub session and the remote simulator differ only in how they connect. - Backend choice: a sandbox reports
easwhenEXPO_TOKENandEAS_PROJECT_IDare set on its environment. - Limrun is removed: the
@limrun/uipane,mobile.limrunSessionand thelimrunbackend value. Desktop 1.36.0 and 1.37.0 calllimrunSessiononly aftermobile.statusanswerslimrun, which a host with this change never does. @expo/hub-client1.2.0 → 1.3.1 (token auth, iOS-only client), exempt from the release-age rule. The renderer CSP allows the EAS simulator hosts.
How a session gets there
apps/mobile/scripts/eas-dev.sh (in #8313) starts the session from the sandbox and tags it with the workspace id. Anything that starts a session with --tag "$SUPERSET_SANDBOX_WORKSPACE_ID" shows up the same way.
Verification
- A session started on a cloud sandbox by
eas-dev.sh: the pane found it by tag, streamed our app, and a tap reached it. This ran in the local dev app with host-service pointed at that sandbox's tag. - Local iOS simulator and Android emulator panes still work on the bumped client.
- Biome,
check:i18n, the i18n tests, and typecheck of the touched code pass.
Not verified
- The pane in a desktop build that is connected to a sandbox. That needs this in a canary and a host-service bundle on the sandbox that has
mobile.easSessions.
Notes
- Released desktop builds get
backend: "eas"from a sandbox they do not know and show "No mobile simulator available". A sandbox with onlyLIM_API_KEYshows the same message in every build. - Tools are thinner on EAS than locally: simulator settings are not available there.
Summary by cubic
The Mobile pane now shows the EAS simulator sessions an agent started for a cloud sandbox workspace, streaming them over WebRTC with the same controls, logs, and tools as a local device. The pane only watches: it does not start or stop sessions.
What changed
- host-service exposes
mobile.easSessions, listing the project's in-progress sessions tagged with the workspace id along with each session's preview host, token, and device id. - Local and remote sessions render through a shared
DeviceView; a newCloudSimulatorpane polls for sessions and lets you switch among them. @expo/hub-clientgoes 1.2.0 → 1.6.0 for token auth and the iOS-only client, and the renderer CSP allows the EAS simulator hosts (*.eas-simulator.ngrok.dev).- A sandbox reports
backend: "eas"whenEXPO_TOKENandEAS_PROJECT_IDare set on its environment; thelimrunbackend,mobile.limrunSession, and@limrun/uiare removed.
Notes
- Released desktop builds don't know the
easbackend; a sandbox that reports it will show "No mobile simulator available" until the pane runs from a canary. - iOS simulator settings are not available on EAS sessions, and a sleeping sandbox does not stop the remote session — it stays billed until its idle timeout.