Feat: add search to agent sessions
What does this MR do and why?
The following MR adds the following features into both the Agent Sessions page and in the new ui side-panel for Agent Sessions:
- Sort by Updated Date
- Sort by Created Date
- Search by Workflow Type
- Search by fuzzy search term on the title (the title + workflow id combo of the title currently)
- View Recent History search terms
- Tokens stay in search bar when searching
- Shows empty state when no search terms match
References
Related Issues:
- https://gitlab.com/gitlab-org/frontend/gitlab-ui-integrations/-/issues/4
- https://gitlab.com/gitlab-org/frontend/gitlab-ui-integrations/-/work_items/5
Screenshots or screen recordings
Before | After | After w. Alert |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
How to set up and validate locally
Environment Testing Steps
To Test in Duo Side Rail
- Turn on the following feature flags:
duo_workflow
,duo_workflow_in_ci
,ai_flow_triggers
andduo_side_rail
. - Make sure you are NOT in the new UI
- Open Duo Chat and open the Sessions tab (the two overlapping squares icon).
- Test search queries (see below for test cases)
- If you see no Sessions then run the following query
bundle exec rake "gitlab:duo_workflow:populate[50,20,
1,<<YOUR_TEST_GROUP_PATH_HERE>>]"
to create new agent sessions. Refresh the page.
To Test in Agent Sessions page
- Navigate to a project with that has AI features enabled.
- In the left side panel, you will see
Automate
with a tanuki icon. SelectAgent sessions
from the dropdown. - Test search queries (see below for test cases)
To Test in new UI Side Panel
- To test this locally, make sure you have the following FFs enabled:
paneled_view
,global_topbar
,tailwind_container_queries
After you can toggleNew UI
on in user's setting under the user's profile dropdown - Open the side panel and open Sessions.
- Test search queries (see below for test cases)
Filter/Sort Testing Steps
Filtering
- Select
Flow Name
and use one of the selected valuesSoftware development
orConvert to gitlab ci
. - Press
Enter
or click the search icon. - Validate filter works as expected.
- If your term was not found, an empty result view should display. You can reset by refreshing the page or clicking the search icon again.
- You can use the following patch and filter with
chat
to test the results (chat should be excluded out and should not be found): unmatched_filter.patch
Raw text Search
- Type in any search term to test raw text search.
- Press
Enter
or click the search icon. - Validate that an alert appears to indicate raw text is not supported.
Sorting
- Go to the ASC/DESC sorting dropdown (on the right or bottom if in panel view) and select a value or press the up or down icons.
- Validate the information has been sorted by the value selected.
Recent History
- Select the Recent History icon on the left and select one of the recently searched terms.
- Validate term re-appears in the search.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Lindsey Shelton