Skip to content

component search v2 - unify component search across standard, user, published, and registered sources#2311

Draft
Mbeaulne wants to merge 1 commit into
05-25-component_search_v2from
05-26-component_search_v2_-_unify_component_search_across_standard_user_published_and_registered_sources
Draft

component search v2 - unify component search across standard, user, published, and registered sources#2311
Mbeaulne wants to merge 1 commit into
05-25-component_search_v2from
05-26-component_search_v2_-_unify_component_search_across_standard_user_published_and_registered_sources

Conversation

@Mbeaulne
Copy link
Copy Markdown
Collaborator

@Mbeaulne Mbeaulne commented May 26, 2026

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:

  • A ComponentSource type and SourcedReference wrapper are introduced in componentSearchIndex.ts so that source attribution is carried through the entire pipeline — from collection, through hydration, into the index, and out to the UI.
  • buildSearchIndex and lexicalSearch now accept SourcedReference[] instead of plain ComponentReference[], and IndexEntry / LexicalMatch both carry a source field.
  • collectAllSourcedReferences replaces collectRawReferences, merging all four sources with a priority-ordered deduplication strategy (standard > published > registered > user).
  • Published components are fetched directly from the backend API, gated on the backend being configured and reachable. If unavailable, the search degrades gracefully without erroring.
  • Registered external libraries are read directly from Dexie and instantiated via the library factory, without requiring the editor-scoped ComponentLibraryProvider to be mounted.
  • A new ensureLibraryFactoriesRegistered utility provides idempotent factory registration so the dashboard page can instantiate stored libraries independently of the editor.
  • useDeferredValue is removed in favour of passing the query directly to lexicalSearch.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

  1. Open the dashboard Components V2 page.
  2. Verify components from the standard library, any registered GitHub libraries, published backend components, and user components all appear in the browse list.
  3. Confirm each card displays the correct source badge.
  4. Search by name, description, input/output, or command and confirm results from multiple sources appear together.
  5. Disable backend connectivity and confirm the page loads without errors, omitting published components silently.
  6. Add a registered external library and confirm its components appear with the library name as the badge label.

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.

Copy link
Copy Markdown
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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Mbeaulne Mbeaulne mentioned this pull request May 26, 2026
3 tasks
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

🎩 Preview

A preview build has been created at: 05-26-component_search_v2_-_unify_component_search_across_standard_user_published_and_registered_sources/35e4e29

@Mbeaulne Mbeaulne force-pushed the 05-26-component_search_v2_-_unify_component_search_across_standard_user_published_and_registered_sources branch from 53db826 to dcacb6b Compare May 26, 2026 20:30
@Mbeaulne Mbeaulne force-pushed the 05-26-component_search_v2_-_unify_component_search_across_standard_user_published_and_registered_sources branch from dcacb6b to 35e4e29 Compare May 27, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant