Skip to content

Client-side search on Agentflows page only searches current page #5868

@nidhishpareek

Description

@nidhishpareek

Describe the bug

Client-side search on Agentflows page only searches current page

Problem
The Agentflows page (packages/ui/src/views/agentflows/index.jsx) uses client-side search via the filterFlows function. This filter only applies to the currently loaded page of data from the paginated API response.
When a user searches for an agentflow by name, category, or ID, the search only matches results within the currently displayed page. If the target agentflow exists on a different page, it will not be found, leading to a poor user experience.

Current Implementation:
// API fetches paginated data
getAllAgentflows.request(nextView === 'v2' ? 'AGENTFLOW' : 'MULTIAGENT', params)
// Client-side filter only works on loaded page
function filterFlows(data) {
return (
data.name.toLowerCase().indexOf(search.toLowerCase()) > -1 ||
(data.category && data.category.toLowerCase().indexOf(search.toLowerCase()) > -1) ||
data.id.toLowerCase().indexOf(search.toLowerCase()) > -1
)
}
Proposed Solution
Implement server-side search with debounced API calls:

  1. Backend Changes:
    • Add search or name query parameter to getAllChatflows API
    • Modify the service query to include WHERE name LIKE %search% OR category LIKE %search% OR id LIKE %search%
  2. Frontend Changes:
    • Add debounce (e.g., 300ms) to search input
    • Trigger API call with search parameter instead of client-side filtering
    • Reset pagination to page 1 when search term changes

Files Affected

  • packages/ui/src/views/agentflows/index.jsx
  • packages/server/src/controllers/chatflows/index.ts
  • packages/server/src/services/chatflows/index.ts

To Reproduce

create many agentflows which overflow the current page listing
try searching for agentflow which is not in the page.
it doesn't give the correct result

Expected behavior

it should fetch the agentflow searched in searchbar.

Screenshots

Screen.Recording.2026-03-01.at.12.08.46.AM.mov

Flow

No response

Use Method

pnpm start

Flowise Version

No response

Operating System

macOS

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions