chore(mobile): simulator verification skill, stand-in host, and host-state flows
What & why
Stacked on the never-connected host PR (mobile-host-never-connected-setup). That work was first reported as tested after one main-path pass on the simulator. The edge pass that followed found three bugs, two of them older than the branch. This makes that pass repeatable and writes down what it taught.
.agents/skills/mobile-sim-verification: the mobile counterpart tocdp-verification. What counts as evidence on a phone (the real screen, real services, an edge pass before "tested", never painting pending or failed as a negative, recordings for flashes), and how to run the local API, relay and Metro, sign in, and capture locales and text sizes. It includes the traps:wrangler devdying when a client aborts,CI=1Metro not watching files, the first bundle timing out the dev client, and the worktree's Neon branch being deleted by the daily cleanup.apps/mobile/scripts/e2e/stand-in-host.ts: registers a host throughhost.ensure, holds the relay control socket open to make it online, reads presence, and deletes it throughhost.delete. No second machine, no SQL. It refuses a non-local API.- Maestro flows:
sign-in.ymlasserted ahome-screentestID that exists nowhere and usedlaunchApp, which stops at the dev launcher, so it could not pass. It now opens the bundle by link and waits for the sign-in button to go away.host-states/plusscripts/e2e/host-states.shwalk never connected, online, offline and Try again. apps/mobile/AGENTS.md: Hermes ships a partialIntland no screen has an error boundary; pending and failed are not answers.
How I tested it
Ran sign-in.yml from a reset keychain and then scripts/e2e/host-states.sh on an iPhone 17 Pro simulator (iOS 26.5) against the local API and relay: all four stages pass, and the host is deleted through the API at the end. The flows failed three times on the way, each for a real reason that is now handled or documented: the host list is not polled, a fresh install opens on the Cloud scope, and "Cloud" shows briefly while the list loads.
bun run lint in apps/mobile passes. No product code changes.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintpasses; typecheck left to CI
Summary by cubic
Adds a mobile simulator verification skill, a stand-in host, and host-state Maestro flows so host connectivity states can be tested on the simulator without a second machine, and fixes the sign-in flow that could never pass. No product code changes.
New Features
- Adds
.agents/skills/mobile-sim-verification/SKILL.md, the mobile counterpart tocdp-verification, covering evidence rules and how to run the local API, relay, Metro, sign-in, and recordings. - Adds
apps/mobile/scripts/e2e/stand-in-host.ts, which registers, brings online, checks presence, and deletes a host through the API; it refuses non-local APIs. - Adds
host-states.shand Maestro flows that walk a host through never connected, online, offline, and Try again.
Bug Fixes
- Fixes
sign-in.yml, which previously usedlaunchAppand asserted a nonexistenthome-screentestID; it now opens the dev bundle by link and waits for the sign-in button to disappear. - Adds
apps/mobile/AGENTS.mdnotes that Hermes ships a partialIntland that pending or failed query states are not answers.