Repository navigation
fix(cli): icon finder answers with no icon set and honors the chosen look - #12131
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
/approve-spec d813d66 |
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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
--listprints that step under a reason saying the set is installed but withdrawn, becausesearch.mjs:77,list.mjs:51and_records.mjs:74count 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:55still tells integration authors that an app records every command only when its config namesintegrationsordebugand never records--versionotherwise, 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 ascomponent --no-such-flag, which only this head records), andclients/cli/index.mjsdoes not passprettier --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
--versionand 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):
--listgives 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
--listpointed 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.mjsand the startup-imports test. - Claim: with no config the base recorded nothing for
--versionand 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 onvariant. - 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 thevariantdecision. - File
packages/cli/api/icon/icon.type.mjs: owner decision onvariant. - 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 followslist.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.
d813d66 to
dbb4ed8
Compare
|
/approve-spec dbb4ed8 |
There was a problem hiding this comment.
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, andrankIconIndex()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 namesintegrationsordebug, 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.mjsfailsprettier --check, so correct both sentences or format the file. - Miss: the description says the config
icon usewrites makes every later command print the missed-handler warning, but on the base--versionand 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,
--listgives the same next step and no longer points back;use/--setwith no set say how to get one: verified (icon.test.mjs). - Icon changeset, after
use --variantthe 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
--liston 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
--versionand 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:strictpasses: 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).
…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.
|
/approve-spec ec11226 |
There was a problem hiding this comment.
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 --jsonnow loads the autolinked base before it answers, someta.answeredByreportscore: nulland 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 ofexperimental icon <words>and--list(packages/cli/clients/cli/commands/experimental/icon.mjs:247,:354), and the same sentence in theuse,--setand<set>/<id>errors, prints bareastryx experimental icon use <set>andastryx docs …where main printed the command the CLI picks (such asnpx @astryxdesign/[email protected]), so render the text through the picked invocation and keep the JSONnextbare. - Miss: the pull request changes the icon-set record (
docs/specs/AST-084-icon-sets/spec.md) but its description has no## Writing rubric resultssection, 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, fromdocs/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
--versionwith 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 --jsonin 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,
--listgives 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 --variantthe 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
--liston main: verified (red-first). - Description, the finder ignored the chosen look on main: verified (red-first).
- Description, a config
icon usewrites makes later project-loading commands warn, and--versionmisses 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, anduse <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 --jsonchanges with an autolinked non-Core base (finding). - Description, a stored index keeps the look and answers as
icon()does: verified (index test). - Description,
index.mjsfailedprettier --checkon main and is now formatted: verified. - Description, the debug guide now says an app that installs or lists the package records every command,
--versionincluded: 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:strictpasses: 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 bareastryx(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_NEXTis 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.
- 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.
|
/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.
There was a problem hiding this comment.
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'inpackages/cli/clients/cli/commands/experimental/icon.mjs:55fails the repository's CLI structure check forarchitecture:cli-surfaceINV22 (a command handler imports no discovery module), so the Lint job's repository guardrails step is red; movenoIconSetNextand its two command constants out offoundation/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.mjsandfoundation/integrations/may-have-integrations.mjsexactly as on main, so retitle it tofix(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:
--listgives 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
--listpoint 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, anduse <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 --jsonwith 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:strictpasses: 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.
|
/approve-spec 4599c69 |
There was a problem hiding this comment.
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'inpackages/cli/clients/cli/commands/experimental/icon.mjs:55breaksarchitecture:cli-surfaceINV22 (a command handler runs no discovery), so the Lint job's repository guardrails step fails; movenoIconSetNext,ICON_USE_COMMANDandICON_SET_GUIDE_COMMANDout offoundation/discovery/(besidefoundation/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:
--listgives 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
--listpoint 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, anduse <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 --jsonwith 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:strictpasses: 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.
…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.
|
/approve-spec 633f492 |
There was a problem hiding this comment.
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:
--listgives 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
--listpoint 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, anduse <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:strictpasses: 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.
| // 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 |
There was a problem hiding this comment.
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.
User impact
An agent or person who uses
astryx experimental iconhits two defects:astryx experimental icon <words>says no icons match and points to--list.--listsays no set is installed and points back toexperimental 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.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
--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 runexperimental icon use <set>, or read the icon-sets guide to make one.discover --type icon-setis not offered, since discover reads icon sets only in a project that already chose one.--listgives 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, anduse <other name>points at--list.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-084FR6–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 fallbackvariant: {asked, used}).spec:AST-017FR27 andspec:AST-084FR0: stable output is unchanged in a project with no icon set and no opt-in; the experimental-isolation test passes.spec:AST-033FR2a: a stored icon index answers asicon()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 sharedrankIconSetsgives 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 whosemapnames 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), andrankIconIndex()passes it to the same ranking, so a stored index still answers exactly asicon()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.icon.searchgainslook,reason,definitions,nextwhere they apply;icon.listgainsnextwhen no set is installed; a stored icon index set gainslook.Evidence
Reproduction before the change, in a project with no icon set:
After
experimental icon use glyphs --variant solid:Result after the change:
--jsonwith 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--listis 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--jsonwith bare commands, with no set and with only a withdrawn set), the no-set, withdrawn-only, and project-look cases added to theicon()equalsrankIconIndex()comparison inapi/icon/search/icon-index.test.mjs.Scope
Components: cli (experimental icon search, list, use, stored icon index; template icon mapping resolver)
Writing rubric results
Judged on the sentences added to
spec:AST-084FR6 and FR7.--listanswer, in the present tense.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, andcheck:knowledge: pass.