Exclude CLI sessions from the inbox "Needs a decision" tab on every page
Generated by an AI agent on Andrew's behalf; sources linked inline.
What does this MR do and why?
Part of #630923 (closed)
The backend half landed in !259823 (merged), which added the excludeSourceTypes argument this MR uses; this MR is the frontend half. The argument must be in production before the inbox flag is enabled anywhere: @gl_introduced cannot guard an argument, and an unknown argument fails both tabs.
The Duo panel inbox's "Needs a decision" tab fills with interactive CLI sessions parked in INPUT_REQUIRED after the user left the terminal. The interim fix hid them on the client, but only when the tab fit on one page; with more pages the raw page showed and the badge fell back to 20+.
The inbox's needsDecision alias now passes excludeSourceTypes: [DUO_CLI_INTERACTIVE, DUO_CLI_ACP]; the all alias does not, so CLI sessions stay on the All tab. duo_cli_run is deliberately not excluded: headless duo run has nobody at a terminal, so its INPUT_REQUIRED is a real decision. The client-side filter, its single-page guard and the flowMetadataVersion -interactive heuristic are removed; the badge count is now the server's. isInteractiveCliSession matches the real DUO_CLI_* enum values instead of the non-existent 'CLI' literal, and the inbox query selects sourceType so it can.
Everything here is behind the duo_panel_session_inbox feature flag (default off).
References
- #630923 (closed)
- #627798 (closed)
- #627777 (closed)
- !259823 (merged) (backend argument, merged)
- !255740 (merged) (interim client-side filter this replaces)
- !257437 (merged)
Screenshots or screen recordings
Seeded with 22 web sessions, 2 interactive CLI sessions, 1 ACP session and 1 duo_cli_run session, all in INPUT_REQUIRED (page size 20). "Before" is current master, which has the backend argument but not this change.
On the All tab the CLI sessions are still listed, with the CLI row variant: 
How to set up and validate locally
- In a Rails console, enable the inbox flag:
Feature.enable(:duo_panel_session_inbox) - Create an interactive CLI session awaiting input, plus enough other awaiting-input sessions to get a second page, for example with
bin/rails runner:(Requiresuser = User.find_by!(username: 'root') project = Project.first FactoryBot.create(:duo_workflows_workflow, :duo_cli, :input_required, user: user, project: project) 21.times { |i| FactoryBot.create(:duo_workflows_workflow, :input_required, user: user, project: project, goal: "web #{i}") }require 'factory_bot_rails'andFactoryBot.find_definitionsfirst if factories are not loaded in your console.) - Open the Duo panel session inbox. The CLI session is on All and absent from "Needs a decision" on every page; the badge reads
20+while more pages remain.
Specs:
yarn jest ee/spec/frontend/ai/duo_agents_platform/panel/agent_session_inbox_spec.js \
ee/spec/frontend/ai/duo_agents_platform/panel/cli_sessions_spec.js \
ee/spec/frontend/ai/duo_agents_platform/panel/agent_session_inbox_tab_spec.js
bin/rspec ee/spec/frontend/fixtures/ai_duo_panel_integration.rb # regenerates the inbox fixtures
yarn jest:integration ee/spec/frontend/integration/ai_duo_panel/agent_session_inbox_spec.jsMR 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.



