Skip to content

fix: server-side search for Chatflows page to search across all pages#6155

Open
octo-patch wants to merge 1 commit intoFlowiseAI:mainfrom
octo-patch:fix/chatflows-search-pagination
Open

fix: server-side search for Chatflows page to search across all pages#6155
octo-patch wants to merge 1 commit intoFlowiseAI:mainfrom
octo-patch:fix/chatflows-search-pagination

Conversation

@octo-patch
Copy link
Copy Markdown

Fixes the same client-side search limitation reported for Agentflows in #5868, but for the Chatflows page.

Problem

The Chatflows page uses a local filterFlows function that filters only the data loaded for the current page. When users have many chatflows spread across multiple pages and type in the search box, results from other pages are never shown.

Solution

  • Backend: Add search query parameter to the getAllChatflows controller and service. The search filter matches against name, category, and id using case-insensitive LIKE queries, and is applied before pagination so that total accurately reflects the filtered count.
  • Frontend: Replace client-side filterFlows with a debounced (300ms) effect that passes the search term to the API and resets to page 1 on new searches. Updated search placeholder to "Search Name, Category, or ID".

Testing

  1. Create more chatflows than fit on one page (e.g., >10 with default page size)
  2. Type a name that matches a chatflow on page 2 or later
  3. Verify that the matching chatflow appears immediately without manually navigating pages

Note: This fix mirrors the approach used in PR #6133 for the Agentflows page.

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 search for chatflows, moving the filtering logic from the frontend to the backend. The getAllChatflows endpoint now accepts a search query, which the service uses to filter results by name, category, or ID. The UI has been updated with a debounced search mechanism to trigger these requests. 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.

1 participant