Repository navigation
fix(cli): name layout expand's text fields after its JSON keys - #6569
Merged
josephfarina merged 1 commit intoSep 24, 2026
Merged
Conversation
The text receipt printed `Components` and `TODOs` for the `componentsUsed` and `todos` keys, so the two views could not be grepped against each other.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
There was a problem hiding this comment.
This change restores the spec-required naming for astryx layout expand: the text output now uses componentsUsed: and todos:, matching the --json keys, instead of Components: and TODOs:.
- The JSON envelope, the todos summary value, warnings, and the verbatim output when no path is given are unchanged.
- The new regression test checks that every text field is a key of the
layout.expandJSON data, so the two views cannot drift again. - No issues were found, including for empty component/todo lists, which remain omitted as before.
[Automated review]
josephfarina
marked this pull request as ready for review
September 24, 2026 20:44
josephfarina
requested review from
cixzhang and
imdreamrunner
as code owners
September 24, 2026 20:44
github-actions
Bot
deleted the
cli-spec/templates-layout/layout-expand-text-keys
branch
September 25, 2026 06:23
4 tasks done
cixzhang
added a commit
that referenced
this pull request
Oct 2, 2026
…6887) `astryx layout expand`, `astryx layout check` and `astryx layout grammar` shipped in published `@astryxdesign/[email protected]`, as ordinary registered top-level commands with documented examples, manifest entries, a `layout` docs topic, and the `layout.expand` / `layout.check` / `layout.grammar` response schemas. Four fixes to them (#6564, #6569, #6565, #6572) are in 0.6.4's changelog. They are a stable released CLI surface under `spec:AST-017` FR3. #6615 removed that surface in one step. `spec:AST-017` (authority: current) does not allow this yet: - FR28 requires a replacement-first deprecation patch and a public `DEP-*` record before a removal becomes eligible. There is none. - FR31 allows a removal only when its `DEP-*` and `CLN-*` ids appear in a frozen minor manifest. There is no such manifest. - FR37 requires an owner-approved public minor plan before freeze. There is no approved minor plan. - FR22 forbids retroactively demoting a released stable surface to experimental. `layout` was never behind an experimental boundary: FR27 requires a dedicated experimental namespace, and only the `experimental.xle.components` config key had one — the command did not. So this reverts #6615 and drops its `[breaking]` Changeset. Effect on the next release, measured with `changeset status`: - before: all ten fixed-group packages bump **minor** -> 0.7.0 - after: all ten bump **patch** -> 0.6.5 The ten manifests read 0.6.4, which is the published base; the target is derived from that base plus the highest pending bump. One `minor` Changeset in a `fixed` group moves all ten, which is why a single unplanned removal re-targeted the whole release. This is compatibility restoration, not new behavior. Nothing is invented and no deprecation metadata is added: `layout` returns to exactly its 0.6.4 shape, and its deprecation is left to be decided explicitly under AST-017. Because the removal was never published, main after this change is identical to 0.6.4 for consumers, so the restoration needs no Changeset of its own. The retained `@astryxdesign/cli/xle` barrel and the `experimental.xle.components` config key are untouched. Conflicts with later main commits were resolved toward main, not toward the revert: - `packages/cli/README.md` keeps main's rewritten descriptions and is regenerated, so the `layout` row and config row come from the restored docs. - `packages/cli/test/docs-graph.test.mjs` stays deleted; #6737 removed it for unrelated reasons. - `doc-routes.ids.json` keeps both `integration verify` (#6737) and the layout ids. Note for a follow-up: #6737 re-added the layout ids to `packages/cli/test/doc-routes.ids.json` while the command stayed deleted, so main currently claims four layout commands and three layout functions that do not exist. This change makes that file honest again. Test plan: - `npx vitest run --root . packages/cli` — 5314 passed, 0 failed - `pnpm check:repo` — passes, including `check:changesets` - `npx changeset status` — all ten packages at patch (0.6.5), none at minor - `astryx layout grammar|check|expand` run again from the built CLI - `astryx manifest --json` reports 17 top-level commands, matching the restored `spec:AST-042` text
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
Anyone reading or grepping the text output of
astryx layout expand <expr> <path>. The receipt printedwhile
--jsoncarries the same values ascomponentsUsedandtodos. A caller that switches between the two views, or greps the text for a key it knows from the JSON, finds nothing. After the change the text readscomponentsUsed:andtodos:.Problem and solution fit
clients/cli/commands/layout.mjsrendered the record with display labels ({labels: {components: 'Components', todos: 'TODOs'}}) and a renamed key.The record now uses the JSON keys directly.
todoskeeps its current summary value (the count plus where to find the placeholders).Expected behavior and authority
docs/architecture/cli-surface.md(authority: current), INV5: "Text field names mirror JSON keys one to one. The two views cannot drift, and every field stays greppable."Smallest restoration
The record's keys change to
componentsUsedandtodosand the relabelling is removed. No JSON change; the values shown are the same.Evidence
astryx layout expand 'V > B + {not-a-real-block}' ./out --looseprintedComponents:andTODOs:.componentsUsed: Button, VStackandtodos: 1 (search for "TODO(xle)").layout expandwithout a path still prints the generated TSX verbatim; the[ok] Expanded to ...line and the warnings are unchanged.clients/cli/commands/layout.text-fields.test.mjscollects the text'sname:fields and requires each to be a key of thelayout.expanddata. With the fix reverted it fails (['Components', 'TODOs']); with the fix it passes.Scope
Testing