Repository navigation
cli: include integration-contributed components in unified search/build - #5259
Merged
Merged
Conversation
search/build's component candidate list came from gatherComponents(coreDir), which only ever scanned @astryxdesign/core. A project's configured integrations were never part of the pool, so an integration-only component (no core equivalent, no name collision) was invisible to `astryx search` and `astryx build`, even though `component --list` and `component <Name>` already resolve it via the same loadedIntegrations data. The two discovery paths silently disagreed. Split gatherComponents into gatherCoreComponents (unchanged) and gatherIntegrationComponents, which reuses loadIntegrationsSafely + discoverIntegrationComponents — the same functions component/list.mjs already uses to make integration components show up in `component --list`. gatherComponents now merges both, and its call site passes cwd alongside coreDir so the integration lookup has a project root to resolve from. New tests stand up a temp consumer with a stub core and an installed integration (same harness as template-integration.test.mjs), and assert the integration's component appears in search results with the integration package as its import hint.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cixzhang
approved these changes
Aug 24, 2026
cixzhang
left a comment
Contributor
There was a problem hiding this comment.
Thanks — search and build finally agreeing with component --list is the right fix, and the test fails without it. Merging as is; one optional nit inline.
[Reviewed by Robohands]
| name: rec.name, | ||
| keywords: doc && Array.isArray(doc.keywords) ? doc.keywords : [], | ||
| description: doc ? doc.usage?.description || doc.description || '' : '', | ||
| _import: rec.package, |
Contributor
There was a problem hiding this comment.
component <Name> resolves the exports subpath (_adapter.mjs:405) — this hint stays at package level.
cixzhang
enabled auto-merge (squash)
August 24, 2026 13:35
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
- add the PR reference to all 45 pending changesets, in prose rather than on the handle line (a bare @handle line is what check-changesets requires) - credit @rubyycheung, not @RubyCheung, for the Dialog responsive work in #5352; those are two different real GitHub accounts - add two missing changesets for merged work that changes published behaviour: #4605 (Breadcrumbs current-item weight) and #5259 (CLI unified search includes integration components)
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
- add the PR reference to all 45 pending changesets, in prose rather than on the handle line (a bare @handle line is what check-changesets requires) - credit @rubyycheung, not @RubyCheung, for the Dialog responsive work in #5352; those are two different real GitHub accounts - add two missing changesets for merged work that changes published behaviour: #4605 (Breadcrumbs current-item weight) and #5259 (CLI unified search includes integration components)
cixzhang
added a commit
that referenced
this pull request
Aug 24, 2026
* docs: consolidate + credit changesets for v0.5.0 - add the PR reference to all 45 pending changesets, in prose rather than on the handle line (a bare @handle line is what check-changesets requires) - credit @rubyycheung, not @RubyCheung, for the Dialog responsive work in #5352; those are two different real GitHub accounts - add two missing changesets for merged work that changes published behaviour: #4605 (Breadcrumbs current-item weight) and #5259 (CLI unified search includes integration components) * docs: add the PR reference to the PowerSearch operator-menu changeset #5242 landed while this PR was open. * docs: add the PR reference to the merged-refs stability changeset #5429 landed while this PR was open.
josephfarina
pushed a commit
that referenced
this pull request
Sep 2, 2026
…in kit Rebased onto main, which landed integration search (#5259) and the scorer-level false-direct-match fix (#5614) while this was open. Both are main's implementations and are untouched: this branch no longer rewrites gatherComponents, so the two regressions that rewrite caused go with it — an integration result reports its own package again, and a broken config no longer turns a Core `button` search into an empty success. What is left is the part that did not land. A page template's keywords include every component its source renders, so `build "actionable warning banner"` returned login, contact-form and documentation-design at 95 apiece on an exact hit for "banner" alone. Coverage now gates the pages group instead of garnishing the score, and a thin kit names the browse commands rather than reading as "the package has nothing". scoreQuery reports the coverage it already computed as matchedTerms / queryTerms, because a single strong hit and a broad weak one land on the same score and the gate cannot tell them apart otherwise. The guidance-tier indexing goes up separately, as asked.
josephfarina
pushed a commit
that referenced
this pull request
Sep 3, 2026
…in kit Rebased onto main, which landed integration search (#5259) and the scorer-level false-direct-match fix (#5614) while this was open. Both are main's implementations and are untouched: this branch no longer rewrites gatherComponents, so the two regressions that rewrite caused go with it — an integration result reports its own package again, and a broken config no longer turns a Core `button` search into an empty success. What is left is the part that did not land. A page template's keywords include every component its source renders, so `build "actionable warning banner"` returned login, contact-form and documentation-design at 95 apiece on an exact hit for "banner" alone. Coverage now gates the pages group instead of garnishing the score, and a thin kit names the browse commands rather than reading as "the package has nothing". scoreQuery reports the coverage it already computed as matchedTerms / queryTerms, because a single strong hit and a broad weak one land on the same score and the gate cannot tell them apart otherwise. The guidance-tier indexing goes up separately, as asked.
josephfarina
added a commit
that referenced
this pull request
Sep 3, 2026
… word a match (#5320) * fix(cli): gate the build pages group on query coverage, and hint a thin kit Rebased onto main, which landed integration search (#5259) and the scorer-level false-direct-match fix (#5614) while this was open. Both are main's implementations and are untouched: this branch no longer rewrites gatherComponents, so the two regressions that rewrite caused go with it — an integration result reports its own package again, and a broken config no longer turns a Core `button` search into an empty success. What is left is the part that did not land. A page template's keywords include every component its source renders, so `build "actionable warning banner"` returned login, contact-form and documentation-design at 95 apiece on an exact hit for "banner" alone. Coverage now gates the pages group instead of garnishing the score, and a thin kit names the browse commands rather than reading as "the package has nothing". scoreQuery reports the coverage it already computed as matchedTerms / queryTerms, because a single strong hit and a broad weak one land on the same score and the gate cannot tell them apart otherwise. The guidance-tier indexing goes up separately, as asked. * refactor(cli): move the thin-kit hint out to its own PR Review asked for the guidance indexing and the thin-kit hint as separate small PRs. The hint is now #5938 and the guidance tier is #5937, so this branch keeps only the coverage gate on the build pages group and the matchedTerms/queryTerms plumbing that gate needs. No behaviour change to the gate itself. --------- Co-authored-by: Joey Farina <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5258.
Problem
search/build's component candidate list came fromgatherComponents(coreDir), which only ever scanned@astryxdesign/core. A project's configured integrations were never part of the pool, so an integration-only component (no core equivalent, no name collision) was invisible toastryx searchandastryx build, even thoughcomponent --listandcomponent <Name>already resolve it via the sameloadedIntegrationsdata.Fix
Split
gatherComponentsintogatherCoreComponents(unchanged) andgatherIntegrationComponents, which reusesloadIntegrationsSafely+discoverIntegrationComponents— the same functionscomponent/list.mjsalready uses to make integration components show up incomponent --list.gatherComponentsnow merges both, and its call site passescwdalongsidecoreDirso the integration lookup has a project root to resolve from.An integration component's
importhint is set to its owning package name (rec.package), matching the granularitycomponent --list's brief detail already uses (package: integration.name) — no new import-path-resolution logic invented.Testing
New tests in
search.test.mjsstand up a temp consumer with a stub core and an installed integration (same harness astemplate-integration.test.mjs), and assert the integration's component appears in search results with the integration package as its import hint.search.test.mjsalone: 13/13 passed (11 pre-existing + 2 new).api/search,api/build,api/componenttogether: 35/36 passed. The one failure (component.test.mjs, a case-sensitivity check) is in a file this diff doesn't touch, and reproduces identically without this change — it's a case-insensitive-filesystem artifact of the sandbox this was developed in, not a regression from this patch.Happy to adjust the
importhint shape or split anything out if you'd rather keep this more minimal.