Repository navigation
[experimental] cli: with no icon set, experimental icon names the discover search where it lists packs - #12725
josephfarina wants to merge 1 commit into
Conversation
…ere it lists packs With no icon set installed, the next step of `astryx experimental icon` and `--list` said to install a package that ships one but named no way to find it. Where discover's own search for "icon set", run over the catalog copies discover saved, lists an icon set the project could add, the step now names `astryx discover "icon set"` first; elsewhere, and before the first discover run, it reads as before. No discover source is called on this path. The JSON `next` field keeps its shape.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
|
/approve-spec cf025d8 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The finder and --list now name astryx discover "icon set" only where discover's saved catalogs list an icon pack the project could add; the new command tests cover each case, and an engineering owner's /approve-spec for this head covers the wording. Optional follow-up: with no set installed, the error for a named set (--set, <set>/<id>, use <set>) still says only to install a package that ships an icon set.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- With no set, the finder and
--listname the discover search when discover lists a pack the project could add: verified (api/icon/search/search.mjs:75,api/icon/list/list.mjs:54,foundation/text/icon-set-next.mjs:34-36; new command test case 1). - The new sentence reads as the changeset and description show: verified (
icon-set-next.mjs:33-36; case 1 checks JSON and--listtext). - The finder reads only the catalog copies discover saved and calls no discover source: verified (
api/discover/discover.mjs:208-232). - Before the first discover run, and where no catalog lists a pack, the step reads as before: verified (cases 3 and 4).
- A pack the search does not find, and a pack the project already declares or aliases, keep the old step: verified (cases 2 and 5).
- JSON
nextcarries the same sentence with bare commands and an unchanged shape; suggestions are unchanged: verified (search.mjs:194,list.mjs:54; the named-set suggestions are untouched). - Text prints the commands with the run's own command stem, as before: verified (
prefixCliCommandsrewrites each inline command; the generic sentence prints exactly as on the base). - The check runs discover's own search with its default limit over the same saved inputs: verified (
discover.mjs:244-256,DEFAULT_LIMITat:55). - The text client prints the API's sentence instead of building it again: verified (
clients/cli/commands/experimental/icon.mjs:235,:336). - The first new test fails on the base branch and the others keep the install step: verified (case 1 fails on the base, 12 pass).
- The other new cases failed on an earlier, looser version: not verifiable from the branch history; not material.
- The existing icon command test is unchanged and keeps the install step: verified (not in the diff; passes on this head).
- The whole node test project and package typecheck results: not reproduced in full; the 59 targeted test files pass, and typecheck shows only two errors for an unbuilt theme package's output in untouched template pages, the same on the base.
- The added cost (about 20-36 ms on the first call): not measured.
- Released as an experimental patch: verified (changeset front matter and
[experimental]prefix). - No new public API: verified (no command or option doc changes; the new helpers are internal).
- No internal context in public text: verified.
Files:
.changeset/icon-no-set-finds-packs.md: clear.packages/cli/api/discover/discover.mjs: clear (search's discover line keeps its icon-set filter and tests).packages/cli/api/icon/_adapter.mjs: clear.packages/cli/api/icon/list/list.mjs: clear.packages/cli/api/icon/search/search.mjs: clear.packages/cli/clients/cli/commands/discover.icon-packs.test.mjs: clear.packages/cli/clients/cli/commands/experimental/icon.mjs: clear.packages/cli/foundation/text/icon-set-next.mjs: clear.
…names the discover search where it lists packs
- #12680 perf(cli): a template's component line resolves its names in one pass, not one full lookup per name Author: Joey <[email protected]> - #12180 fix(core): Calendar weekday names widen their column instead of overlapping Author: Joey <[email protected]> - #12159 feat(cli): make an icon set inside your own app Author: Joey Farina <[email protected]> - #12383 fix(Grid): a responsive column shrinks to a container narrower than minWidth Author: Joey Farina <[email protected]> - #12374 [fix] Icon: a glyph given as name renders and warns, instead of crashing Author: Joey Farina <[email protected]> - #12453 fix(charts): line, area and band default to straight segments Author: josephfarina <[email protected]> - #12296 fix(core): a neutral Badge in a primary or destructive Button meets 4.5:1 on its fill Author: Joey Farina <[email protected]> - #12395 fix(CodeBlock): without a code string, CodeBlock names the prop and the fix in development Author: Joey Farina <[email protected]> - #12260 fix(cli): `astryx component Flex` names Stack first Author: Joey Farina <[email protected]> - #12391 fix(core): a two-lane Toolbar wraps instead of squeezing its start lane Author: Joey Farina <[email protected]> - #12427 fix(core): checkbox and radio marks keep their share of the box a theme sizes Author: josephfarina <[email protected]> - #12725 [experimental] cli: with no icon set, experimental icon names the discover search where it lists packs Author: Joey Farina <[email protected]>
|
Landed in #12738. |
With no icon set installed,
astryx experimental iconnow namesastryx discover "icon set", but only where that search lists an icon pack the project could add; elsewhere the step is unchanged.Before / after
astryx experimental icon close(and--list) in a project with no icon set installed, once a discover run has saved a catalog in whichdiscover "icon set"lists an icon pack:Before:
After:
Unchanged (the "Before" line): a project whose catalogs list no icon pack (including a project with no discover source of its own), a pack that
discover "icon set"does not find (its text has neither word), a project that already has the pack (also under an alias), and any project before its first discover run.Cold start: the finder reads only the catalog copies discover already saved and calls no discover source, so a project whose catalog lists packs gets the "Before" line until its first discover run.
JSON keeps its shape:
data.nextcarries the same sentence with bareastryx …commands, andsuggestionsare unchanged. Text prints the commands with the run's own command stem, as before.Tests
discover.icon-packs.test.mjs. The first (a project whose@acmecatalog lists a pack, after a discover run, gets the discover sentence, and that search returns the pack's set) fails on main. The others keep the install step: a pack the search does not list (found bydiscover glyphsonly), before any discover run, no discover source or a catalog with no icon set, and the pack already declared under an alias; each failed on an earlier, looser version.icon.test.mjsis unchanged: its project has no catalog, so it keeps the install step.CI=1 pnpm exec vitest run --project node packages/clifrom the repo root: 18,647 passed, 19 failed. The same 19 fail on unchanged main on the same machine (theme editor build and picture checks that need tools the machine lacks); none touch this change.pnpm typecheckinpackages/cli: clean.experimental icon closeis within noise of main (611 → 620 ms, 599 → 602 ms).User impact
People and agents with no icon set installed were told to install "a package that ships an icon set" with no way to find one, even where
astryx discover "icon set"lists the packs a project could add (marked[experimental]). The step now names that search, but only where it lists a pack, so it never points at a search that finds none.Expected behavior and authority
spec:AST-084FR6/FR7: with no set installed, the finder and--listsay how to get a set (next). FR17: discover lists the icon sets a project could add. No record changes: the records describe the next step generically.Smallest restoration
Discover's own search function runs the query
icon setover the saved discover catalogs (the same packages and items discover's saved-copy search reads, with the command's default limit) and answers whether it lists an icon set to add, so the sentence names a search only when that search lists a pack. The no-set sentence takes that answer. The text client prints the API'snextsentence with the run's command stem instead of building the sentence again.Scope
Components: cli (
experimental iconnext step; discover's saved-catalog read)