Repository navigation
refactor(command-surface): split the system family by command - #4817
Conversation
This comment has been minimized.
This comment has been minimized.
packages/command-surface/src/system/index.ts held twelve unrelated commands in 905 lines, so one command's change touched a file every other system command shared. Each command now owns one file with its schema, description, metadata, CLI schema and reader, daemon writer, facet, and private input readers. index.ts keeps only the family composition and the output-schema projection. The move is statement-neutral: all 88 module-scope statements are unchanged, so the eager-closure split tolerance in ADR 0027 holds without an approval row. Co-Authored-By: Apex <noreply@callstack.com>
458fe5c to
fb5b82b
Compare
Size Report
Startup median (7 runs, lower is better):
|
Apex Sentinel · ✅ Approve · review of
|
| 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.
|
This PR is ready at fb5b82b. The system family split moves statements verbatim and keeps the facet order, and the review found nothing to fix. All checks pass on this commit, and there are no conflicts. Not verified here: base and head statements were compared line by line, but the help output, Not blocking, take or leave: the 13 system-command The next step is maintainer review. |
Summary
packages/command-surface/src/system/index.tswas 905 lines of unrelated commands (home, back, keyboard, clipboard, orientation, fold, telephony, hardware buttons, TV remote, app switcher, appstate), changed in 16 of the last 200 commits. Each command now owns one file with its schema, description, metadata, CLI schema/reader, daemon writer, facet, and private input readers.index.tskeeps only the family composition and the output-schema projection. 16 files touched.This is move-only: all 88 module-scope statements are unchanged (base vs head statements compared, and ADR 0027's split tolerance passes with no approval row). No strings, descriptions, help text, schemas, facet ordering, or exported names changed.
One deviation: the 16
*CliReader/*DaemonWritersymbols moved to their command modules instead of being re-exported from the barrel. Re-exported alone they have no production consumer, socheck:production-exportsflags them, and the only alternative was a Fallow suppression row. Each module now exports what its own facet consumes, matchingcapture/andmanagement/.systemCommandFamilyandSYSTEM_COMMAND_OUTPUT_SCHEMASkeep their names, values, andindex.tspath, so descriptorownerFilesclaims are untouched.Validation
Tested at
458fe5c8c5.install --frozen-lockfile,build,format,lint,tsc -bpass. Targeted suites pass: command-surface 287,src/commands/schema114, cli+mcp+command-registry 1214, daemon 4938, eager-closure/closure-growth/repo-guards 1083.check:layering,check:fallow,check:production-exports,check:bundle-owner-files,check:command-docs,check:mcp-metadata,check:di-seams,check:daemon-wire-compat(identical to base) pass.agent-device helpis byte-identical to base for all twelve commands. Full unit-ci and device lanes left to CI.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.