Skip to content

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
octo-patch:fix/agentflows-server-side-search
Open

fix(ui): add server-side search to Agentflows page to search across all pages#6166
octo-patch wants to merge 2 commits intoFlowiseAI:mainfrom
octo-patch:fix/agentflows-server-side-search

Conversation

@octo-patch
Copy link
Copy Markdown

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 filterFlows with server-side search using a debounced 300ms input handler, following the same pattern applied to the Chatflows page in #6155.

Changes:

  • Added searchQuery state to track the debounced search term
  • Updated refresh() to accept and pass a search parameter to the API
  • Added useEffect to debounce search input and trigger server-side requests on change
  • Removed filterFlows client-side filter function
  • Updated card view and list view to remove client-side filtering
  • Updated search placeholder to "Search Name, Category, or ID"

The server already supports the search query parameter for agentflows (added in the recent chatflows fix which handles AGENTFLOW type via the same service).

Testing

  • Search in the Agentflows page now queries the server with the search term
  • Results are fetched from all pages, not just the current one
  • Search is debounced (300ms) to avoid excessive API calls
  • Switching between V1/V2 versions and paginating works correctly with search

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
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

Client-side search on Agentflows page only searches current page

1 participant