Preserve confirmed activity content across background suspension, use state-aware freshness windows, and recover stale push registrations in foreground without replacing server-owned aggregates.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Replace partial Home counting with the shared versioned task-activity API and push summary. Add native Android badge-only handling and installation capability registration.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Cindy <cindy@Cindys-Mac-mini.local>
Restarting or taking over a Metro on 8081 could accept the old server's
/status answer and keep its soon-deleted log, ending in BUNDLE_NOT_SEEN.
Readiness now needs the ownership record to name a new process whose log
exists.
A booted device pointed at a port outside the scanned 8081-8086 range
looked idle; the device's actual port is now probed, and a failed probe
counts as busy.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Agents had to chain boot, Metro, rebuild and whoami themselves, and after
one step failed they kept reporting the phone app as unbuildable. The new
command picks a device without disturbing other tasks (several candidates
make it ask instead of guessing), boots it, reuses or starts this
worktree's Metro (on a free port when 8081 belongs to another task),
installs the matching native app, launches it, waits for the bundle,
brings it back to the foreground when the system pushed it behind after
boot, and checks identity. It reads the Metro log sim-start records and
keeps its own output in the system temp directory, never in the worktree.
It can be rerun after the device idles off, and always ends with one JSON
line giving a code and the next step.
The root AGENTS.md module table now routes "seeing changes on the phone"
to the Mobile docs; the command and the rule that only a fresh run's code
counts as evidence live in docs/dev-rules/mobile-development.md.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
sim-start now handles SIGINT/SIGTERM/SIGHUP by forwarding them to Metro, so
the launcher stays alive for Metro's exit callback instead of dying first.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Read the log directly instead of checking existence first; a failed read now
reports unknown rather than throwing.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Each Metro launch writes its log in a fresh mkdtemp directory recorded in the
port owner record, so logcheck only reads that launch's log and never a
predictable path. Short writes discard the log like failed ones. device-link
warnings are no longer known: relay errors can hide auth failures.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
On Windows the spawned child is only the pnpm/cmd wrapper. Reuse the
tree-aware terminateMetro path and wait for it before exiting.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Only the three observed missing-listener events are known warnings. sim-start
registers log cleanup before writing the owner record, and stops Metro and
removes its log when that write fails.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
The raw output may carry credentials and logcheck already rejects a stopped
Metro, so sim-start removes the log on child exit and on spawn errors.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
Metro output can carry credentials, so the captured log now lives under the
system temp directory, one folder per worktree, instead of apps/mobile/logs.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
When a write fails and the directory forbids deleting, the truncated log has
no launch header, so logcheck reports unknown instead of passing on a
partial log.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
sim-start writes a launch id into the log header and the Metro owner record
(null when the log could not be created). logcheck reports unknown unless
they match, so an old log that could be neither replaced nor deleted cannot
pass.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
A Metro log that lost output (disk full, cannot open, cannot be recreated)
is deleted so logcheck reports unknown instead of passing on partial
content. quietDevLogs no longer installs on import, so its test loads the
module once as the test hygiene guard requires.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
sim:start now writes Metro output to apps/mobile/logs/metro-<port>.log, and
mobile:sim:logcheck reports what happened after the latest entry bundle: ERROR
and failed bundles fail, unlisted warnings must be reported, and an unknown
state is not a pass. Add the check to the simulator verification rules.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(mobile): keep simulator tests on Cindy's simulator while it is available
An idle Cindy simulator made whoami and rebuild silently pick a system device,
so a task could run on the wrong backend without any signal. Stay on Cindy until
the plugin is unavailable or a --udid names another device, report the reason
and reusable devices, and flag the system simulator while Cindy's is available.
Stop reporting native-missing when no exact target was probed, and align the
test workflow: occupied Cindy devices are not a reason to fall back, parallel
devices stay in the selected backend, and handoffs name the backend and model.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
* fix(mobile): fail closed when Cindy's simulator cannot be listed
A failed device listing was read as an empty one: whoami reported cindy-idle,
while rebuild and open silently moved on to a system device. Keep the failure
and stop without choosing a backend unless an exact UDID may live elsewhere.
Treat the Cindy devices directory given as an absolute path as Cindy's
simulator so it gets the same notices as CINDY_MOBILE_SIMULATOR=cindy.
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
---------
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
The simulator guide claimed the iOS debug app only ever loads Metro on 8081,
so agents concluded two worktrees could not run on two simulators at once.
React Native first reads the per-device RCT_jsLocation default and only
falls back to 8081 when that Metro does not answer.
Document how the app picks Metro, the two silent fallbacks, the parallel
device recipe (rebuild --udid, start --port, point the device, verify with
whoami --udid --port and the build label, clean up), and what is still
unverified on Android. Align the dev rules and sim-start comments.
Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>