Skip to content

fix(cli): astryx component Flex names Stack first - #12260

Closed
josephfarina wants to merge 4 commits into
mainfrom
josephfarina/stack-card-flex-synonym
Closed

josephfarina wants to merge 4 commits into
mainfrom
josephfarina/stack-card-flex-synonym

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Flex is the name Chakra UI, Mantine and other libraries give the part that lays children out in a row or a column. An agent or a person who asks Astryx for it gets the wrong first suggestion:

Run First suggestion before First suggestion after
astryx component Flex Layout (the page frame) Stack
astryx component flex Layout Stack

Stack (with HStack and VStack) is the Astryx part for a row or a column of children. Layout is the page frame, a different job.

Problem and solution fit

  • Why it happens: a lookup that misses orders its suggestions with the search cards' synonyms. Stack's card lists flex row, flex column and div with display flex, but not the bare name Flex, so no card claims the exact word and Layout comes first on other signals.
  • Why it harms the task: an agent acts on the first suggestion and reads the page frame's props for a row of buttons.
  • The fix adds Flex, Chakra Flex and Mantine Flex to Stack's card synonyms, in the same form the card already uses for other libraries' names (Ant Space).

Expected behavior and authority

  • packages/cli/api/search/ORDERING.md: a card holds "the words people use for it"; the card's synonyms are reviewed data.
  • docs/contributing/cli-conventions.md: an error gives "a suggestion it can act on".

Smallest restoration

One data change: three synonyms on one card. No code, weight, option or JSON field changes.

Evidence

  • Before (main): astryx --json component Flex suggests Layout, then Stack.
  • After: Stack, then Layout.
  • Unchanged: astryx search flex and astryx search "flex row" return the same results in the same order.
  • Search order measurement on the four evaluation sets spec:AST-083 FR6 names (held-out, fresh, synthetic and cold-start), plus the search replay set: no row is worse; details under Search replay.

Scope

Components: CLI search cards (Stack)

  • One defect is restored.
  • 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.
  • Public text and artifacts contain no internal Meta context.

Testing

pnpm exec vitest run --project node packages/cli/api/search/search.test.mjs packages/cli/api/search/_order.test.mjs packages/cli/api/search/_entries.test.mjs packages/cli/api/search/search.named-keywords.test.mjs packages/cli/foundation/text/suggest-order.test.mjs packages/cli/foundation/suggest/other-command.test.mjs packages/cli/api/component
# 17 files, 313 tests passed

Search replay

  • Search: across the replayed set of real search requests, results change for a handful of queries in a core-only project and in a project with integrations. Every changed top three was judged by the search marker over three runs; none got worse (no good answer lost). A replayed set of fresh requests is unchanged.
  • Lookups: only astryx component Flex (and component flex) changes: Stack now comes first, then Layout. Every other lookup name replays identically.
  • Synthetic set: every synthetic request with an accepted answer keeps the same first answer (no gains, no losses); a few top-three lists reorder below first place.
  • Held-out set: the share of held-out searches whose first answer is a strong fit is unchanged; lookups put the right answer first slightly more often, with no new wrong opens.
  • Cold-start set (Layout, Chat and Navigation components and hooks with their per-item search data removed, probed from their own names and docs; set fixed before any probe ran): the own entry stays first, and in the top three, exactly as often as on main, in a core-only project and in a project with integrations; no probe's top three changes. The same probes with every item's data as shipped: unchanged.
  • Fresh install: every changed query gives the same answer from a fresh home folder as from a warm one, in a core-only project and in a project with integrations.
  • Docs forms and astryx build: unchanged.

Stack's search card lists `Flex`, the name Chakra UI and Mantine use for a
row or column of children, so a lookup for it suggests Stack before Layout.
@vercel

vercel Bot commented Nov 17, 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:31pm UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 12:38 PM UTC

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · c98e736

Storybook · Sandbox · built from this PR's head

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


Generated by PR Enrichment workflow | View current CI run

@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 Flex synonym does what the title says, but the measurement the result-order spec requires for this reorder is not in the description yet.

  • Add the held-out and fresh failed-lookup evaluation results (main against this head, with paired 95% intervals) to the description, because spec:AST-083 FR7 lets the astryx component suggestion order change only under that measurement, and the current note defers it and names only the held-out, fresh and synthetic search sets.

Everything else checked out: with this change on main, astryx component Flex in any case lists Stack then Layout with the same reasons and exit code, the description's 313 tests pass, and astryx search gives identical answers across 2,571 replayed queries, so the search sets should show no change.

Claims and files checked

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

  • Changeset, astryx component Flex names Stack first: verified with this change on main.
  • Changeset, Stack's search card lists Flex: verified (packages/cli/api/search/_cards.json:3577).
  • Changeset, Chakra UI and Mantine call this part Flex: public library naming, not checkable in this repository.
  • Changeset, the missed lookup suggests Stack before Layout: verified.
  • Description, before and after table for Flex and flex: verified on main and with this change.
  • Description, Stack is the row-or-column part and Layout the page frame: verified against both components' docs.
  • Description, no card names the bare word, so Layout leads on other signals: verified; both docs declare the keyword flex, and Layout lists it earlier.
  • Description, three synonyms in the card's existing library-name form: verified.
  • Description, the quoted lines from the search ordering notes and the CLI conventions: verified.
  • Description, one data change with no code, weight, option or JSON field change: verified.
  • Description, astryx search flex and astryx search "flex row" are unchanged: verified, with 2,569 other queries.
  • Description, the search-order measurement is added before review: not present (the item above).
  • Description, no new public API, default or internal context: verified.
  • Description, 17 test files and 313 tests pass: verified on this head and on its merge with main.
  • .changeset/stack-card-flex-synonym.md: clear.
  • packages/cli/api/search/_cards.json: the measurement item above.

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 17, 2026 09:49

@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 failed-lookup replay now in the description settles the astryx component Flex reorder, but the search half of the measurement is still incomplete.

  • Add the synthetic and cold-start set results to the Search replay section and replace the Evidence bullet that still says the held-out, fresh and synthetic measurement is "added here before review", because spec:AST-083 FR6 lets the search-order change the description reports ship only when all four sets show no row worse.

Everything else checked out: with this change on current main only Flex, flex and FLEX change across 5,947 replayed lookup names, 2,565 search queries and 30 build ideas give identical answers, and the description's 313 tests pass.

Claims and files checked

Review mode: incremental; reason: none

  • Changeset, astryx component Flex names Stack first: verified with this change on current main.
  • Changeset, Stack's search card lists Flex: verified (packages/cli/api/search/_cards.json:3577).
  • Changeset, Chakra UI and Mantine call this part Flex: public library naming, not checkable in this repository.
  • Changeset, the missed lookup suggests Stack before Layout: verified.
  • Description, before and after table for Flex and flex: verified.
  • Description, Stack is the row-or-column part and Layout the page frame: verified against both components' docs.
  • Description, no card names the bare word, so Layout leads on other signals: verified; both docs declare the keyword flex, and Layout lists it earlier.
  • Description, three synonyms in the card's existing library-name form, and the quoted lines from the search ordering notes and the CLI conventions: verified.
  • Description, one data change with no code, weight, option or JSON field change: verified.
  • Description, astryx search flex and astryx search "flex row" are unchanged: verified, with 2,563 other queries.
  • Description, the search-order measurement on the held-out, fresh and synthetic sets is added before review: not supported for the synthetic set (the item above).
  • Search replay, a handful of real search requests change and none got worse, fresh requests unchanged: those request sets are not in this repository; consistent with no change across 2,565 card-derived queries.
  • Search replay, among lookups only component Flex and component flex change: verified across 5,947 names (FLEX, the same name in another case, changes too).
  • Search replay, docs forms and astryx build unchanged: verified; docs lookups never read the search cards, and 30 build ideas give identical answers.
  • Description, no new public API, default or internal context: verified.
  • Description, 17 test files and 313 tests pass: verified with this change on current main.
  • .changeset/stack-card-flex-synonym.md: clear.
  • packages/cli/api/search/_cards.json: the measurement item above.

Automated review (maintainer link)

@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 new synthetic and held-out results close most of the earlier measurement gap, but the cold-start result the result-order spec requires is still missing, and one Evidence line misdescribes the search ordering notes.

  • Add the cold-start evaluation set result (main against this head) to the Search replay section, because spec:AST-083 FR6 defines that set as catalog items hidden from fitting, ranked from their own docs, while the current "Cold start" bullet compares a fresh home folder with a warm one.
  • Reword the Evidence bullet that says the measurement covers "all four sets ORDERING.md names for a card change", because packages/cli/api/search/ORDERING.md line 31 names three sets (held-out, fresh and synthetic), lists no real-replay set, and FR6's fourth set is cold-start.

The Flex lookup itself does what the title says: Stack now comes first in any case, the error keeps its two entries and reasons, and the description's 313 tests pass on this head.

Claims and files checked

Review mode: incremental; reason: none

  • Changeset, astryx component Flex names Stack first: verified on the base and head trees.
  • Changeset, Stack's search card lists Flex: verified (packages/cli/api/search/_cards.json:3577).
  • Changeset, Chakra UI and Mantine call this part Flex: public library naming, not checkable in this repository.
  • Changeset, the missed lookup suggests Stack before Layout: verified.
  • Description, before and after table for Flex and flex: verified on the base and head trees.
  • Description, Stack is the row-or-column part and Layout the page frame: verified against both components' docs.
  • Description, no card names the bare word, so Layout leads on other signals: verified; both docs declare the keyword flex, and Layout lists it earlier.
  • Description, three synonyms in the card's existing library-name form, and the quoted lines from the search ordering notes and the CLI conventions: verified.
  • Description, one data change with no code, weight, option or JSON field change: verified.
  • Description, astryx search flex and astryx search "flex row" are unchanged: verified, with six more queries.
  • Description, the measurement covers all four sets the search ordering notes name: false (the second item above).
  • Search replay, a handful of real search requests change and none got worse, fresh requests unchanged: those request sets are not in this repository; consistent with unchanged card-derived queries.
  • Search replay, among lookups only component Flex and component flex change: verified (FLEX, the same name in another case, changes too).
  • Search replay, the synthetic set keeps every first answer and the held-out set is no worse: reported; those sets are not in this repository.
  • Search replay, cold start: reports a fresh-versus-warm home folder check, not the spec's cold-start set (the first item above).
  • Search replay, docs forms and astryx build unchanged: verified; docs lookups never read the search cards, and replayed build ideas give identical answers.
  • Scope, no new public API, default or internal context: verified.
  • Testing, 17 test files and 313 tests pass: verified on this head.
  • .changeset/stack-card-flex-synonym.md: clear.
  • packages/cli/api/search/_cards.json: clear; the items above concern the description.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not finished on this head yet.

The description now reports the cold-start evaluation set and names the four sets the result-order spec requires, so both earlier points are resolved. The Flex lookup puts Stack first in any case with the same two suggestions and reasons, search answers are unchanged, and the description's 313 tests pass on this head.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Changeset, astryx component Flex names Stack first: verified on the base and head trees and on the merge with current main.
  • Changeset, Stack's search card lists Flex: verified (packages/cli/api/search/_cards.json:3577).
  • Changeset, Chakra UI and Mantine call this part Flex: public library naming, outside this repository.
  • Changeset, the missed lookup suggests Stack before Layout: verified.
  • Description, before and after table for Flex and flex: verified (FLEX changes the same way).
  • Description, Stack is the row-or-column part and Layout the page frame: verified against both components' docs.
  • Description, a missed lookup orders suggestions with card synonyms, no card held the bare word, and Layout led on other signals: verified (packages/cli/foundation/text/suggest-order.mjs:752-762).
  • Description, three synonyms in the card's existing library-name form: verified.
  • Description, the quoted lines from the search ordering notes and the CLI conventions: verified (packages/cli/api/search/ORDERING.md:18, docs/contributing/cli-conventions.md:18).
  • Description, one data change with no code, weight, option or JSON field change: verified.
  • Description, --json component Flex suggests Layout then Stack before and Stack then Layout after: verified.
  • Description, astryx search flex and astryx search "flex row" are unchanged: verified, with six more queries.
  • Description, the measurement covers the four sets the result-order spec names plus the search replay, with no row worse: the four names match the spec; the results are reported, and the sets are not in this repository.
  • Search replay, real and fresh requests, synthetic, held-out and cold-start sets: reported; the cold-start set matches the spec's definition (items without their per-item search data, ranked from their own names and docs).
  • Search replay, among lookups only component Flex changes: verified for the names checked here, including other cases of the same name.
  • Search replay, a fresh home folder gives the same answers: consistent with the static, local order the spec requires.
  • Search replay, docs forms and astryx build unchanged: docs lookups never read the search cards; build answers carried from the earlier run on the same code.
  • Scope, one defect, no tag-along, no new public API or default, no internal context: verified.
  • Testing, 17 test files and 313 tests pass: verified on this head.
  • .changeset/stack-card-flex-synonym.md: clear.
  • packages/cli/api/search/_cards.json: clear.

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12680 perf(cli): a template's component line resolves its names in one pass, not one full lookup per name
  Author: Joey <[email protected]>
- #12180 fix(core): Calendar weekday names widen their column instead of overlapping
  Author: Joey <[email protected]>
- #12159 feat(cli): make an icon set inside your own app
  Author: Joey Farina <[email protected]>
- #12383 fix(Grid): a responsive column shrinks to a container narrower than minWidth
  Author: Joey Farina <[email protected]>
- #12374 [fix] Icon: a glyph given as name renders and warns, instead of crashing
  Author: Joey Farina <[email protected]>
- #12453 fix(charts): line, area and band default to straight segments
  Author: josephfarina <[email protected]>
- #12296 fix(core): a neutral Badge in a primary or destructive Button meets 4.5:1 on its fill
  Author: Joey Farina <[email protected]>
- #12395 fix(CodeBlock): without a code string, CodeBlock names the prop and the fix in development
  Author: Joey Farina <[email protected]>
- #12260 fix(cli): `astryx component Flex` names Stack first
  Author: Joey Farina <[email protected]>
- #12391 fix(core): a two-lane Toolbar wraps instead of squeezing its start lane
  Author: Joey Farina <[email protected]>
- #12427 fix(core): checkbox and radio marks keep their share of the box a theme sizes
  Author: josephfarina <[email protected]>
- #12725 [experimental] cli: with no icon set, experimental icon names the discover search where it lists packs
  Author: Joey Farina <[email protected]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12738.

@github-actions
github-actions Bot deleted the josephfarina/stack-card-flex-synonym branch November 19, 2026 06:05

This branch was successfully deployed

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