Skip to content

fix(cli): icon finder answers with no icon set and honors the chosen look - #12131

Merged
josephfarina merged 5 commits into
mainfrom
josephfarina/icon-finder-no-set-look
Nov 17, 2026
Merged

josephfarina merged 5 commits into
mainfrom
josephfarina/icon-finder-no-set-look

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

User impact

An agent or person who uses astryx experimental icon hits two defects:

  1. No icon set installed: a dead end. astryx experimental icon <words> says no icons match and points to --list. --list says no set is installed and points back to experimental icon <words>. Neither says what to do. Common asks such as close, check, info, warning, chevron down, copy, and external link are names Core already draws, but the finder never says so.
  2. The chosen look is ignored. After astryx experimental icon use <set> --variant <look>, the finder still prints the import of each icon's default look, so copied code draws the wrong look.

Problem and solution fit

  1. The search answered "no match" for two different causes: no set is installed, or a set exists and nothing matched. Only the second has a useful next step in --list. The fix tells the two apart, says so, names the Astryx icon definitions that match the words (built-in names first, which Core draws with no set), and gives the one route the CLI supports to get a set: install a package that ships one and run experimental icon use <set>, or read the icon-sets guide to make one. discover --type icon-set is not offered, since discover reads icon sets only in a project that already chose one. --list gives the same next step and no longer points back at the search; use <set>, --set <set>, and <set>/<id> say no set is installed and suggest the same two commands. Text prints each command as the CLI picks it to run; JSON keeps them bare. A project whose only sets are withdrawn has a set installed: it keeps the "no match" answer and --list, which names each withdrawal reason, and use <other name> points at --list.
  2. Template mapping already draws each icon in the project's look, but its resolver was private to template mapping, so the finder printed the icon's own export. The resolver now lives beside iconSetLook, and both template mapping and the finder use it. A match from a set in the project's list prints that look's import; an icon without the look keeps its default import and names both looks (look: {asked, used}), the same fallback template mapping reports. A set outside the list draws no project look and is unchanged.

Expected behavior and authority

  • spec:AST-084 FR6–FR8 (finder output, --list, use --variant: each set in the list draws its variant of the project's look, or its default look) and FR9–FR10 (template mapping fallback variant: {asked, used}).
  • spec:AST-017 FR27 and spec:AST-084 FR0: stable output is unchanged in a project with no icon set and no opt-in; the experimental-isolation test passes.
  • spec:AST-033 FR2a: a stored icon index answers as icon() does in the folder it was made in.

FR6 and FR7 gain sentences that describe the new output; no requirement changes.

Smallest restoration

  • api/icon/search/search.mjs: the shared rankIconSets gives the no-set answer (reason, definitions, next) when there is no set at all, not even a withdrawn one, and maps each match through the shared look resolver, from the look each set draws. The definitions are ranked by the existing icon ranking, read as one set whose map names each definition; the ranking itself is unchanged.
  • api/icon/search/icon-index.mjs: exportIconIndex() stores, on each set in the folder project's list, the look that project picks (look), and rankIconIndex() passes it to the same ranking, so a stored index still answers exactly as icon() does where it was made.
  • api/icon/list/list.mjs, api/icon/_records.mjs: the same next step for --list, and the two commands as suggestions for a named set, when none is installed.
  • foundation/discovery/icon-set-discovery.mjs, foundation/discovery/template-icons.mjs: the look resolver moves, unchanged, so both callers share it.
  • foundation/text/icon-set-next.mjs: the next-step sentence and its two commands, built once, with bare commands for JSON and the picked invocation for text; the API and the command handler both read it.
  • JSON changes are additive and appear only where an experimental surface answers: icon.search gains look, reason, definitions, next where they apply; icon.list gains next when no set is installed; a stored icon index set gains look.

Evidence

  • Reproduction before the change, in a project with no icon set:

    $ npx @astryxdesign/cli experimental icon close
    No icons match "close".
    See the installed sets: npx @astryxdesign/cli experimental icon --list
    $ npx @astryxdesign/cli experimental icon --list
    status: none
    reason: No icon set is installed.
    Find one: npx @astryxdesign/cli experimental icon <words>
    

    After experimental icon use glyphs --variant solid:

    $ npx @astryxdesign/cli experimental icon trash
    import:  import {TrashIcon} from '@acme/glyphs';
    variant: solid (TrashSolidIcon)
    
  • Result after the change:

    $ npx @astryxdesign/cli experimental icon close
    No icon set is installed, so no icon matches "close".
    Core draws these names with no set; pass one to a component's icon prop:
    - close: Dismiss or close a dialog, panel, tag or banner.
    [next] Install a package that ships an icon set, then run `npx @astryxdesign/cli experimental icon use <set>`. To make your own set, read `npx @astryxdesign/cli docs cli/experimental/icon-sets`.
    $ npx @astryxdesign/cli experimental icon use outline
    Error: No icon set named "outline": no icon set is installed.
      npx @astryxdesign/cli experimental icon use <set>  (after you install a package that ships an icon set)
      npx @astryxdesign/cli docs cli/experimental/icon-sets  (make your own icon set)
    $ npx @astryxdesign/cli experimental icon trash        # project look: solid
    import:  import {TrashSolidIcon} from '@acme/glyphs';
    $ npx @astryxdesign/cli experimental icon close        # this icon has no solid look
    import:  import {XIcon} from '@acme/glyphs';
    look:    no solid look; draws outline
    

    --json with no set (commands stay bare):

    {"type": "icon.search", "data": {"query": "close", "matchCount": 0, "matches": [], "reason": "No icon set is installed.", "definitions": [{"name": "close", "builtIn": true, "description": "Dismiss or close a dialog, panel, tag or banner."}], "next": "Install a package that ships an icon set, then run `astryx experimental icon use <set>`. To make your own set, read `astryx docs cli/experimental/icon-sets`."}}
  • Representative unchanged path: a project with a set and no match still answers {query, matchCount: 0, matches: []} and points to --list; so does a project whose only set is withdrawn, and its --list is unchanged; a project with no picked look prints the default imports with no new fields; every stable command matches its golden in a project with no icon set (experimental-isolation test).

  • Regression tests: the new cases in clients/cli/commands/icon.test.mjs (text with the picked invocation and --json with bare commands, with no set and with only a withdrawn set), the no-set, withdrawn-only, and project-look cases added to the icon() equals rankIconIndex() comparison in api/icon/search/icon-index.test.mjs.

Scope

Components: cli (experimental icon search, list, use, stored icon index; template icon mapping resolver)

  • One defect is restored. (Two related defects from one test of the icon finder, kept in one change at the owner's request.)
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. (Additive experimental JSON fields only.)
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

Judged on the sentences added to spec:AST-084 FR6 and FR7.

  • R1 narration: none; both sentences state what the finder and --list answer, in the present tense.
  • R2 research: none.
  • R3 evidence: no evidence cell changed; nothing names a pull request, issue, or commit.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none.

Testing

  • pnpm exec vitest run --project node packages/cli/clients/cli/commands/icon.test.mjs packages/cli/api/icon packages/cli/foundation/debug packages/cli/foundation/discovery packages/cli/foundation/integrations packages/cli/foundation/doc-compiler packages/cli/clients/cli/startup-imports.test.mjs packages/cli/clients/cli/cli-command.test.mjs packages/cli/clients/cli/commands/template.icons.test.mjs packages/cli/clients/cli/commands/discover.icon-sets.test.mjs packages/cli/clients/cli/commands/icon-sets-guide.test.mjs packages/cli/test/experimental-isolation.test.mjs: all pass.
  • pnpm exec vitest run --project node packages/cli/api/template packages/cli/api/doctor packages/cli/clients/cli/e2e-smoke.test.mjs: pass, apart from two locale examples that need a Node build with full ICU data (unrelated to this change).
  • pnpm -F @astryxdesign/cli typecheck:strict: passes. ESLint and Prettier: clean on the touched files. pnpm check:cli-structure, check:package-boundaries, check:changesets, and check:knowledge: pass.

…k, and the debug gate sees autolinked integrations

- experimental icon <words> with no icon set installed says so, lists the
  matching icon definitions (built-in names first, which Core draws with no
  set) and how to get a set; --list gives the same next step, and use/--set
  with no set installed say how to get one.
- The finder prints each match's import in the project's look
  (experimental.iconVariant) for sets in the project's list, and names both
  looks when the icon lacks it. Template mapping and the finder share one
  resolver.
- The debug preload gate opens where the project carries an integration no
  config lists, so its debug handler records every run and a config with
  neither word no longer warns of a missed handler.
@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 12:23am UTC

Request Review

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec d813d66

@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, 12:29 AM UTC

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 633f492

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.23 MB packed (+4.0 kB); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

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

Not ready yet: one owner decision and three fixes are needed.

Owner decision. The icon.search answer now carries the project's look as a top-level variant field, but the approved spec:AST-084 FR6 sentences name only look, reason, definitions and next, so an engineering owner (the author may, as one) either names variant in FR6 and records that with /approve-spec <full head SHA> on the new head, or the field is dropped.

Fixes needed:

  • A project whose only icon set is withdrawn (invalid data, or a module that does not resolve) is now told "No icon set is installed" and to install a package, and --list prints that step under a reason saying the set is installed but withdrawn, because search.mjs:77, list.mjs:51 and _records.mjs:74 count only valid sets; take the no-set path only when no set is installed or withdrawn, and add a withdrawn-only test.
  • The shipped guide debug-and-gap-reports.doc.mjs:55 still tells integration authors that an app records every command only when its config names integrations or debug and never records --version otherwise, which this change makes false for any app that installs the package.
  • Two description claims are false: the base already records an unknown command, which is the parse-error case in debug-gate.test.mjs:72 (use an unknown option such as component --no-such-flag, which only this head records), and clients/cli/index.mjs does not pass prettier --check (it did not on the base either).

Otherwise the no-set answer, the look-aware imports and the gate fix work as described: the new tests fail on the base and pass here, and the experimental-isolation suite passes.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim (changeset): an installed integration's debug handler now gets every run, including --version and parse errors, with or without a config. Verified: the gate test fails on the base and passes here; an unknown option is recorded only here.
  • Claim (changeset): such a project no longer prints the missed-handler warning. Verified by the gate test.
  • Claim (changeset): output and exit codes are unchanged. Verified: only the false warning goes.
  • Claim (changeset): with no set, the finder says so, lists matching definitions built-in first, and says how to get a set, in text and JSON. Verified by the icon tests; it also fires for a withdrawn set (finding).
  • Claim (changeset): --list gives the same next step and stops pointing back at the finder. Verified.
  • Claim (changeset): use <set> and --set <set> with no set say how to get one. Verified.
  • Claim (changeset): after use --variant, the finder imports that look and names both looks where the icon lacks it. Verified by the icon tests.
  • Claim: close, check, info, warning, chevron down, copy and external link are built-in names Core draws. Verified: their definitions are built-in.
  • Claim: before this change the finder and --list pointed at each other, the finder ignored the chosen look, and a config with neither word made later commands warn. Verified on the base.
  • Claim: the look resolver moved unchanged and both callers share it. Verified: identical bodies.
  • Claim: a set outside the project's list is unchanged. Verified by test.
  • Claim: the gate uses the same file checks as the load before each command, and runs outside a project are unchanged. Verified in may-have-integrations.mjs and the startup-imports test.
  • Claim: with no config the base recorded nothing for --version and parse errors. False: an unknown command was already recorded.
  • Claim: discover is not offered because it reads sets only with the opt-in. Verified against FR0 and FR17.
  • Claim: JSON changes are additive and appear only on the experimental command; stable output is unchanged. Verified: the experimental-isolation suite passes.
  • Claim: definitions are ranked by the existing ranking, unchanged. Verified.
  • Claim: FR6 and FR7 gain sentences and no existing requirement changes. Verified; the added sentences do not name variant.
  • Claim: a project with a set and no match, or with no picked look, answers as before. Verified by tests.
  • Claim: the gate test fails on the base and passes with the fix. Verified.
  • Claim: the listed test runs pass, ESLint is clean, and the knowledge check is aligned. Verified.
  • Claim: Prettier is clean on the touched files. False for clients/cli/index.mjs.
  • Claim: the strict typecheck passes. Not confirmed here: two errors come from an unbuilt theme package, none from a touched file.
  • File .changeset/debug-gate-autolinked-integrations.md: clear.
  • File .changeset/icon-finder-no-set-and-look.md: clear.
  • File docs/specs/AST-084-icon-sets/spec.md: owner decision on variant.
  • File packages/cli/api/icon/_adapter.mjs: clear.
  • File packages/cli/api/icon/_records.mjs: withdrawn-set finding.
  • File packages/cli/api/icon/icon.doc.mjs: clear, pending the variant decision.
  • File packages/cli/api/icon/icon.type.mjs: owner decision on variant.
  • File packages/cli/api/icon/list/list.mjs: withdrawn-set finding.
  • File packages/cli/api/icon/search/search.mjs: withdrawn-set finding.
  • File packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear.
  • File packages/cli/clients/cli/commands/experimental-icon.doc.mjs: clear.
  • File packages/cli/clients/cli/commands/experimental/icon.mjs: clear; its next-step line follows list.mjs.
  • File packages/cli/clients/cli/commands/icon.test.mjs: clear; no withdrawn-only case.
  • File packages/cli/clients/cli/debug-gate.test.mjs: parse-error case finding.
  • File packages/cli/clients/cli/index.mjs: makes the shipped debug guide stale; its cost note is out of date (non-blocking).
  • File packages/cli/foundation/discovery/icon-set-discovery.mjs: clear.
  • File packages/cli/foundation/discovery/template-icons.mjs: clear.
  • File packages/cli/foundation/integrations/may-have-integrations.mjs: clear.
  • Consistency: packages/cli/assets/docs/tree/debug-and-gap-reports.doc.mjs, unchanged here, contradicts the new gate.

Automated review (maintainer link)

Comment thread packages/cli/api/icon/search/search.mjs Resolved
Comment thread packages/cli/api/icon/list/list.mjs Resolved
Comment thread packages/cli/api/icon/_records.mjs Resolved
Comment thread packages/cli/clients/cli/index.mjs Resolved
Comment thread packages/cli/api/icon/icon.type.mjs Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec dbb4ed8

@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: the fixes below are needed. The spec question from the last review is settled, since the search answer no longer carries a top-level variant.

  • A project whose only icon set is withdrawn is now told "No icon set is installed" and to install a package (api/icon/search/search.mjs:110, api/icon/list/list.mjs:51, api/icon/_records.mjs:74, and rankIconIndex() through the shared ranking), so take the no-set path only when no set is withdrawn either and add a withdrawn-only test.
  • The shipped debug guide (packages/cli/assets/docs/tree/debug-and-gap-reports.doc.mjs:55) still says an app records every command only when its config names integrations or debug, which the new gate contradicts for an installed integration, so update that sentence.
  • Regression: the debug changeset says a handler now receives parse errors, but main now delivers unknown commands and options to an installed integration's handler already, so name only --version.
  • The description says the base recorded nothing for parse errors with no config and that Prettier is clean on the touched files, but the base records unknown commands and options and packages/cli/clients/cli/index.mjs fails prettier --check, so correct both sentences or format the file.
  • Miss: the description says the config icon use writes makes every later command print the missed-handler warning, but on the base --version and parse errors never print it and only commands that load the project do, so correct that sentence.

Also worth updating: the cost note above loadProjectDebugHandler in index.mjs still describes the old gate. After the next push, an engineering owner approves the spec edits again at the new head with /approve-spec <full head SHA>.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Debug changeset, an installed integration's handler now receives every run including --version, with or without a config: verified (debug-gate.test.mjs, red on the base; probe).
  • Debug changeset, parse errors are newly received: false (the base already records unknown commands and options; probe).
  • Debug changeset, a config naming neither word no longer warns in such a project; output and exit codes unchanged: verified (debug-gate.test.mjs; probe exit codes).
  • Icon changeset, the no-set search says so, lists matching definitions built-in first and how to get a set, in text and JSON: verified (icon.test.mjs), but a withdrawn-only project gets it too (finding).
  • Icon changeset, --list gives the same next step and no longer points back; use/--set with no set say how to get one: verified (icon.test.mjs).
  • Icon changeset, after use --variant the search prints that look's import or names both looks: verified for sets in the list (icon.test.mjs).
  • Description, the no-set loop between the search and --list on the base: verified (base probe).
  • Description, the finder ignored the chosen look on the base: verified (red-first look cases).
  • Description, every later command printed the false warning: false (on the base only commands that load the project warn; probe).
  • Description, with no config the base recorded nothing for --version and parse errors: false for parse errors (probe).
  • Description, the gate opens where the project carries an unlisted integration and is unchanged outside a project: verified (index.mjs:228, may-have-integrations.mjs:55).
  • Description, the look resolver moved unchanged and both callers share it: verified (icon-set-discovery.mjs:525-553).
  • Description, a stored index keeps the look and answers as icon() does: verified (icon-index.test.mjs).
  • Description, JSON changes are additive and only on experimental surfaces: verified (icon.type.mjs; experimental-isolation test).
  • Description, discover is not offered because it reads sets only in a project that chose one: verified (icon-set spec FR17).
  • Description, unchanged paths for a set with no match and for no picked look: verified (icon.test.mjs).
  • Description, the gate test fails on the base with one of two runs recorded and the warning printed: verified (red-first run).
  • Description, the listed tests and the experimental-isolation test pass: verified (head run).
  • Description, typecheck:strict passes: not verified here (two errors from an unbuilt theme package in template pages, none in touched files).
  • Description, ESLint clean on the touched files: verified; Prettier clean: false (index.mjs).
  • Description, knowledge check aligned: verified.
  • Description, FR6 and FR7 only gain sentences: verified; owner-approved at this head.
  • Description, the fixes stay together at the owner's request: not verifiable from the repository.

Files:

  • .changeset/debug-gate-autolinked-integrations.md: parse-error claim (finding).
  • .changeset/icon-finder-no-set-and-look.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear (owner-approved at this head).
  • packages/cli/api/icon/_adapter.mjs: clear.
  • packages/cli/api/icon/_records.mjs: withdrawn-set answer (finding).
  • packages/cli/api/icon/exportIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.type.mjs: clear.
  • packages/cli/api/icon/list/list.mjs: withdrawn-set answer (finding).
  • packages/cli/api/icon/rankIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/search/icon-index.mjs: clear (shares the withdrawn-set finding through the ranking).
  • packages/cli/api/icon/search/icon-index.test.mjs: clear.
  • packages/cli/api/icon/search/search.mjs: withdrawn-set answer (finding).
  • packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental-icon.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental/icon.mjs: clear.
  • packages/cli/clients/cli/commands/icon.test.mjs: needs a withdrawn-only case (finding).
  • packages/cli/clients/cli/debug-gate.test.mjs: clear.
  • packages/cli/clients/cli/index.mjs: Prettier and a stale cost note.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear.
  • packages/cli/foundation/discovery/template-icons.mjs: clear.
  • packages/cli/foundation/integrations/may-have-integrations.mjs: clear.
  • packages/cli/assets/docs/tree/debug-and-gap-reports.doc.mjs (unchanged): contradicts the gate (finding).

Automated review (maintainer link)

…d gate notes match the code

- A project whose only sets are withdrawn has a set installed: the finder,
  --list, use, and rankIconIndex keep the no-match answer and point at
  --list, which names each withdrawal reason; the no-set path needs no
  withdrawn set either.
- The integration author guide says an app that installs or lists the
  package records every command with its debug handler, --version included.
- The changeset and gate test name --version only; the note above the gate
  describes its cost; index.mjs is formatted with Prettier.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec ec11226

@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: three fixes are needed. The withdrawn-set answers, the debug guide and the changeset's parse-error claim from the last review are all fixed.

  • Miss: in a project that installs a base other than Core and no Core, astryx --version --json now loads the autolinked base before it answers, so meta.answeredBy reports core: null and the base where main reports the carried Core's version, while the changeset (.changeset/debug-gate-autolinked-integrations.md) says output is unchanged and the description says JSON changes only on experimental surfaces, so keep main's answer there or state the change in both.
  • Miss: with no icon set installed, the new [next] line of experimental icon <words> and --list (packages/cli/clients/cli/commands/experimental/icon.mjs:247, :354), and the same sentence in the use, --set and <set>/<id> errors, prints bare astryx experimental icon use <set> and astryx docs … where main printed the command the CLI picks (such as npx @astryxdesign/[email protected]), so render the text through the picked invocation and keep the JSON next bare.
  • Miss: the pull request changes the icon-set record (docs/specs/AST-084-icon-sets/spec.md) but its description has no ## Writing rubric results section, which the knowledge-contracts architecture record requires of every pull request that changes a record, so add one line for each rubric item, R1 to R7, from docs/contributing/spec-writing.md.

After the next push, an engineering owner approves the spec edits again at the new head with /approve-spec <full head SHA>.

Claims and files checked

Review mode: incremental; reason: none
changed rules (0): none

Claims:

  • Debug changeset, an installed integration's handler now receives --version with or without a config: verified (gate test fails on main, passes here).
  • Debug changeset, a config naming neither word no longer makes project-loading commands warn: verified (gate test, red on main).
  • Debug changeset, output and exit codes are unchanged: false for --version --json in a project that autolinks a non-Core base (probe); exit codes unchanged.
  • Icon changeset, with no set the search says so, lists matching definitions built-in first and how to get a set, in text and JSON: verified (icon command and index tests), but the text next step names bare astryx (finding).
  • Icon changeset, --list gives the same next step and no longer points back at the search: verified (icon command test).
  • Icon changeset, use <set> and --set <set> with no set say how to get one: verified (icon command test).
  • Icon changeset, after use --variant the search prints that look's import or names both looks: verified for sets in the project's list (icon command test).
  • Description, the no-set loop between the search and --list on main: verified (red-first).
  • Description, the finder ignored the chosen look on main: verified (red-first).
  • Description, a config icon use writes makes later project-loading commands warn, and --version misses the handler: verified (red-first).
  • Description, the no-set answer tells the two causes apart and does not offer discover: verified (search.mjs:111; discover reads sets only with the opt-in).
  • Description, a withdrawn-only project keeps no match and --list, and use <other> points at --list: verified (icon command test).
  • Description, the look resolver moved unchanged and both callers share it: verified (icon-set-discovery.mjs:525, :545).
  • Description, a listed set prints its look's import, an icon without it names both looks, an unlisted set is unchanged: verified (icon command test).
  • Description, the gate opens where the project carries an unlisted integration, from the same checks as the per-command load, and is unchanged outside a project: verified (may-have-integrations.mjs:44, :55).
  • Description, the icon-set record's FR6 and FR7 only gain sentences: verified; owner-approved at this head.
  • Description, stable output is unchanged in a project with no icon set and no opt-in: the experimental-isolation test passes, but --version --json changes with an autolinked non-Core base (finding).
  • Description, a stored index keeps the look and answers as icon() does: verified (index test).
  • Description, index.mjs failed prettier --check on main and is now formatted: verified.
  • Description, the debug guide now says an app that installs or lists the package records every command, --version included: verified (guide line 55).
  • Description, JSON changes are additive and appear only on experimental surfaces: false (--version --json, finding).
  • Description, the before and after transcripts: verified against the test assertions.
  • Description, unchanged paths for a set with no match and for no picked look: verified (icon command test).
  • Description, both gate tests fail with main's gate and pass with the fix: verified (red-first).
  • Description, the listed test runs and the experimental-isolation test pass: verified (92 files, 2174 tests; the template, doctor and smoke run, 71 files, 540 tests).
  • Description, typecheck:strict passes: not verified here (two errors from an unbuilt theme package in template pages, none in touched files).
  • Description, ESLint and Prettier are clean on the touched files and the knowledge check is aligned: verified.
  • Description, the fixes stay together at the owner's request: not verifiable from the repository.
  • Description, public text carries no internal context: verified.

Files:

  • .changeset/debug-gate-autolinked-integrations.md: output-unchanged claim (finding).
  • .changeset/icon-finder-no-set-and-look.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: content clear and owner-approved at this head; the description lacks its writing rubric results (finding).
  • packages/cli/api/icon/_adapter.mjs: clear.
  • packages/cli/api/icon/_records.mjs: clear.
  • packages/cli/api/icon/exportIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.type.mjs: clear.
  • packages/cli/api/icon/list/list.mjs: clear.
  • packages/cli/api/icon/rankIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/search/icon-index.mjs: clear.
  • packages/cli/api/icon/search/icon-index.test.mjs: clear.
  • packages/cli/api/icon/search/search.mjs: clear.
  • packages/cli/assets/docs/tree/debug-and-gap-reports.doc.mjs: clear.
  • packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental-icon.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental/icon.mjs: the [next] text prints bare astryx (finding).
  • packages/cli/clients/cli/commands/icon.test.mjs: clear.
  • packages/cli/clients/cli/debug-gate.test.mjs: clear.
  • packages/cli/clients/cli/index.mjs: the gate's load changes --version --json (finding).
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: NO_ICON_SET_NEXT is printed as written in text (finding, with the renderer).
  • packages/cli/foundation/discovery/template-icons.mjs: clear.
  • packages/cli/foundation/integrations/may-have-integrations.mjs: clear.

Automated review (maintainer link)

Comment thread docs/specs/AST-084-icon-sets/spec.md Resolved
- The debug preload gate is back as on main: opening it for an unlisted
  integration loaded the project before --version, which then named a
  non-Core base instead of the carried Core. A bases test pins that
  --version answer.
- With no icon set installed, the finder and --list print the next step
  with each command as the CLI picks it in text and bare in JSON; use,
  --set, and <set>/<id> give the two commands as suggestions.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a5bbd0a

…ks it in the project folder

The expected stem was computed in the test runner's folder. Under a
package manager other than the one the project folder implies (the repo
root picks pnpm, a bare project picks npx), the expectation and the
output differed. The tests now compute it in the project folder, as the
run does.

@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: two fixes are needed. The three findings from the last review (the --version --json answer, the bare commands in the text next step, and the writing rubric results) are all fixed.

  • The new import {noIconSetNext} from '../../../../foundation/discovery/icon-set-discovery.mjs' in packages/cli/clients/cli/commands/experimental/icon.mjs:55 fails the repository's CLI structure check for architecture:cli-surface INV22 (a command handler imports no discovery module), so the Lint job's repository guardrails step is red; move noIconSetNext and its two command constants out of foundation/discovery/ (or reach them through the icon API) so the handler imports no discovery module.
  • The title still ends "and the debug gate sees autolinked integrations", but this head leaves clients/cli/index.mjs and foundation/integrations/may-have-integrations.mjs exactly as on main, so retitle it to fix(cli): icon finder answers with no icon set and honors the chosen look.

Not blocking: the --version case and whole-file reformat in packages/cli/clients/cli/bases.test.mjs are left over from the dropped debug-gate change and pass on main, so they could leave this pull request. After the next push, an engineering owner approves the record sentences again at the new head with /approve-spec <full head SHA>.

Claims and files checked

Review mode: full; reason: over-500-lines

Claims:

  • Changeset: with no set, the search says so, lists matching definitions built-in first and how to get a set, in text and JSON: verified (icon command tests fail on main, pass here).
  • Changeset: --list gives the same next step instead of pointing back at the search: verified (icon command test).
  • Changeset: use <set> and --set <set> with no set say how to get one: verified (icon command test).
  • Changeset: after use --variant, the search prints that look's import where the icon has it and names both looks where it does not: verified (look tests).
  • Description: on main the search and --list point at each other with no set: verified (main's output).
  • Description: close, check, info, warning, chevron down, copy and external link are built-in names: verified (each definition is marked built-in).
  • Description: on main the finder ignores the chosen look: verified (main prints the default export).
  • Description: the answer tells no set apart from no match, and discover is not offered because it reads sets only with the opt-in: verified (search.mjs:111; discover's adapter).
  • Description: text prints each command as the CLI picks it, JSON keeps them bare: verified (tests and a real run).
  • Description: a withdrawn-only project keeps no match and --list, and use <other> points at --list: verified (withdrawn-only tests).
  • Description: the look resolver moved unchanged and both callers share it: verified (icon-set-discovery.mjs:535, :555; template-icons.mjs:1137).
  • Description: a listed set prints its look, a missing look names both, an unlisted set is unchanged: verified (look tests).
  • Description: a stored index keeps the look and answers as icon() does: verified (index test).
  • Description: JSON changes are additive and only on experimental surfaces: verified.
  • Description: the icon-set record's FR6 and FR7 only gain sentences: verified; owner-approved at this head.
  • Description: stable output is unchanged with no set and no opt-in: verified (experimental-isolation test).
  • Description: --version --json with a non-Core base still names the carried Core and no base: verified (bases test, on this head and on main).
  • Description: the before and after transcripts: verified against real runs (the text prints the versioned picked command).
  • Description: writing rubric results for the record sentences: present.
  • Description: the first listed test run passes: verified; the template, doctor and smoke run was not repeated here.
  • Description: typecheck:strict passes: not verified here (two errors in untouched template pages that need a theme build).
  • Description: ESLint and Prettier are clean and the knowledge check is aligned: verified.
  • Description: the two fixes stay together at the owner's request: not verifiable from the repository.
  • Description: public text carries no internal context: verified.
  • Title: the debug gate sees autolinked integrations: false (finding).

Files:

  • .changeset/icon-finder-no-set-and-look.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear; owner-approved at this head.
  • packages/cli/api/icon/_adapter.mjs: clear.
  • packages/cli/api/icon/_records.mjs: clear.
  • packages/cli/api/icon/exportIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.type.mjs: clear.
  • packages/cli/api/icon/list/list.mjs: clear.
  • packages/cli/api/icon/rankIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/search/icon-index.mjs: clear.
  • packages/cli/api/icon/search/icon-index.test.mjs: clear.
  • packages/cli/api/icon/search/search.mjs: clear (a private copy of the definition-id rule, non-blocking).
  • packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear.
  • packages/cli/clients/cli/bases.test.mjs: leftover from the dropped debug-gate change (non-blocking).
  • packages/cli/clients/cli/commands/experimental-icon.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental/icon.mjs: discovery import fails the INV22 structure check (finding).
  • packages/cli/clients/cli/commands/icon.test.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear; the next-step helper needs a home the handler may import (with the finding above).
  • packages/cli/foundation/discovery/template-icons.mjs: clear.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 4599c69

@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: two fixes are still needed, both unchanged since the last review. The withdrawn-set error and the writing rubric results from earlier reviews are fixed.

  • The new import {noIconSetNext} from '../../../../foundation/discovery/icon-set-discovery.mjs' in packages/cli/clients/cli/commands/experimental/icon.mjs:55 breaks architecture:cli-surface INV22 (a command handler runs no discovery), so the Lint job's repository guardrails step fails; move noIconSetNext, ICON_USE_COMMAND and ICON_SET_GUIDE_COMMAND out of foundation/discovery/ (beside foundation/text/template-meanings-line.mjs, say) and import them from there in the handler and the icon API.
  • The title still ends "and the debug gate sees autolinked integrations", but this pull request changes no debug-gate or integration file, so retitle it to fix(cli): icon finder answers with no icon set and honors the chosen look.

Not blocking: the --version case and whole-file reformat in packages/cli/clients/cli/bases.test.mjs are left over from the dropped debug-gate change and could leave this pull request. After the next push, an engineering owner approves the record sentences again at the new head with /approve-spec <full head SHA>.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims:

  • Changeset: with no set, the search says so, lists matching definitions built-in first and how to get a set, in text and JSON: verified (icon command tests pass here and fail on main; real runs).
  • Changeset: --list gives the same next step instead of pointing back at the search: verified (icon command test; real run).
  • Changeset: use <set> and --set <set> with no set say how to get one: verified (icon command test; real run).
  • Changeset: after use --variant, the search prints that look's import where the icon has it and names both looks where it does not: verified (look tests; real runs).
  • Description: on main the search and --list point at each other with no set: verified (real runs on main).
  • Description: close, check, info, warning, chevron down, copy and external link are built-in names: verified (each definition is marked built-in).
  • Description: on main the finder ignores the chosen look: verified (real run on main prints the default export).
  • Description: the answer tells no set apart from no match, and discover is not offered because it reads sets only with the opt-in: verified (search.mjs:111; the icon-set record).
  • Description: text prints each command as the CLI picks it, JSON keeps them bare: verified (tests; real runs).
  • Description: a withdrawn-only project keeps no match and --list, and use <other> points at --list: verified (withdrawn-only tests).
  • Description: the look resolver moved unchanged and both callers share it: verified (icon-set-discovery.mjs:535, :555; template-icons.mjs:1137).
  • Description: a listed set prints its look, a missing look names both, an unlisted set is unchanged: verified (look tests).
  • Description: a stored index keeps the look and answers as icon() does: verified (index test).
  • Description: JSON changes are additive and only on experimental surfaces: verified.
  • Description: the icon-set record's FR6 and FR7 only gain sentences: verified; owner-approved at this head.
  • Description: stable output is unchanged with no set and no opt-in: verified (experimental-isolation test).
  • Description: --version --json with a non-Core base still names the carried Core and no base: verified (bases test passes here).
  • Description: the before and after transcripts: verified against real runs (text prints the versioned picked command).
  • Description: writing rubric results for the record sentences: present, and the sentences pass the rubric.
  • Description: the listed icon, discovery, isolation and bases tests pass: verified for the suites rerun here; the template, doctor and smoke run was not repeated.
  • Description: typecheck:strict passes: not verified here.
  • Description: ESLint and Prettier are clean and the knowledge check is aligned: verified (touched files; CI's knowledge step).
  • Description: the two fixes stay together at the owner's request: not verifiable from the repository.
  • Description: public text carries no internal context: verified.
  • Title: the debug gate sees autolinked integrations: false (finding).

Files:

  • .changeset/icon-finder-no-set-and-look.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear; owner-approved at this head.
  • packages/cli/api/icon/_adapter.mjs: clear.
  • packages/cli/api/icon/_records.mjs: clear.
  • packages/cli/api/icon/exportIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.type.mjs: clear.
  • packages/cli/api/icon/list/list.mjs: clear.
  • packages/cli/api/icon/rankIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/search/icon-index.mjs: clear.
  • packages/cli/api/icon/search/icon-index.test.mjs: clear.
  • packages/cli/api/icon/search/search.mjs: clear (a private copy of the definition-id rule, non-blocking).
  • packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear.
  • packages/cli/clients/cli/bases.test.mjs: leftover from the dropped debug-gate change (non-blocking).
  • packages/cli/clients/cli/commands/experimental-icon.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental/icon.mjs: discovery import breaks INV22 (finding).
  • packages/cli/clients/cli/commands/icon.test.mjs: clear; the expected commands now match the picker in the fixture folder.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear; the next-step helper needs a home the handler may import (with the finding above).
  • packages/cli/foundation/discovery/template-icons.mjs: clear.

Automated review (maintainer link)

@josephfarina josephfarina changed the title fix(cli): icon finder answers with no icon set, honors the chosen look, and the debug gate sees autolinked integrations fix(cli): icon finder answers with no icon set and honors the chosen look Nov 17, 2026
…s test as on main

- noIconSetNext and its two commands move from foundation/discovery to
  foundation/text/icon-set-next.mjs, so the experimental icon handler
  imports no discovery module (architecture:cli-surface INV22); the icon
  API reads them through its adapter.
- clients/cli/bases.test.mjs is back to main: its reformat and --version
  case belonged to the dropped debug-gate change.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 633f492

@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: the heavy CI jobs have not run on this head yet. Both fixes from the last review are in: the no-set next step now lives in foundation/text/, so the CLI structure check and Lint pass, and the title names only the icon finder.

Not blocking, and missed by earlier reviews: with a picked look, a search record's variant line repeats the drawn look (variant: solid (TrashSolidIcon) under import {TrashSolidIcon}) and no longer names the default export (packages/cli/clients/cli/commands/experimental/icon.mjs:271-283); listing the default look there, or rewording the comment above it, would keep the record accurate.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none

Claims:

  • Changeset: with no set, the search says so, lists matching definitions built-in first and how to get a set, in text and JSON: verified (icon command tests; real runs).
  • Changeset: --list gives the same next step instead of pointing back at the search: verified (icon command test; real run).
  • Changeset: use <set> and --set <set> with no set say how to get one: verified (icon command test; real run).
  • Changeset: after use --variant, the search prints that look's import where the icon has it and names both looks where it does not: verified (look tests; real runs).
  • Description: on main the search and --list point at each other with no set: verified (real runs on the base).
  • Description: close, check, info, warning, chevron down, copy and external link are built-in names: verified (each definition is marked built-in).
  • Description: on main the finder ignores the chosen look: verified (a real run on the base imports the default export).
  • Description: the answer tells no set apart from no match, and discover is not offered because it reads sets only with the opt-in: verified (search.mjs:111; the icon-set record).
  • Description: text prints each command as the CLI picks it, JSON keeps them bare: verified (tests; real runs).
  • Description: a withdrawn-only project keeps no match and --list, and use <other> points at --list: verified (withdrawn-only tests).
  • Description: the look resolver moved unchanged and both callers share it: verified (icon-set-discovery.mjs:517, :537; template-icons.mjs:1137).
  • Description: a listed set prints its look, a missing look names both, an unlisted set is unchanged: verified (look tests).
  • Description: a stored index keeps the look and answers as icon() does: verified (index test).
  • Description: the next-step sentence and its two commands are built once in a text module that the API and the handler read: verified (icon-set-next.mjs; icon.mjs:55).
  • Description: JSON changes are additive and only on experimental surfaces: verified.
  • Description: the icon-set record's FR6 and FR7 only gain sentences: verified; owner-approved at this head.
  • Description: stable output is unchanged with no set and no opt-in: verified (experimental-isolation test).
  • Description: the before and after transcripts: verified against real runs (text prints the version-pinned picked command).
  • Description: writing rubric results for the record sentences: present, and the sentences pass the rubric.
  • Description: the listed icon, discovery, isolation, template, doctor and smoke tests pass: verified.
  • Description: typecheck:strict passes: not verified here (the only errors are two unchanged page templates that need a theme build); CI's typecheck job is pending.
  • Description: ESLint and Prettier are clean, and the structure, boundary, changeset and knowledge checks pass: verified.
  • Description: the two fixes stay together at the owner's request: not verifiable from the repository.
  • Description: public text carries no internal context: verified.
  • Title: the icon finder answers with no icon set and honors the chosen look: verified.

Files:

  • .changeset/icon-finder-no-set-and-look.md: clear.
  • docs/specs/AST-084-icon-sets/spec.md: clear; owner-approved at this head.
  • packages/cli/api/icon/_adapter.mjs: clear.
  • packages/cli/api/icon/_records.mjs: clear.
  • packages/cli/api/icon/exportIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/icon.doc.mjs: clear.
  • packages/cli/api/icon/icon.type.mjs: clear.
  • packages/cli/api/icon/list/list.mjs: clear.
  • packages/cli/api/icon/rankIconIndex.doc.mjs: clear.
  • packages/cli/api/icon/search/icon-index.mjs: clear.
  • packages/cli/api/icon/search/icon-index.test.mjs: clear.
  • packages/cli/api/icon/search/search.mjs: clear (a private copy of the definition-id rule, non-blocking).
  • packages/cli/assets/docs/tree/icon-sets.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental-icon.doc.mjs: clear.
  • packages/cli/clients/cli/commands/experimental/icon.mjs: clear (the variant line note, non-blocking).
  • packages/cli/clients/cli/commands/icon.test.mjs: clear.
  • packages/cli/foundation/discovery/icon-set-discovery.mjs: clear.
  • packages/cli/foundation/discovery/template-icons.mjs: clear.
  • packages/cli/foundation/text/icon-set-next.mjs: clear.

Automated review (maintainer link)

// The import draws the icon's default look; its other variants
// are named with their exports and read with `icon <set>/<id>`.
// The import draws the project's look where the icon has it, else
// its default look; its other variants are named with their

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.

Not blocking: with a picked look the import already draws that look, but the variant line below still lists every declared variant, so trash prints variant: solid (TrashSolidIcon) under import {TrashSolidIcon} from '@acme/glyphs'; and the default TrashIcon is named nowhere. Listing the default look's export in that case, or rewording this comment, would keep the record accurate.

@josephfarina
josephfarina merged commit e801241 into main Nov 17, 2026
132 of 138 checks passed
@github-actions
github-actions Bot deleted the josephfarina/icon-finder-no-set-look branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 633f492b 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