Skip to content

improvement(kb-selector): add search to knowledge base selector subblock#4351

Merged
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/kb-selector-search
Apr 30, 2026
Merged

improvement(kb-selector): add search to knowledge base selector subblock#4351
waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1/kb-selector-search

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Added search to the knowledge base selector subblock (searchable + placeholder on the Combobox)
  • Helps when workspaces have many knowledge bases

Type of Change

  • Improvement

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 30, 2026 2:50am

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 30, 2026

PR Summary

Low Risk
Low risk UI-only change that enables client-side searching in the Combobox; no data fetching or persistence logic is modified.

Overview
Adds search support to the knowledge base selector sub-block by enabling the Combobox’s searchable mode and providing a searchPlaceholder ("Search knowledge bases...").

Reviewed by Cursor Bugbot for commit 8106798. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 30, 2026

Greptile Summary

This PR adds search functionality to the knowledge base selector subblock by passing searchable and searchPlaceholder='Search knowledge bases...' to the existing Combobox component. Both props are already fully supported by the Combobox implementation, making this a clean two-line improvement with no new logic required.

Confidence Score: 5/5

Safe to merge — two-line additive change using pre-existing, well-tested Combobox props.

The change is minimal and purely additive. Both searchable and searchPlaceholder are already declared in ComboboxProps and fully handled in the Combobox implementation (filtering, keyboard nav, search state reset on close/selection). No new logic, types, or styling are introduced.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx Adds searchable and searchPlaceholder props to the Combobox; both are fully supported by the underlying component with no side effects.

Sequence Diagram

sequenceDiagram
    participant User
    participant KnowledgeBaseSelector
    participant Combobox
    participant SearchInput

    User->>KnowledgeBaseSelector: Opens dropdown
    KnowledgeBaseSelector->>Combobox: searchable=true, searchPlaceholder="Search knowledge bases..."
    Combobox->>SearchInput: Renders search input (auto-focused)
    User->>SearchInput: Types query
    SearchInput->>Combobox: setSearchQuery(query)
    Combobox->>Combobox: filteredOptions = options.filter(label/value includes query)
    Combobox-->>User: Shows filtered knowledge base options
    User->>Combobox: Selects option
    Combobox->>KnowledgeBaseSelector: onChange / onMultiSelectChange
    Combobox->>Combobox: setSearchQuery('') — resets search
Loading

Reviews (1): Last reviewed commit: "improvement(kb-selector): add search to ..." | Re-trigger Greptile

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