Skip to content

fix(FR-764): increase agent select page size and add search functionality#3455

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix/agent-select-options
Apr 10, 2025
Merged

fix(FR-764): increase agent select page size and add search functionality#3455
graphite-app[bot] merged 1 commit into
mainfrom
fix/agent-select-options

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented Apr 4, 2025

Resolves #3454 (FR-764)

Add search functionality to AgentSelect component

This PR enhances the AgentSelect component by adding search functionality that allows users to filter agents by ID. The implementation:

  • Adds a search box to the agent selection dropdown
  • Implements search filtering using the ilike operator to match agent IDs
  • Uses React's useTransition hook to handle search state updates without blocking the UI
  • Increases the default page size from 20 to 50 agents
  • Disables the default filtering option in favor of the custom search implementation

@github-actions github-actions Bot added the size:S 10~30 LoC label Apr 4, 2025
Copy link
Copy Markdown
Member Author

yomybaby commented Apr 4, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@yomybaby yomybaby changed the title fix: increase agent select page size and supporting id filter fix: increase agent select page size and add search functionality Apr 4, 2025
@yomybaby yomybaby requested a review from lizable April 4, 2025 09:40
@yomybaby yomybaby marked this pull request as ready for review April 4, 2025 09:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.23% (-0% 🔻)
408/9648
🔴 Branches
3.6% (-0% 🔻)
240/6663
🔴 Functions
2.57% (-0% 🔻)
79/3078
🔴 Lines
4.17% (-0% 🔻)
393/9429
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / AgentSelect.tsx
5% (-1.25% 🔻)
0% 0%
5% (-1.25% 🔻)

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from a9af38b

@yomybaby yomybaby changed the title fix: increase agent select page size and add search functionality fix(FR-764): increase agent select page size and add search functionality Apr 4, 2025
@yomybaby yomybaby force-pushed the fix/agent-select-options branch from 8e74353 to a42d99d Compare April 4, 2025 09:43
@yomybaby yomybaby requested a review from agatha197 April 7, 2025 05:02
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

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

When I search 'auto', it works.
image.png
But it doesn't work when I search 'i-Mac'.
image.png

Can you check again?

@yomybaby yomybaby force-pushed the fix/agent-select-options branch from a42d99d to 90a1791 Compare April 10, 2025 05:41
@github-actions github-actions Bot added size:M 30~100 LoC and removed size:S 10~30 LoC labels Apr 10, 2025
@yomybaby yomybaby requested a review from agatha197 April 10, 2025 05:41
Copy link
Copy Markdown
Member Author

The search function works properly. However, the constant appearance of "Auto Select" is confusing. It has been modified to display "Auto Select" based on the search keywords. Please review again.

Copy link
Copy Markdown
Contributor

@agatha197 agatha197 left a comment

Choose a reason for hiding this comment

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

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 10, 2025

Merge activity

…lity (#3455)

Resolves #3454 (FR-764)

# Add search functionality to AgentSelect component

This PR enhances the AgentSelect component by adding search functionality that allows users to filter agents by ID. The implementation:

- Adds a search box to the agent selection dropdown
- Implements search filtering using the `ilike` operator to match agent IDs
- Uses React's `useTransition` hook to handle search state updates without blocking the UI
- Increases the default page size from 20 to 50 agents
- Disables the default filtering option in favor of the custom search implementation
@graphite-app graphite-app Bot force-pushed the fix/agent-select-options branch from 90a1791 to a9af38b Compare April 10, 2025 08:13
@graphite-app graphite-app Bot merged commit a9af38b into main Apr 10, 2025
6 checks passed
@graphite-app graphite-app Bot deleted the fix/agent-select-options branch April 10, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgentSelector only display first 20 agents

2 participants