Skip to content

[CLI] Name the theme package on import and teach import in the theme list - #7154

Merged
josephfarina merged 3 commits into
mainfrom
josephfarina/theme-import-followups
Oct 8, 2026
Merged

josephfarina merged 3 commits into
mainfrom
josephfarina/theme-import-followups

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

User need

Theme import shipped with a few loose ends. An app using theme add --import couldn't see which package owns the theme it just added. The theme list still taught the deprecated copy form as the way to get a theme. Monorepo apps had no coverage for doctor's theme lookup.

What this does

  • theme add <slug> --import names the npm package that owns the added theme. JSON carries package in the envelope, directly after type, and text prints a package: line, the same way other results about one artifact do. A local theme has no package, so its result has none. theme remove and theme use are unchanged. Plain theme add (the deprecated copy) keeps its released result exactly.
  • theme add --list keeps its JSON. Its text now names theme add <slug> --import to use a theme and theme eject <slug> [target-path] to fork one, instead of the deprecated copy form.
  • Doctor gets a regression test for a monorepo whose node_modules is hoisted to the workspace root. Doctor reads astryx.theme from the app's own package.json and reports it as active, not as an unwired theme.
  • The CLI structure check now allows only type modules to be star re-exported from packages/cli/api/index.mjs. A runtime module, including internal helpers such as the recorded-theme resolver, can't reach the public API without a named export that the check can see. Mutation tests cover it.
  • The package provenance test covers theme add --import and resets its mocked project after each integration case.

Compatibility

  • JSON: one additive field, the envelope package on theme.app from theme add --import. No released field changes. theme add --list --json is byte-identical.
  • Text: only the theme add --list usage lines and the new package: line on import change.

Testing

  • Full CLI suite: 380 files, 6,013 passed, 2 expected failures
  • Knowledge, Changeset, CLI structure, published type-surface, generated README, copyright, and repo checks, plus API to CLI parity
  • Removing the envelope package or its text line fails the new provenance case. Adding export * from './theme/theme.mjs' to the API entry fails the structure check.

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 8, 2026 5:35am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 7, 2026
@astracat-bot

astracat-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Oct 8, 2026, 7:28 AM UTC

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Preview availability: Storybook and Sandbox are not both ready on the exact-head Vercel preview.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

23 of 436 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 754,077
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,188
Chat Full AI Chat probe light 155,733
Chat Full AI Chat probe dark 155,005
Chat Default neutral dark 33,205
Chat Default neutral light 32,876
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,229
Chat With Attachments probe dark 11,065
TableRowExpansion Detail Panel neutral dark 5,129
TableRowExpansion Detail Panel neutral light 4,050
SideNav Resizable in AppShell probe dark 3,208
TableGroupedRows Default neutral light 2,133
TableGroupedRows Default neutral dark 2,116
Markdown Default probe dark 897
Markdown Default probe light 897
Markdown Default neutral dark 882

and 3 more.


Generated by PR Enrichment workflow | View full report

@josephfarina
josephfarina force-pushed the josephfarina/theme-import-followups branch from 847f838 to 435f9a3 Compare October 8, 2026 05:30
@josephfarina
josephfarina marked this pull request as ready for review October 8, 2026 07:27
@josephfarina
josephfarina merged commit f2f43e1 into main Oct 8, 2026
46 checks passed
cixzhang added a commit that referenced this pull request Oct 8, 2026
…lease classifier (#7195)

* ci(changesets): check PR changeset coverage with the release classifier

* test(changesets): red arms for #7125 and #7154 coverage gaps

* perf(changesets): batch tree reads; ignore fixed-group co-bumps

* ci(changesets): resolve composed typedefs; attribute only distinctive ids by mention; wire lint; document

* ci(changesets): release audit accepts fix-up Changesets citing the PR

* style: prettier

* ci(changesets): classify on both sides, name fields by full identity, trim

* ci: check the generated CLI README on pull requests
@github-actions
github-actions Bot deleted the josephfarina/theme-import-followups branch October 9, 2026 06:25

This branch was successfully deployed

1 active deployment
Preview — 435f9a3b Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant