Extract the agent sessions filtered search bar into a shared component
Problem
The Duo side panel has no sessions component of its own. ai_panel_router.js maps
AGENTS_PLATFORM_INDEX_ROUTE to getNamespaceIndexComponent('user'), so the panel
renders the full-page pages/index/duo_agents_platform_index.vue, which owns the
search bar and the list together. The panel is getting a new tabbed list
(gitlab-org#23179) while its search and sort
behaviour stays exactly as it is. With search and list in one component, the new
panel component either copies the search bar or reaches around it, and the two
surfaces drift the first time someone adds a filter token.
Proposal
Move the <filtered-search-bar> block out of
ee/app/assets/javascripts/ai/duo_agents_platform/pages/index/duo_agents_platform_index.vue
into a new ee/app/assets/javascripts/ai/duo_agents_platform/components/common/agent_flow_filtered_search.vue.
This is a move, not a redesign: the tokens, the sort options, the time-range-filter
slot, the recent-searches storage key, the emitted events and the data-testid
values all come across unchanged, and duo_agents_platform_index.vue renders the
new component in place of the block it lost.
The flowTypes Apollo query moves with the search bar. It exists only to populate
the flow-name token, so it belongs with the component that owns that token, and both
hosts get the token without either one wiring the query.
Acceptance criteria
-
agent_flow_filtered_search.vuerenders the same markup and testids as the block it replaces. -
duo_agents_platform_index.vuebehaves identically: same filters, same sort, same emittedquery-variables-updatedpayloads. - The
flowTypesquery lives in the new component, andduo_agents_platform_index.vueno longer declares it. - Search-bar and
flowTypesassertions move fromduo_agents_platform_index_spec.jsinto a spec for the new component; nothing is dropped. - No feature flag, no visual change, no change to the panel.
Technical notes
flowTypes errors currently surface through createAlert from the index component;
that behaviour moves with the query rather than being re-raised to the parent.