Conversation
Use keepPreviousData in the component search query to prevent the list from flashing the full unfiltered set while new results load, and show a spinning Loader2Icon inside the search input during fetches. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Improves the workflow editor component search UX by preventing list flicker during filtered searches and surfacing in-flight search state via an inline loading indicator.
Changes:
- Uses React Query
keepPreviousDatafor the component-definition search query to avoid flashing unfiltered results while new results load. - Renames/exposes search state from
isSearchLoadingtoisSearchFetchingand wires it through to the component list UI. - Adds Vitest coverage for the hook behavior and the spinner visibility in the component list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| client/src/shared/queries/platform/componentDefinitionsGraphQL.queries.ts | Adds placeholderData: keepPreviousData and exposes isFetching from the query result. |
| client/src/pages/platform/workflow-editor/hooks/useFilteredComponentDefinitions.ts | Switches from loading to fetching semantics and simplifies selection logic to support previous-data behavior. |
| client/src/pages/platform/workflow-editor/components/WorkflowNodesPopoverMenuComponentList.tsx | Displays an inline spinner in the filter input while search is fetching. |
| client/src/pages/platform/workflow-editor/tests/WorkflowNodesPopoverMenuComponentList.test.tsx | Adds UI tests for filter input rendering and spinner visibility. |
| client/src/pages/platform/workflow-editor/hooks/tests/useFilteredComponentDefinitions.test.ts | Adds hook tests for trimmed filter behavior and previous-data behavior while fetching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
client/src/pages/platform/workflow-editor/components/WorkflowNodesPopoverMenuComponentList.tsx
Show resolved
Hide resolved
client/src/pages/platform/workflow-editor/components/WorkflowNodesPopoverMenuComponentList.tsx
Outdated
Show resolved
Hide resolved
…use shared Spinner - Add conditional pr-8 padding to Input when spinner is visible to prevent text/caret overlap - Replace inline Loader2Icon with shared Spinner component for consistent loading indicators Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
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.


Use keepPreviousData in the component search query to prevent the list
from flashing the full unfiltered set while new results load, and show
a spinning Loader2Icon inside the search input during fetches.
Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com