Skip to content

Add component search analytics baseline#2456

Open
Mbeaulne wants to merge 1 commit into
06-23-limit_dashboard_component_browse_renderingfrom
06-23-add_component_search_analytics_baseline
Open

Add component search analytics baseline#2456
Mbeaulne wants to merge 1 commit into
06-23-limit_dashboard_component_browse_renderingfrom
06-23-add_component_search_analytics_baseline

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds analytics tracking to the component library search experience across both the dashboard and editor surfaces. Search completion events are fired with a debounced 400ms delay after results settle, capturing metadata such as query_length, result_count, search_backend, and ai_ranked — intentionally omitting the raw query text to avoid logging potentially sensitive user input.

Tracking is also added to the AI rerank buttons (both "smart" and "deep" modes) and the empty-state suggestion chips, each annotated with the relevant surface identifier (dashboard_v2 or editor_component_search_v2).

The ComponentSearchEmptyStateSuggestions component now accepts a required surface prop so the correct surface label is forwarded to the tracking payload.

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 library search in both the dashboard and the editor.
  2. Type a query and wait ~400ms after results appear — verify a component_library.search.completed event is fired with the correct metadata and that no raw query text is included.
  3. Click an AI rerank button (smart or deep) and confirm a component_library.search.ai_rerank event is fired with the correct mode, surface, and query_length.
  4. Trigger the empty-state suggestions (search for something with no results) and click a suggestion chip — confirm a component_library.search.suggestion event fires with the correct surface and suggested_query.

Additional Comments

Query text is deliberately excluded from all tracking payloads; only query_length is recorded to avoid capturing potentially sensitive search input.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-23-add_component_search_analytics_baseline/202c693

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_component_search_analytics_baseline branch from 9f2815e to ec75162 Compare June 24, 2026 18:11
@Mbeaulne Mbeaulne force-pushed the 06-23-limit_dashboard_component_browse_rendering branch 2 times, most recently from a2838e0 to 2f7cba0 Compare June 24, 2026 18:24
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_analytics_baseline branch from ec75162 to a72488d Compare June 24, 2026 18:24
@Mbeaulne Mbeaulne force-pushed the 06-23-limit_dashboard_component_browse_rendering branch from 2f7cba0 to a2f6e1f Compare June 24, 2026 18:36
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_analytics_baseline branch from a72488d to 2aae5f5 Compare June 24, 2026 18:36
@Mbeaulne Mbeaulne marked this pull request as ready for review June 24, 2026 18:56
@Mbeaulne Mbeaulne requested a review from a team as a code owner June 24, 2026 18:56
@Mbeaulne Mbeaulne force-pushed the 06-23-limit_dashboard_component_browse_rendering branch from a2f6e1f to abc233c Compare June 24, 2026 19:52
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_analytics_baseline branch 2 times, most recently from 14f57a6 to 77887b8 Compare June 25, 2026 15:55
@Mbeaulne Mbeaulne force-pushed the 06-23-limit_dashboard_component_browse_rendering branch 2 times, most recently from 3d182ca to f14066e Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_analytics_baseline branch from 77887b8 to 6fce13b Compare June 25, 2026 19:38
@Mbeaulne Mbeaulne force-pushed the 06-23-limit_dashboard_component_browse_rendering branch from f14066e to 457bc77 Compare June 25, 2026 19:43
@Mbeaulne Mbeaulne force-pushed the 06-23-add_component_search_analytics_baseline branch from 6fce13b to 202c693 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