component search v2 - unify component search across standard, user, published, and registered sources#2311
Draft
Conversation
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🎩 PreviewA preview build has been created at: |
53db826 to
dcacb6b
Compare
…ublished, and registered sources
dcacb6b to
35e4e29
Compare
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.

Description
The dashboard Components V2 search page now aggregates components from all four sources — the curated standard library, backend-published components, registered external libraries (e.g. GitHub repos), and local user components — into a single unified, deduplicated search index. Each component card displays a source badge (e.g. "Standard", "Published", or the library name) so users can immediately tell where a result originates.
Previously, the search only covered the standard library and user components. Published components from the backend and registered external libraries were silently omitted.
Key changes:
ComponentSourcetype andSourcedReferencewrapper are introduced incomponentSearchIndex.tsso that source attribution is carried through the entire pipeline — from collection, through hydration, into the index, and out to the UI.buildSearchIndexandlexicalSearchnow acceptSourcedReference[]instead of plainComponentReference[], andIndexEntry/LexicalMatchboth carry asourcefield.collectAllSourcedReferencesreplacescollectRawReferences, merging all four sources with a priority-ordered deduplication strategy (standard > published > registered > user).ComponentLibraryProviderto be mounted.ensureLibraryFactoriesRegisteredutility provides idempotent factory registration so the dashboard page can instantiate stored libraries independently of the editor.useDeferredValueis removed in favour of passing the query directly tolexicalSearch.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
Additional Comments
The deduplication strategy ensures that when the same component digest appears in multiple sources, the highest-priority source label is shown. Registered libraries that fail to load log a warning but do not prevent the rest of the search from functioning.