Conversation
8bbc0b5 to
bfe2ab5
Compare
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfe2ab5a3d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const url = new URL(`${transport.scheme}://metro.invalid/reload`); | ||
| url.hostname = transport.host; | ||
| url.port = String(transport.port); | ||
| return url.toString(); |
There was a problem hiding this comment.
Preserve runtime route prefix for Metro reload
Building the reload endpoint from only transport.host/transport.port forces every request to /<code>reload</code> at the origin root, which breaks bridged runtimes whose saved bundleUrl includes a required path prefix (for example Android hints like /api/metro/runtimes/<id>/index.bundle). In that common remote-tenancy case, this code drops the runtime identifier and sends reload to the wrong route, so metro reload can fail with 404 or target the wrong runtime; derive the reload URL from the bundle URL path instead of hardcoding root /reload.
Useful? React with 👍 / 👎.
bfe2ab5 to
41895ce
Compare
41895ce to
d71ef1c
Compare
Summary
Add
agent-device metro reload, which calls Metro's/reloadendpoint to reload connected React Native apps without restarting the native process.Expose the reload path through the typed client and
agent-device/metro, share runtime transport parsing for host/port/bundle URL handling, and update docs plus agent-device skills so agents prefer Metro reload for JS-only dev loops.Touched files: 19. Scope stayed within Metro command/API, runtime hint parsing, tests, docs, and skills.
Validation
pnpm formatpnpm check:quickpnpm test:unit src/__tests__/client-metro.test.ts src/__tests__/cli-client-commands.test.ts src/utils/__tests__/args.test.ts src/__tests__/metro-public.test.ts src/daemon/__tests__/runtime-hints.test.tspnpm test:unit src/__tests__/client-metro.test.ts src/__tests__/metro-public.test.ts