feat: streamline remote metro open flow#240
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1693e6dd52
ℹ️ 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".
| if (options.command !== 'open' || !options.cliFlags.remoteConfig) { | ||
| return {}; |
There was a problem hiding this comment.
Load --remote-config defaults for non-open commands
The guard here returns early unless the command is open, so a profile passed via --remote-config is never loaded for metro prepare or other commands that should reuse remote host/session defaults. As a result, metro prepare --remote-config <path> still fails the --public-base-url requirement and follow-up commands run without the profile bindings, which breaks the documented remote workflow and the runtime-removal guidance.
Useful? React with 👍 / 👎.
| if (rawParsed.command === 'open' && rawParsed.flags.remoteConfig) { | ||
| mergeDefinedFlags(finalized.flags, pickRemoteOpenDefaults(defaultFlags)); |
There was a problem hiding this comment.
Preserve CLI precedence over remote profile defaults
This post-finalization merge reapplies remote-profile defaults after parsing, which overwrites user-specified CLI values for keys in REMOTE_OPEN_FLAG_KEYS (for example --session, --platform, or --daemon-base-url). That reverses the normal precedence order (CLI should win over defaults) and prevents one-off overrides when launching with --remote-config.
Useful? React with 👍 / 👎.
Summary
Replace the public runtime workflow with an open-centric remote-config flow.
Keep Metro preparation as the debug path, remove the public runtime command surface, and update replay/session handling plus docs/skills to match.
Add focused smoke coverage for
open --remote-configand preserve remote env/config defaults through CLI finalization.Validation
pnpm format
pnpm typecheck
pnpm test:unit
pnpm test:smoke