Skip to content

refactor(cli)!: drop metro prepare --metro-kind and diff snapshot --out - #4929

Open
thymikee wants to merge 1 commit into
0.22from
feat/remove-metro-kind-alias-and-diff-out
Open

thymikee wants to merge 1 commit into
0.22from
feat/remove-metro-kind-alias-and-diff-out

Conversation

@thymikee

@thymikee thymikee commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Two breaking cleanups for 0.22.

metro prepare took its launcher kind under two spellings: the reader used --kind ?? --metro-kind. Only --kind remains. --metro-kind stays in connect's --metro-* hint family, which names the kind deferred Metro preparation runs with; the saved remote-config/profile metroKind field is unchanged. The shared METRO_PREPARE_FLAGS declaration is split, so metro no longer allows metroKind while connect still does.

diff snapshot reports text and never writes a file, so out leaves the Node client's CaptureDiffOptions, the diff command's input metadata, and the CLI reader. --out still names the diff PNG for diff screenshot and for screenshot.

When main is next merged into 0.22, drop metroKind from metro's flagsByAction.prepare (added on main by #4893) so the alias stays removed.

Before / after

metro prepare --public-base-url https://x --metro-kind expo
  base: accepted, kind=expo
  head: Flag --metro-kind is not supported for command metro.
metro prepare --public-base-url https://x --kind expo   -> kind=expo (both)
connect proxy --metro-kind expo                         -> parsed (both)
diff snapshot input            base: {kind,out}   head: {kind}

Value

Measure base head
metro accepted flags 63 62
diff input-schema properties 25 24

Validation

Head f6aa4e1664. pnpm check:affected --run --head f6aa4e1664 passes format, lint, typecheck, layering, di-seams, fallow, native-dupes, mcp-metadata and build, then stops at package. vitest-related and package fail only on host-local process timeouts (osascript SIGKILL in the web package smoke; the release-publish, release-assets and plugin-store tests), each reproduced on the unchanged base, so GitHub CI owns them. check:command-docs and check:doc-prose pass after generate:command-docs. Focused lanes pass: parser, command-surface capture/metro/schema, cli-diff, cli-client-commands, MCP input docs, option-schema support map. No device-facing change.

🤖 Generated with Claude Code

@apex-sentinel-staging

This comment has been minimized.

`metro prepare` read `--kind ?? --metro-kind`, so one option had two spellings. The
reader now reads `--kind` only, and `--metro-kind` stays in connect's `--metro-*` hint
family, which names the launcher kind deferred Metro preparation runs with. The shared
METRO_PREPARE_FLAGS declaration splits so metro no longer allows metroKind while connect
still does; the saved remote-config/profile `metroKind` field is unchanged.

`diff snapshot` reports text and never writes a file, so `out` leaves the
CaptureDiffOptions type, the diff command's input metadata, and the CLI reader.
`--out` still names the diff PNG for `diff screenshot` and `screenshot`.
@thymikee
thymikee force-pushed the feat/remove-metro-kind-alias-and-diff-out branch from e0f9103 to f6aa4e1 Compare November 21, 2026 20:29
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.16 MB 6.16 MB +184 B
Package (unpacked) 6.16 MB 6.16 MB +184 B
Package (download) 1.88 MB 1.88 MB +98 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 20.5 ms 20.9 ms +0.3 ms
CLI --help 38.7 ms 42.1 ms +3.3 ms

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of f6aa4e1

No open findings.

Reviewed with this repository's own Sentinel configuration (d6767e0910fc).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

The code in f6aa4e1 is ready: removing metro prepare --metro-kind and diff snapshot --out looks complete and consistent. Only the "Body rules" check is not passing, and it was cancelled rather than failed; the other 17 checks pass, so please re-run it, as this diff does not touch the PR body text it checks. Not blocking, and fine to take or leave: the PR body asks to drop metroKind from flagsByAction.prepare at the next main merge, but both 0.22 and main already derive that list from METRO_PREPARE_FLAGS, so that sentence can be reworded or deleted; and connect --kind expo still parses through the shared Metro prepare flags (command-overrides.ts#L130) but is silently ignored, because the deferred Metro path reads only flags.metroKind, which is a pre-existing gap worth its own follow-up issue. Not verified here: the test suites, the 63->62 and 25->24 counts in the PR body, and where help connect shows the new --metro-kind description. Once Body rules is green, nothing else stands in the way of merge.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant