Repository navigation
fix(cli): equally scored icons put first one whose id the query names in full - #12205
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about the spec:AST-084 FR6 changes, and two fixes are needed after that decision.
Owner decision: current FR6 ends remaining ties with "then by id", and this head rewrites FR6 to put first an icon whose id the query names in full, beside FR6 text carried from #12138 for score-20 word matches and for reading export-name words. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or says which parts should change.
Blocking findings:
.changeset/icon-search-words.mdsays "A query that already had an answer keeps it," but export-name reading changes answered queries (in a two-icon set,icon ArrowUpmoves fromarrowup-boxtoarrow-up), and #12138's current head already replaced that line with "Word matches appear only where nothing answered before."- The word-match sort at
icon-ranking.mjs:550orders equal weights by id parts minus carried words, not by "fewer id parts the query does not name" as the proposed FR6 and the module header say, sobolt-lock-shutleadslock-open-wideforlock open button; count the unnamed id parts or reword the clause.
Both findings come with the #12138 commits on this branch, and rebasing onto #12138's current head fixes the first.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Tied icons are ordered by id today, so
plus addputsfolder-plusfirst: verified (the new test fails on #12187's head). - Among tied icons, one whose id the query names in full now comes first, then id order: verified (
icon-ranking.mjs:669,:679,:692-697;icon.test.mjs:83). - FR6 owns tie order and gains the rule: verified (
spec.md:222-224); not yet approved. - One sort key, with scores, matches and answering icons unchanged: verified for this pull request's own commit; the branch as a whole also carries #12138's new answers.
- With no id named in full, ties keep id order: verified (
arrowcase). - Bug-fix label and "one defect is restored": not a restoration, since the base already follows current FR6's "then by
id"; held for the owner decision. - No new public API: verified (
icon()signature and match fields unchanged). - Measurements over four published icon sets and the rejected alternative: not verifiable from the repository.
- Regression test in
icon.test.mjs: verified. - Testing command: passes at this head (144 tests);
icon-index.test.mjsexists only onmain. - No internal context in public text: verified.
- Speed changeset, answers unchanged: verified by the passing suites; speed not measured.
- Search-words changeset, score-20 word matches, rarest words first, mapped definition words counted twice, export names read as words: verified by tests; "a query that already had an answer keeps it": false (finding above).
- Tie-order changeset,
plusbeforefolder-plusand other ties in id order: verified.
Files:
.changeset/icon-finder-speed.md: clear.changeset/icon-search-words.md: finding (false claim).changeset/icon-tie-order.md: cleardocs/specs/AST-084-icon-sets/spec.md: owner decision needed; word-match clause differs from the codepackages/cli/api/icon/icon.doc.mjs: clearpackages/cli/api/icon/icon.test.mjs: clearpackages/cli/foundation/discovery/icon-ranking.mjs: finding (word-match tie key)
PR Analysis Report🔎 Preview ·
|
2ed8dbe to
5692695
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about the new spec:AST-084 FR6 tie rule in #12205, which also needs one description fix.
#12138: approve. Its FR6 additions for word matches and export-name reading carry an engineering owner's /approve-spec for its head, and its changeset and description claims hold.
#12187: approve. Its answers match #12138's head exactly, and ranking is faster.
#12205: changes requested. Current FR6 ends ties with "then by id", and this pull request rewrites it to put first an icon whose id the query names in full; an engineering owner records the decision by commenting /approve-spec <full head SHA> on #12205 (the author may do so as an engineering owner), or says how the rule should change, including whether an id that repeats a query word, such as check-check for check, counts as named in full.
- Miss: the description says the definitions answer in a project with no icon set is unchanged, but that answer goes through the same tie key, so
justify alignnow listsalignJustifybeforealignEnd; reword that line.
Whole stack: passes, with CI still running on this head; a pull request in this stack lands only when it and every pull request below it are approved.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- #12205: tied icons were ordered by id, so
plus addputfolder-plusfirst: verified (the new test fails on #12187's head). - #12205: an icon whose id the query names in full now leads a tie, then id order, with the
arrowcase unchanged: verified (icon-ranking.mjs:697,:707,:720;icon.test.mjs). - #12205: only tie order moves, never scores or which icons answer: verified over 6,040 queries on two open-source icon libraries.
- #12205: the no-set definitions answer is unchanged: false (finding above).
- #12205: bug-fix framing and "one defect is restored": the base already follows current FR6's id order, so this is the FR6 change awaiting the owner decision, not a restoration.
- #12205: measurements over four published icon sets and the rejected alternative: not reproducible from the repository.
- #12205: regression test, testing command, no new public API, no internal context: verified.
- #12205 changeset:
plusbeforefolder-plus, remaining ties in id order: verified. - #12187: ranking answers unchanged against #12138's head: verified (same answers for every query, with and without word matches and with no set installed).
- #12187 changeset: faster ranking: verified (warm time on a large set drops about 3 to 6 times); the
rankIconIndex()note is accurate but its advice is incomplete (non-blocking above). - #12138: phrases nothing answered now return score-20 word matches ranked by rare words, with mapped definition words counted twice: verified by tests and code.
- #12138: export names read as their words, the typed reading winning a tie: verified (
SearchIcon,Bars3Icon,PaperClip icontests). - #12138: word matches only in the search answer, never in missing-id suggestions or
icon add's definitions: verified (those callers do not ask for them). - #12138 changeset: an answered query changes only when the split reading scores higher: verified.
Files:
.changeset/icon-finder-speed.md: clear (non-blocking wording note).changeset/icon-search-words.md: clear.changeset/icon-tie-order.md: cleardocs/specs/AST-084-icon-sets/spec.md: #12138 text owner-approved; #12205 tie clause awaits an owner decisionpackages/cli/api/icon/icon.doc.mjs: clearpackages/cli/api/icon/icon.test.mjs: clearpackages/cli/api/icon/rankIconIndex.doc.mjs: clear (non-blocking wording note)packages/cli/api/icon/search/search.mjs: clearpackages/cli/foundation/discovery/icon-ranking.mjs: clear; its tie key drives the description findingpackages/cli/foundation/discovery/icon-set-writer.mjs: clearpackages/cli/foundation/text/icon-id.mjs: clear
5692695 to
2f120de
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision about the new spec:AST-084 FR6 tie rule in #12205, which also needs one description fix.
#12187: approve, pending CI. Every answer stays the same on the icon libraries checked, and a search that needs several passes is faster.
#12205: changes requested. Current FR6 ends equal scores with "then by id", and this pull request adds a key before it that puts first an icon whose id the query names in full; an engineering owner records the decision by commenting /approve-spec <full head SHA> on #12205 (the author may do so as an engineering owner), or says how the rule should change, including whether an id that repeats a query word, such as check-check for check, counts as named in full.
- The description says the definitions answer in a project with no icon set is unchanged, but that answer goes through the same tie key, so
justify alignnow listsalignJustifybeforealignEnd; reword that line.
Whole stack: passes, with CI still running on this head; a pull request in this stack lands only when it and every pull request below it are approved.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- #12187 changeset: each search works out every set's words once and each query's forms once per pass: verified (
icon-ranking.mjs:498-517,:653-672,:682). - #12187 changeset and description: answers are unchanged: verified (every ranking checked on two open-source icon libraries and the Astryx definitions matches the base).
- #12187 description: a query of several words takes up to four passes, each rebuilding every icon's words: verified in the base's
rankIcons()andrankTerm(). - #12187 description: each search starts afresh, so an edited set answers from its new data: verified (
icon-ranking.mjs:500;icon.test.mjs:768-779). - #12187 description:
matchIcon()keeps its signature and the one matcher: verified (icon-ranking.mjs:149-151). - #12187 description: timings on four published sets: direction corroborated (a several-pass search on a 2,295-icon library drops from about 18 to 15 ms); the exact figures were not reproduced.
- #12187 description: no public API, product behavior or policy change, and its testing command: verified (the listed test files pass).
- #12205: tied icons were ordered by id, so
plus addputfolder-plusfirst: verified (the new test fails on #12187's head). - #12205: an icon whose id the query names in full now leads a tie, then id order, with the
arrowcase unchanged: verified (icon-ranking.mjs:703,:713,:726-731;icon.test.mjs:83-113). - #12205: only tie order moves, never scores or which icons answer: verified over every ranking checked.
- #12205: the definitions answer in a project with no icon set is unchanged: false (finding above).
- #12205: bug-fix framing and "one defect is restored": the base follows current FR6's id order, so this is the FR6 change awaiting the owner decision, not a restoration.
- #12205: measurements over four published icon sets, blind judging and the rejected alternative: not reproducible from the repository.
- #12205: regression test, testing command, no new public API, no internal context and the writing rubric results: verified.
- #12205 changeset:
plusbeforefolder-plus, remaining ties in id order: verified.
Files:
.changeset/icon-finder-speed.md: clear.changeset/icon-tie-order.md: cleardocs/specs/AST-084-icon-sets/spec.md: tie clause awaits an engineering owner's decisionpackages/cli/api/icon/icon.doc.mjs: clear (matches the proposed FR6)packages/cli/api/icon/icon.test.mjs: clearpackages/cli/foundation/discovery/icon-ranking.mjs: clear; its tie key drives the description finding
2f120de to
a3f7102
Compare
|
Owner decision (engineering owner, covering this pull request): within equal scores, an icon whose id the query names in full leads; a repeated id word counts, so |
|
/approve-spec a3f7102 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The new tie rule in spec:AST-084 FR6 is approved by an engineering owner for this head, and the code, the icon() doc, the changeset and the test match it. The new test fails on the base and passes here, and comparing the base and head ranking over the lucide and heroicons ids changes only the order of equally scored icons, never which icons answer or their scores. The description's claim about the no-set definitions answer now matches the head.
Claims and files checked
Review mode: full; reason: rebase
- Claims:
- The FR6 record change adds one tie rule and keeps id order for the rest: verified (
spec.md:262-264,icon-ranking.mjs:757-765). - The icon tests and the icon-set checks pass: verified (158 tests in the four listed files).
- Before the change,
plus addanswersfolder-plusbeforeplus, andarrow-down-up-locksorts beforearrows-up-down: verified (the new test fails on the base aticon.test.mjs:100). - After the change
plusleads, a plural id word counts as named, and ties with no fully named id keep id order: verified (icon.test.mjs:83-113). - Only tie order moves; scores, matches and which icons answer stay the same: verified (base-to-head ranking comparison).
- With no icon set, the definitions answer follows the same rule (
justify alignlistsalignJustifyfirst): verified (command run on base and head). - The measurement over agent-style requests in four published icon sets: not checkable from the repository; not relied on.
- One change, no tagalongs and no new public API: verified.
- The changeset: a tie goes to the icon the query names in full, and remaining ties keep id order: verified.
- The FR6 record change adds one tie rule and keeps id order for the rest: verified (
- Files:
.changeset/icon-tie-order.md: cleardocs/specs/AST-084-icon-sets/spec.md: clearpackages/cli/api/icon/icon.doc.mjs: clearpackages/cli/api/icon/icon.test.mjs: clearpackages/cli/foundation/discovery/icon-ranking.mjs: clear
- #12072 fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint Author: Joey Farina <[email protected]> - #12274 fix(core): cap the Selector family's trigger-width list minimum at the viewport Author: josephfarina <[email protected]> - #12215 fix(cli): advise keeping one dependency when two packages declare one provider ID Author: Joey <[email protected]> - #12322 [experimental] export --reverse: use the project's own copy of an aliased file, or restore the page's copy with its paths entry Author: josephfarina <[email protected]> - #12403 docs(core): Text's as and PowerSearch's statusVariant list every value their types allow Author: Joey Farina <[email protected]> - #12494 fix(templates): dashboard templates use page sections, not cards, for page regions Author: Joey Farina <[email protected]> - #12282 fix(cli): theme build --check and doctor ignore which CLI release, and which command name, built a theme Author: Joey Farina <[email protected]> - #12420 fix(Chat): ChatToolCalls and ChatDictationButton without a required prop name it and the fix in development Author: Joey Farina <[email protected]> - #12205 fix(cli): equally scored icons put first one whose id the query names in full Author: Joey Farina <[email protected]> - #12455 fix(core): a theme sets the room between a checkbox or a switch and its label Author: josephfarina <[email protected]> - #12658 perf(cli): the first theme build after a CLI upgrade reuses the JavaScript it compiled from a theme's local modules Author: Joey <[email protected]> - #12323 [experimental] export: React logs no render timings while the export draws a page Author: Joey Farina <[email protected]>
|
Landed in #12713. |
Record change:
spec:AST-084FR6 adds one tie rule: within a set, among equal scores, an icon whose id the query names in full comes first, and id order still decides the rest.Checks: the icon tests and the icon-set checks pass locally; on a fixed set of agent-style requests across four published icon sets, right first answers rise in every set and none are lost.
User impact
When several icons tie at one score,
astryx experimental iconorders them by id. For a request whose words fit a plain icon and its variants equally, the variant whose id sorts first wins: with a published set chosen,plus add icongetsfolder-plusbeforeplus, andup down arrow iconsgetsarrow-down-up-across-linebeforearrows-up-down.Problem and solution fit
Id order is arbitrary for the reader. Among tied icons, one whose id the query names in full (every word of the id is a query word, or its plural or singular) is the direct answer, and a variant adds words the request never asked for. This PR puts such an icon first within a tie and keeps id order for the rest.
Expected behavior and authority
docs/specs/AST-084-icon-sets/spec.mdFR6 owns the order of equal scores. This PR adds the rule to that sentence: after set order, the name/meaning rank and the tag position, an icon whose id the query names in full, then id order.Smallest restoration
One sort key in the finder's ranking, before id order: whether the query names every word of the icon's id. Nothing else moves: scores, matches and which icons answer stay the same.
Evidence
folder-plusandplus, both taggedadd, the queryplus addanswersfolder-plusfirst.plusfirst, thenfolder-plus.arrowagainsta-arrow-downandarrow-down), ties keep id order.justify align,alignJustifynow comes beforealignEnd); on the request set, no definitions answer changed.infoahead of the circled question mark), which blind judges called clear misses.packages/cli/api/icon/icon.test.mjs.Scope
Components: cli (
foundation/discovery/icon-ranking.mjs,api/icon/icon.doc.mjs), AST-084 FR6Testing
npx vitest run --project node packages/cli/api/icon/icon.test.mjs packages/cli/foundation/discovery/icon-set-checks.test.mjs packages/cli/foundation/discovery/template-icons.test.mjs packages/cli/api/icon/search/icon-index.test.mjsWriting rubric results
R1 narration: none; the FR6 clause states the order in the present tense.
R2 research: none in the record; the measurement stays in this description.
R3 evidence: no evidence, basis, or verification cell changed.
R4 rejected alternatives: none added to the record.
R5 change references: none.
R6 open questions: none touched.
R7 project status: none.