Repository navigation
[CLI] Add opt-in app theme imports - #6874
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression19 of 436 shot(s) changed. A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
12fff92 to
45e130c
Compare
45e130c to
c5d32b9
Compare
There was a problem hiding this comment.
Thanks for the detailed write-up and the test inventory. This change is not being approved yet for one governing reason, plus one preserved scope concern.
Approval needs a maintainer spec decision first. On current main, the CLI architecture record still describes integration themes as packaged editable source that theme add copies into the consumer. This PR intentionally replaces that model with importing an installed package's built outputs, and the spec it cites for the new model is still an open proposal rather than current authority. A maintainer needs to either merge that proposed spec (or update the existing record) on main, or identify the existing current claim that already authorises: importing built themes as the default, the new theme remove / theme use / theme eject subcommands and generated app theme module, the built-module and stylesheet and /fonts.css package exports, and dropping ASTRYX_THEME. Once that is settled, the breaking costs already documented in the changeset can be accepted consciously with it.
Preserved scope concern for after that decision: at 7,657 changed lines spanning the state foundation, discovery, commands, doctor checks, pack verification, a migration codemod, docs, and seven theme packages, the change will need decomposition or necessity evidence tying each part to the governing claim, or a split — whichever the spec decision makes appropriate.
I could not rerun the listed build, typecheck, or test commands in this environment, so those remain as reported rather than independently confirmed. Nothing else is being asked to be removed or reworked at this stage.
[Automated review]
c5d32b9 to
c794539
Compare
c794539 to
d7ca365
Compare
d7ca365 to
1ab233f
Compare
1ab233f to
64e37d0
Compare
There was a problem hiding this comment.
Thanks for the detailed write-up and the test inventory. This change is not being approved yet for one governing reason, plus one preserved scope concern.
Approval needs a maintainer spec decision first. On current main, the CLI architecture record still describes integration themes as packaged editable source that theme add copies into the consumer. This PR intentionally replaces that model with importing an installed package's built outputs, and the spec it cites for the new model is still an open proposal rather than current authority. A maintainer needs to either merge that proposed spec (or update the existing record) on main, or identify the existing current claim that already authorises: importing built themes as the default, the new theme remove / theme use / theme eject subcommands and generated app theme module, the built-module and stylesheet and /fonts.css package exports, and dropping ASTRYX_THEME. Once that is settled, the breaking costs already documented in the changeset can be accepted consciously with it.
Preserved scope concern for after that decision: at 8,339 changed lines spanning the state foundation, discovery, commands, doctor checks, pack verification, a migration codemod, docs, and seven theme packages, the change will need decomposition or necessity evidence tying each part to the governing claim, or a split — whichever the spec decision makes appropriate.
I could not rerun the listed build, typecheck, or test commands in this environment, so those remain as reported rather than independently confirmed. Nothing else is being asked to be removed or reworked at this stage.
[Automated review]
64e37d0 to
bd0f28c
Compare
There was a problem hiding this comment.
Thanks for the detailed write-up and the test inventory. This change is not being approved yet for one governing reason, plus one preserved scope concern.
Approval needs a maintainer spec decision first. On current main, the CLI architecture record still describes integration themes as packaged editable source that theme add copies into the consumer. This PR intentionally replaces that model with importing an installed package's built outputs, and the spec it cites for the new model is still an open proposal rather than current authority. A maintainer needs to either merge that proposed spec (or update the existing record) on main, or identify the existing current claim that already authorises: importing built themes as the default, the new theme remove / theme use / theme eject subcommands and generated app theme module, the built-module and stylesheet and /fonts.css package exports, and dropping ASTRYX_THEME. Once that is settled, the breaking costs already documented in the changeset can be accepted consciously with it.
Preserved scope concern for after that decision: at 8,485 changed lines spanning the state foundation, discovery, commands, doctor checks, pack verification, a migration codemod, docs, and seven theme packages, the change will need decomposition or necessity evidence tying each part to the governing claim, or a split — whichever the spec decision makes appropriate.
I could not rerun the listed build, typecheck, or test commands in this environment, so those remain as reported rather than independently confirmed. Nothing else is being asked to be removed or reworked at this stage.
[Automated review]
e3eb07b to
91ceeff
Compare
91ceeff to
afa028f
Compare
afa028f to
3db3c45
Compare
3db3c45 to
b2c7089
Compare
b2c7089 to
14d8ebd
Compare
14d8ebd to
b414cee
Compare
b414cee to
f016856
Compare
f016856 to
7083552
Compare
Summary: Keep `theme add` as the source-copy command and add `--import` for built themes. Add the generated app module, list, use, remove, and eject flows, migration and checks, package exports, and font stylesheets. Stop reading the unsupported `ASTRYX_THEME` variable. Test Plan: - Full CLI Vitest suite - Repository build, lint, type checks, export checks, and docsite tests
7083552 to
9b2d470
Compare
There was a problem hiding this comment.
Thanks for the careful two-step rollout and the thorough test inventory. The app-theme model is now fully governed — the spec it implements is current on main, the opt-in --import path and the deprecated copy default both follow it, and no further maintainer decision is needed for the direction.
The previously requested parity correction is in place: theme add --list delegates to the exported themeListCopySources(), keeping its released JSON unchanged, and the parity runner again binds both list routes to their matching API functions.
Everything else checks out on static review: the copy default and deprecation metadata, generated-module record, lifecycle commands, package font exports, migration codemod, packed verification and doctor checks all line up with the governing spec. I could not rerun the listed build and test commands in this environment, so those remain as reported rather than independently confirmed.
[Automated review]
|
/approve-spec 9b2d470 |
User need
Apps need to use installed theme packages without forking their source. Existing apps also need
theme addto keep working while that change rolls out in two steps.What this does
theme add <slug> [target-path]as the released source-copy command. It keeps bundled and package lookup, every option, everytheme.adddata field, stdout, and exit status.theme add <slug> --import [--package]for built-theme import through one generated app module. It returnstheme.appand rejects copy-only options before writing.theme list,theme use,theme remove, andtheme ejectfor the app-theme lifecycle.theme listand themes-only search working outside a package project with no Core through the read-only theme adapter.astryx theme add --import <slug>while source copying remains the deprecated default.theme buildwrite<out>.css.d.tsand report it ascssDts. Check mode still accepts released output sets without that file.ASTRYX_THEMEvariable. With a generated module, component metadata reads the record's default. Without one, the releasedpackage.json#astryx.themelookup keeps its exact behavior.Updates the pending search release note to match current AST-050 FR14 and the shipped search output. It's an exact one-line substitution, nothing else.
Plain source copying now reports
DEP-0005withtheme ejectandtheme add --importreplacements. Human output gets at most one warning, and JSON output gets the additivemeta.deprecationsentry.theme add --listis unchanged.The later minor change that makes import the default is intentionally not part of this patch.
Doctor compatibility
In a project with no generated theme module, the released
themeswarning becomestheme-managementat info level. Once a module exists, doctor reports the tentheme-*checks. A released app holding a theme copied by an earliertheme addchanges fromthemes=warntotheme-management=infoplustheme-unmigrated-copies=warn. The exit status is unchanged and it still reports exactly one warning, but the check ids change. This follows AST-050 FR12.Why this is one change
The generated record, lifecycle commands, integration exports, migration, doctor checks, and docs all describe the same app-theme state. Landing only part of that path would either record imports that do not resolve or create state that apps cannot inspect, update, or recover.
The implementation follows the current app-theme record in
docs/specs/AST-050-app-themes/spec.md. It updatesarchitecture:cli-surfaceINV19 to match that current record. It does not edit AST-050.theme add --listdelegates to the exportedthemeListCopySources()API. That API keeps the released JSON fields and excludes local app state, whilethemeListAvailable()backs the richertheme listcommand. The parity runner binds both CLI routes to their matching API functions.Writing rubric results
Testing
Rebased onto current main with no change to this pull request's own lines:
git range-diffreports the single commit as identical (=).Automated review was unavailable for this head; an independent exact-head review, the full suite, and a released-input comparison against published 0.6.5 stand in for it.
pnpm buildThe Git-dependent file-mode, portable-script, and canonical-fixture checks need a Git checkout, so CI runs those. This local checkout uses Sapling. The equivalent fixture tests passed except for the direct
git ls-filescall.