Skip to content

Polish component search explanations#2451

Open
Mbeaulne wants to merge 1 commit into
06-23-add_compatible_component_suggestionsfrom
06-23-polish_component_search_explanations
Open

Polish component search explanations#2451
Mbeaulne wants to merge 1 commit into
06-23-add_compatible_component_suggestionsfrom
06-23-polish_component_search_explanations

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Introduces a dedicated componentSearchExplanations service that centralises the human-readable labels for matched search fields and a formatMatchedFieldsExplanation helper that converts a list of MatchField values into a natural-language sentence (e.g. "Matched name, inputs/outputs, and metadata."). The MATCH_FIELD_LABEL map that previously lived inline in DashboardComponentsV2View has been removed in favour of the shared COMPONENT_SEARCH_MATCH_FIELD_LABEL export.

Both ComponentCard (dashboard) and ComponentMarkup (sidebar) now show a "Why: …" explanation for lexical matches, falling back to the AI rerank reason when one is present. Previously only AI-reranked results showed this explanation.

The no-results message in both the dashboard and the editor sidebar has been split into two lines: a concise "No components matched …" sentence followed by actionable guidance on what kinds of terms to try.

matchedFields is now threaded through ComponentSearchV2Result and ComponentSearchResults so the sidebar can render per-field match explanations alongside rerank metadata.

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 component search in the dashboard or editor sidebar and type a query that matches components lexically (e.g. "standard" or "csv").
  2. Confirm that each result shows a "Why: Matched …" line describing which fields matched.
  3. Type a query that returns no results (e.g. "no-such-component") and confirm the two-line no-results guidance appears.
  4. Configure AI search and confirm that AI rerank reasons still take precedence over the lexical explanation.

Additional Comments

The formatMatchedFieldsExplanation helper deduplicates field labels before joining them, so repeated entries in matchedFields do not produce malformed output.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-23-polish_component_search_explanations/6663239

Mbeaulne commented Jun 23, 2026

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 force-pushed the 06-23-add_compatible_component_suggestions branch from 10ad78e to 46a3885 Compare June 24, 2026 19:52
@Mbeaulne Mbeaulne force-pushed the 06-23-polish_component_search_explanations branch 2 times, most recently from 457c9d6 to f0d2687 Compare June 25, 2026 15:55
@Mbeaulne Mbeaulne force-pushed the 06-23-add_compatible_component_suggestions branch from 0cce278 to 3c20589 Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-polish_component_search_explanations branch from f0d2687 to 30c8633 Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-polish_component_search_explanations branch from 30c8633 to 6663239 Compare June 25, 2026 19:43
@Mbeaulne Mbeaulne force-pushed the 06-23-add_compatible_component_suggestions branch from 3c20589 to 1618ff9 Compare June 25, 2026 19:43
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