fix(ui): add server-side search to Agentflows page to search across all pages#6166
Open
octo-patch wants to merge 2 commits intoFlowiseAI:mainfrom
Open
fix(ui): add server-side search to Agentflows page to search across all pages#6166octo-patch wants to merge 2 commits intoFlowiseAI:mainfrom
octo-patch wants to merge 2 commits intoFlowiseAI:mainfrom
Conversation
The Agentflows page was using client-side filtering which only searches the current page of results. This adds debounced server-side search, ensuring search works across all paginated results (same approach as the recent Chatflows page fix). Fixes FlowiseAI#5868
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements server-side searching for chatflows and agentflows, replacing the previous client-side filtering logic. The backend now supports searching by name, category, and ID using SQL LIKE queries, while the frontend has been updated to include a debounced search input that triggers API requests with the search term. I have no feedback to provide.
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.
Fixes #5868
Problem
The Agentflows page was using client-side filtering (
filterFlows) which only searches within the currently loaded page of results. When users have many agentflows and paginate, searching only finds items on the visible page.Solution
Replaced client-side
filterFlowswith server-side search using a debounced 300ms input handler, following the same pattern applied to the Chatflows page in #6155.Changes:
searchQuerystate to track the debounced search termrefresh()to accept and pass asearchparameter to the APIuseEffectto debounce search input and trigger server-side requests on changefilterFlowsclient-side filter functionThe server already supports the
searchquery parameter for agentflows (added in the recent chatflows fix which handles AGENTFLOW type via the same service).Testing