Skip to content

feat: [FE] Move component search filtering to backend #1966

@Mbeaulne

Description

@Mbeaulne

Description

The component search filters (Input Name, Input Type, Output Name, Output Type) currently run entirely client-side — the frontend downloads all component specs and filters locally. This doesn't scale and prevents the homepage Components tab (#1963) from efficiently searching large component libraries.

Move the filtering to use backend query params so the server does the work.

Current state

The frontend publishedComponentsLibrary.ts only sends name_substring and published_by_substring to the backend. All other filters (input name/type, output name/type) are applied locally after fetching results.

Proposed changes

Once the backend supports the new query params (TangleML/tangle#180), update the frontend to:

  1. Send all active search filters as backend query params instead of filtering locally
  2. Update publishedComponentsLibrary.ts getComponents() to pass:
    • description_substring
    • input_name_substring
    • output_name_substring
    • input_type_substring
    • output_type_substring
  3. Remove client-side filtering fallback for these fields (or keep as progressive enhancement)
  4. Wire this into the Components tab on the homepage (feat: [FE] Add tabbed Runs/Pipelines/Components list to homepage #1963)

Depends on: TangleML/tangle#180 (backend filtering support)

Relevant files

  • src/providers/ComponentLibraryProvider/libraries/publishedComponentsLibrary.ts — API client
  • src/providers/ComponentLibraryProvider/ComponentLibraryProvider.tsxsearchComponentLibrary() function
  • src/utils/searchUtils.ts — client-side matching logic (to be replaced)
  • src/api/types.gen.ts / src/api/sdk.gen.ts — regenerate after backend changes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions