Skip to content

Decouple editor component search input#2452

Open
Mbeaulne wants to merge 1 commit into
06-23-polish_component_search_explanationsfrom
06-23-decouple_editor_component_search_input
Open

Decouple editor component search input#2452
Mbeaulne wants to merge 1 commit into
06-23-polish_component_search_explanationsfrom
06-23-decouple_editor_component_search_input

Conversation

@Mbeaulne

@Mbeaulne Mbeaulne commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Description

Improves the responsiveness of the component search by introducing a debounced query update with useDeferredValue and useTransition. The input field now reflects typing immediately while search results only update after a 500ms debounce delay, preventing unnecessary queries on every keystroke. The deferred query is passed to both useComponentSearchV2State and ComponentSearchResults to ensure consistent behavior.

Also corrects the Deep AI search tooltip to accurately reflect a limit of 100 matching components (previously stated 200).

A test is added to verify that the input value updates immediately while the results query remains unchanged until the debounce period has elapsed.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • 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 panel in the editor.
  2. Type a query and verify the input updates immediately.
  3. Confirm that search results do not update until 500ms after the last keystroke.
  4. Run the new ComponentSearchV2Content.test.tsx test to validate debounce timing behavior.

Additional Comments

The 500ms debounce constant (EDITOR_SEARCH_RESULT_DEBOUNCE_MS) is defined at the module level for easy adjustment if the delay needs tuning in the future.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-23-decouple_editor_component_search_input/76d80b5

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 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-decouple_editor_component_search_input branch from ec1b577 to 87d28db 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-decouple_editor_component_search_input branch 2 times, most recently from 0ea0a15 to 9551590 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-decouple_editor_component_search_input branch from 9551590 to 76d80b5 Compare June 25, 2026 19:43
@Mbeaulne Mbeaulne force-pushed the 06-23-polish_component_search_explanations branch from 30c8633 to 6663239 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.

2 participants