Skip to content

feat(cli): make an icon set inside your own app - #12159

Closed
josephfarina wants to merge 5 commits into
mainfrom
josephfarina/icon-set-in-your-app
Closed

josephfarina wants to merge 5 commits into
mainfrom
josephfarina/icon-set-in-your-app

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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 a typecheck script it never needed, installed it into the app, and only then ran use.

After this change:

  • The guide has a section, "Make a set inside your app": the exact commands, the entry the receipt names, why the app can import itself by name, how to map the built-in definitions that integration check lists, and how to draw Core's own component icons from the set by extending the app's theme in code.
  • experimental icon new-set in a private package ("private": true) leaves out the publishing notes (peers, the typecheck script, the strict check's TypeScript, the placeholder description), and its notes end with astryx 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

  1. Why do builders take the long path? The guide never says the app itself can hold the set, so they make a package to install.
  2. Why does that cost them? A separate package means scaffolding, an install step, and publishing chores (peers, scripts) that a private package never needs, which the receipt asks for.
  3. Why does that matter? Until official public icon sets exist, this is the way an app outside a publishing team gets icons by meaning; every extra step is a place to stop.

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: new in-your-app section; the add-an-icon-set sentence 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.
  • Checked by hand on a fresh Vite + React app: install the library, new-set, integration check, one map --pairs run for the listed built-in definitions, the entry and exports, integration check passes, use passes; npm run build and astryx doctor pass; a server render shows the built-in close icon drawn from the set through the theme snippet.

Scope

Components: cli (icon sets)

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

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 pass
  • tsc --project tsconfig.strict.json in packages/cli: no errors outside the unbuilt @astryxdesign/theme-neutral/built imports that every local run has
  • node .github/scripts/cli-api-types-verify.mjs: passes
  • pnpm check:knowledge: aligned

Merge after the open icon finder change that edits other sentences of the same guide; the two do not touch the same lines.

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.
@vercel

vercel Bot commented Nov 16, 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 Nov 17, 2026 3:40am UTC

Request Review

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

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 3:47 AM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 16, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 of notes), 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 check and a refused use; 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 check and use once the entry was added and every listed definition was mapped.
  • Claim: a private package's receipt leaves out the peers, the typecheck script, the strict check's TypeScript and the placeholder description. Verified: _authoring.mjs:560-581, the new test at icon-authoring.test.mjs:1855-1879, and the fixture receipt.
  • Claim: that receipt ends with the use step. False for the text receipt, whose last line is the template-meanings line; true only for the last entry of notes.
  • 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 exports themeIcons.
  • 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.

Automated review (maintainer link)

Comment thread .changeset/icon-set-in-your-app.md Resolved
Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 84dac94

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

…de block names the entry step and every listed definition
@josephfarina
josephfarina force-pushed the josephfarina/icon-set-in-your-app branch from f469369 to 0e902c5 Compare November 17, 2026 01:52
@josephfarina

Copy link
Copy Markdown
Contributor Author

/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 "private": true (the field npm reads to refuse a publish), the authoring receipt names none of the publishing notes (peers, the typecheck script, the strict check's TypeScript, the placeholder description), and its notes end with the experimental icon use <set> step. No other signal, such as the package's folder or how it is installed, changes the notes. Every other package keeps the notes as before.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-set in a private package "ends with astryx 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-spec comment 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, the typecheck script, the strict check's TypeScript and the placeholder description. Verified: _authoring.mjs:561-581, the new test at icon-authoring.test.mjs:1855-1879 (passes here, fails on the base).
  • Changeset: its notes end with the use step. 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 private gets the peer, typecheck and 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 check and use, the app imported itself by name, and a server render drew Core's close icon from the set.
  • Description: a private package's new-set leaves out the publishing notes. Verified, as above.
  • Description: it "ends with" the use step. 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 doctor with 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").

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 0e902c5

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 17, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 367005c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:81 names <Theme>, but the page never shows import {Theme} from '@astryxdesign/core/theme', so packages/cli/test/taught-core-imports.test.mjs ("every doc page that shows the wrapper shows where Theme comes from") fails and the test-node lane 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-app section (icon-sets.doc.mjs:55-101), and the path passes end to end in a private app.
  • Changeset: with "private": true the new-set receipt 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's notes.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-set leaves out the publishing notes and its notes end with the use step. 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 doctor and 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.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (icon-set records owner, covering this head): the icon-set FR13 amendment is approved. When the package's own package.json sets "private": true (the field npm reads to refuse a publish), the authoring receipt names none of the publishing notes (peers, the typecheck script, the strict check's TypeScript, the placeholder description), and its notes end with the experimental icon use <set> step. No other signal, such as the package's folder or how it is installed, changes the notes. Every other package keeps the notes as before.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 84dac94

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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": true package's new-set receipt 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.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #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]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12738.

@github-actions
github-actions Bot deleted the josephfarina/icon-set-in-your-app branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 84dac943 Deployed Nov 17, 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