Repository navigation
feat(cli): make an icon set inside your own app - #12159
josephfarina wants to merge 5 commits into
Conversation
The icon-sets guide shows how to make a set in the app's own package, with no other package to make, install, or publish, and how to draw Core's own icons from it. In a private package, the new-set receipt leaves out the publishing steps and ends with the step that turns the set on.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's spec decision, and one wording fix is needed.
For a private package, the receipt drops notes that the icon-set spec (FR13) currently requires: the peers and the typecheck script for every package that lacks them. This pull request amends that clause, and no engineering owner has approved the amendment yet. To approve, an engineering owner comments /approve-spec <full head SHA> on the head that carries the wording fix below; as an engineering owner, the author may do this.
Blocking
- The changeset and the new FR13 sentence say the private-package receipt ends with the
experimental icon use <set>step, but the text receipt ends with the template-meanings line that FR13 already requires (the test checks only the last entry ofnotes), so both should say the receipt's notes end with that step.
Non-blocking
- Run as written, the guide's command block maps 2 of the 14 built-in definitions and has no entry step, so it ends with a failing
integration checkand a refuseduse; putting the entry step and "map every definition the check lists" into the block would keep copy-and-run readers on the path.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the guide shows how to make a set inside your own app with no other package. Verified: the new guide section; a private app fixture passed
integration checkanduseonce the entry was added and every listed definition was mapped. - Claim: a private package's receipt leaves out the peers, the
typecheckscript, the strict check's TypeScript and the placeholder description. Verified:_authoring.mjs:560-581, the new test aticon-authoring.test.mjs:1855-1879, and the fixture receipt. - Claim: that receipt ends with the
usestep. False for the text receipt, whose last line is the template-meanings line; true only for the last entry ofnotes. - Claim: the guide gives the exact commands, the entry the receipt names, self-import by name, mapping of the listed built-ins, and Core's icons through the theme. Verified:
icon-sets.doc.mjs:55-99; the self-name import resolves in Node, a Vite build and TypeScript; the set exportsthemeIcons. - Claim: the CLI writes no entry file and picks no icon beyond its existing exact-name mapping. Verified: the fixture run wrote only the set's files and the manifest root, and it listed the exact-name matches for review.
- Claim: the spec sentence now says what a private package gets. Verified: the FR13 edit; owner approval is pending.
- Claim: blind-run gains (fewer commands, less time). Not checked: these are the author's own runs.
- Claim: hand check on a fresh Vite and React app. Partly reproduced: new-set, check, map, entry, check, use and a Vite build passed; doctor and the server render were not run.
- Claim: the listed test commands pass. Verified for the Vitest suites (597 tests), the knowledge check and the published-types check; the strict typecheck was not run.
- Claim: no internal context in public text. Verified.
- File
.changeset/icon-set-in-your-app.md: finding ("ends with" wording). - File
docs/specs/AST-084-icon-sets/spec.md: finding (the amendment awaits owner approval; "ends with" wording). - File
packages/cli/api/icon/_authoring.mjs: clear (its behaviour waits on the FR13 decision). - File
packages/cli/assets/docs/tree/icon-sets.doc.mjs: non-blocking note (the command block). - File
packages/cli/clients/cli/commands/icon-authoring.test.mjs: clear. - File
packages/cli/clients/cli/commands/icon-sets-guide.test.mjs: clear.
PR Analysis Report🔎 Preview ·
|
…de block names the entry step and every listed definition
f469369 to
0e902c5
Compare
|
/approve-spec 0e902c5 Owner decision (icon-set records owner, covering this head): the icon-set FR13 amendment is approved. When the package's own package.json sets |
There was a problem hiding this comment.
Changes requested: one sentence in the pull request description needs correcting.
The icon-set spec amendment for private packages is approved for this head, and the changeset and the record now say the private receipt's notes end with the use step.
Blocking
- The description's "User or maintainer impact" still says
new-setin a private package "ends withastryx experimental icon use <set>", but the text receipt ends with the template-meanings line the spec requires, so it should say "its notes end with" that step (a description edit, no commit needed).
Non-blocking
- The spec gate's status still reads pending because it counts an
/approve-speccomment only when the comment holds the command alone, so a comment with just/approve-spec <full head SHA>lets it record the approval.
Claims and files checked
Review mode: full; reason: spec-record
- Changeset: the guide shows how to make a set inside your own app with no other package. Verified: the new guide section (
icon-sets.doc.mjs:55-101) and an end-to-end run in a private app. - Changeset: with
"private": true, the receipt leaves out the peers, thetypecheckscript, the strict check's TypeScript and the placeholder description. Verified:_authoring.mjs:561-581, the new test aticon-authoring.test.mjs:1855-1879(passes here, fails on the base). - Changeset: its notes end with the
usestep. Verified:_authoring.mjs:598-602, the test at line 1876, and the JSON receipt. - Changeset: every other package gets the notes as before. Verified: the same app without
privategets the peer,typecheckand description notes; the existing receipt tests pass. - Description: the guide gives the commands, the entry, self-import by name, mapping of the listed built-ins, and Core's icons through the theme. Verified: the run passed
integration checkanduse, the app imported itself by name, and a server render drew Core's close icon from the set. - Description: a private package's
new-setleaves out the publishing notes. Verified, as above. - Description: it "ends with" the
usestep. False for the text receipt, which ends with the template-meanings line; true for the notes. - Description: the CLI writes no entry file and adds no mapping of its own in this change. Verified: the run wrote only the set's files and the manifest root; the existing exact-name mapping is unchanged.
- Description: the spec sentence now says what a private package gets. Verified: the record's amended sentence, approved for this head by an engineering owner.
- Description: hand check on a fresh Vite and React app. Reproduced here: new-set, check, map, entry, check, use,
astryx doctorwith no failures, and the theme render; a Vite build passed on the earlier revision. - Description: blind-run gains. Not checked: these are the author's own runs.
- Description: the listed test commands pass and the strict typecheck shows only the unbuilt theme imports. Verified (597 tests, the published-types check, the knowledge check, and the typecheck's two expected errors).
- Description: merge after the icon finder change. That change has merged and this branch merges with it cleanly; the new tests pass on the merge.
- Description: no internal context in public text. Verified.
- File
.changeset/icon-set-in-your-app.md: clear. - File
docs/specs/AST-084-icon-sets/spec.md: clear (owner-approved amendment). - File
packages/cli/api/icon/_authoring.mjs: clear. - File
packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear. - File
packages/cli/clients/cli/commands/icon-authoring.test.mjs: clear. - File
packages/cli/clients/cli/commands/icon-sets-guide.test.mjs: clear. - Pull request description: finding ("ends with").
|
/approve-spec 0e902c5 |
|
/approve-spec 367005c |
There was a problem hiding this comment.
Changes requested: one docs fix is needed before this can merge.
The icon-set spec amendment for private packages is approved for this head, and the earlier description fix is in.
Blocking
- Miss: the new guide text at
packages/cli/assets/docs/tree/icon-sets.doc.mjs:81names<Theme>, but the page never showsimport {Theme} from '@astryxdesign/core/theme', sopackages/cli/test/taught-core-imports.test.mjs("every doc page that shows the wrapper shows where Theme comes from") fails and thetest-nodelane stays red; add that import, with{Theme}alone in the braces, and a<Theme theme={appTheme}>line to the snippet, or name the provider without angle brackets.
The fix needs a new commit, so an engineering owner (the author may) comments /approve-spec <full head SHA> again on the new head.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none.
- Changeset: the icon-sets guide shows how to make a set inside your own app, with no other package to make, install or publish. Verified: the new
in-your-appsection (icon-sets.doc.mjs:55-101), and the path passes end to end in a private app. - Changeset: with
"private": truethenew-setreceipt leaves out the peer,typecheck-script, TypeScript and placeholder-description notes. Verified:_authoring.mjs:561-582; the new test fails on the base and passes on the head. - Changeset: its notes end with the
experimental icon use <set>step. Verified:_authoring.mjs:598-602, the test'snotes.at(-1), and the JSON receipt. - Changeset: every other package gets the notes as before. Verified: a non-private app's receipt is the same as the base's, byte for byte.
- Description: the guide gives the commands, the entry, self-import by name, mapping of the listed built-ins, and Core's icons through the theme. Verified, apart from the
<Theme>reference that fails a docs test (blocking finding). - Description: a private package's
new-setleaves out the publishing notes and its notes end with theusestep. Verified, as above. - Description: the CLI still writes no entry file and maps no icon by itself. Verified for this change: it adds no entry writing or mapping; the existing exact-name pre-fill is unchanged and listed for the author to check.
- Description: the record's receipt sentence now says what a private package gets. Verified:
spec.md:439-445, approved for this head by an engineering owner. - Description: the hand check on a fresh app (new-set, check, map, entry, check, use). Reproduced with a private Heroicons app and with the separate-folder variant; the app build,
astryx doctorand the server render were not rerun. - Description: blind-run gains. Not checked: the author's own runs.
- Description: the listed test commands pass. Verified for the named files (94 tests on the head, 88 on the merge with main); a CLI docs test outside them fails (blocking finding).
- Description: the strict typecheck shows only the unbuilt theme imports. Verified (two errors, both
@astryxdesign/theme-neutral/built). - Description: the published-types check passes and the knowledge check is aligned. Verified.
- Description: merge after the icon finder change, no shared lines. Verified: it is on main and the merge is clean.
- Description: no internal context in public text. Verified.
- File
.changeset/icon-set-in-your-app.md: clear. - File
docs/specs/AST-084-icon-sets/spec.md: clear (owner-approved amendment). - File
packages/cli/api/icon/_authoring.mjs: clear. - File
packages/cli/assets/docs/tree/icon-sets.doc.mjs: finding (<Theme>without its import, line 81). - File
packages/cli/clients/cli/commands/icon-authoring.test.mjs: clear. - File
packages/cli/clients/cli/commands/icon-sets-guide.test.mjs: clear.
|
Owner decision (icon-set records owner, covering this head): the icon-set FR13 amendment is approved. When the package's own package.json sets |
|
/approve-spec 84dac94 |
There was a problem hiding this comment.
Approved pending CI: CI admission refused this head's CI run ("CI is full"), so its build and test jobs have not run; re-run all CI jobs before merging. Lint, the CLI smoke test and the Storybook build passed.
The earlier blocker is fixed: the in-app theme snippet now imports Theme from @astryxdesign/core/theme, and the CLI docs import test passes on this head and on a merge with main. The icon-set spec's private-package sentence (FR13) is approved for this head by an engineering owner.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0): none
- Claim (changeset): the guide shows how to make an icon set inside your own app, with no other package — verified (
icon-sets.doc.mjs:55-107). - Claim (changeset): a
"private": truepackage'snew-setreceipt leaves out the peer,typecheck-script, TypeScript and placeholder-description notes — verified (_authoring.mjs:561-583,icon-authoring.test.mjs:1855-1879). - Claim (changeset): its notes end with the
experimental icon use <set>step — verified (_authoring.mjs:598-602,icon-authoring.test.mjs:1875). - Claim (changeset): every other package gets the notes as before — verified (the non-private branch is unchanged; a private package's receipt on the base matches a public package's receipt on the head line for line).
- Claim (description): the guide section gives the commands, the entry to add, why the app can import itself by name, how to map the listed built-in definitions, and how to draw Core's icons from the set through the theme — verified (
icon-sets.doc.mjs:62-101). - Claim (description): the CLI still writes no entry file and maps no icon by itself — verified (only the receipt notes change).
- Claim (description): the icon-set spec's receipt sentence now says what a private package gets — verified (FR13,
spec.md:439-445). - Claim (description): the listed tests, the knowledge check and the published type check pass — verified for the receipt, guide, docs and import tests on this head and on the merge with
main, plus the knowledge and type checks; the strict TypeScript run was not repeated. - Claim (description): the icon finder change it waits on edits other lines of the guide — verified (it is on
main, and the merge is clean). - Claim (description): blind runs took about half the commands and under half the time, and a manual check in a fresh Vite app passed — the author's own measurements, not reproduced.
- File:
.changeset/icon-set-in-your-app.md— clear. - File:
docs/specs/AST-084-icon-sets/spec.md— clear (approved for this head). - File:
packages/cli/api/icon/_authoring.mjs— clear. - File:
packages/cli/assets/docs/tree/icon-sets.doc.mjs— clear (earlier blocker fixed). - File:
packages/cli/clients/cli/commands/icon-authoring.test.mjs— clear. - File:
packages/cli/clients/cli/commands/icon-sets-guide.test.mjs— clear.
- #12680 perf(cli): a template's component line resolves its names in one pass, not one full lookup per name Author: Joey <[email protected]> - #12180 fix(core): Calendar weekday names widen their column instead of overlapping Author: Joey <[email protected]> - #12159 feat(cli): make an icon set inside your own app Author: Joey Farina <[email protected]> - #12383 fix(Grid): a responsive column shrinks to a container narrower than minWidth Author: Joey Farina <[email protected]> - #12374 [fix] Icon: a glyph given as name renders and warns, instead of crashing Author: Joey Farina <[email protected]> - #12453 fix(charts): line, area and band default to straight segments Author: josephfarina <[email protected]> - #12296 fix(core): a neutral Badge in a primary or destructive Button meets 4.5:1 on its fill Author: Joey Farina <[email protected]> - #12395 fix(CodeBlock): without a code string, CodeBlock names the prop and the fix in development Author: Joey Farina <[email protected]> - #12260 fix(cli): `astryx component Flex` names Stack first Author: Joey Farina <[email protected]> - #12391 fix(core): a two-lane Toolbar wraps instead of squeezing its start lane Author: Joey Farina <[email protected]> - #12427 fix(core): checkbox and radio marks keep their share of the box a theme sizes Author: josephfarina <[email protected]> - #12725 [experimental] cli: with no icon set, experimental icon names the discover search where it lists packs Author: Joey Farina <[email protected]>
|
Landed in #12738. |
Primary intent
Make the path "I have no published icon set; make one from a library in my own app and turn it on" short and clear. It is one guidance change (a guide section) plus the receipt text that goes with it, so neither the documentation nor the bug-fix template fits alone.
User or maintainer impact
A builder outside a team that publishes icon sets wants copied templates and
astryx experimental icon <meaning>to use a library they already like, such as Heroicons. Today the guide is written for authors who publish a package. In blind agent runs on a fresh Vite app, every agent first read most of the guide, then made a separate local package, gave it peers and atypecheckscript it never needed, installed it into the app, and only then ranuse.After this change:
integration checklists, and how to draw Core's own component icons from the set by extending the app's theme in code.experimental icon new-setin a private package ("private": true) leaves out the publishing notes (peers, thetypecheckscript, the strict check's TypeScript, the placeholder description), and its notes end withastryx experimental icon use <set>.In repeat blind runs with the change, every agent made the set inside the app and turned it on in about half the commands and well under half the time it took before, with no failed command on that path.
Problem and solution fit
The guide section answers 1. The private-package receipt answers 2. The CLI still writes no entry file and maps no icon by itself: the receipt names the change to make, and the author picks every icon.
Authority
AST-084 (icon sets) owns the receipt; its sentence about the receipt now says what a private package gets. CLI detail rules are the CLI owner's to decide.
Change and evidence
packages/cli/assets/docs/tree/icon-sets.doc.mjs: newin-your-appsection; theadd-an-icon-setsentence about peers says "for a package that is not private"; keywords and description name the in-app path.packages/cli/api/icon/_authoring.mjs: the private-package branch of the receipt notes.docs/specs/AST-084-icon-sets/spec.md: the receipt sentence.new-set,integration check, onemap --pairsrun for the listed built-in definitions, the entry andexports,integration checkpasses,usepasses;npm run buildandastryx doctorpass; a server render shows the built-incloseicon drawn from the set through the theme snippet.Scope
Components: cli (icon sets)
Writing rubric results
R1 narration: the added sentence describes what the receipt does, in the present tense.
R2 research: none in the record.
R3 evidence: no cell changed.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none touched.
R7 project status: none.
Testing
pnpm exec vitest run --project node packages/cli/clients/cli/commands/icon-authoring.test.mjs packages/cli/clients/cli/commands/icon-sets-guide.test.mjs(new tests: private-package receipt; guide section)pnpm exec vitest run --project node packages/cli/api/icon packages/cli/clients/cli/commands/icon-authoring-receipts.test.mjs packages/cli/api/doctor/icon-sets.test.mjs packages/cli/api/docs: all passtsc --project tsconfig.strict.jsonin packages/cli: no errors outside the unbuilt@astryxdesign/theme-neutral/builtimports that every local run hasnode .github/scripts/cli-api-types-verify.mjs: passespnpm check:knowledge: alignedMerge after the open icon finder change that edits other sentences of the same guide; the two do not touch the same lines.