Keep CLI sessions out of the inbox "Needs a decision" tab

What does this MR do and why?

Stacked on !255739 (merged).

CLI sessions sit in INPUT_REQUIRED after the user exits the terminal, so the inbox's "Needs a decision" tab fills with rows that need nothing from the user. This MR drops those rows from the fetched page on the client; the "All" tab keeps them. CLI sessions waiting on plan or tool approval are a real request and stay in the tab.

No argument on duoWorkflowWorkflows can exclude them server-side: the CLI records the same workflow_definition as web Duo Developer sessions (developer/v1), so excludeTypes would also hide web sessions that genuinely need input, and environment: WEB would hide IDE extension sessions. Because the filter runs on the client, it only applies when the result set fits on a single page (pageInfo has neither hasNextPage nor hasPreviousPage). With more than one page the tab shows the raw server page unfiltered, so no page can come out short or empty, and the badge shows the overflow marker as before. #627798 (closed) adds the server-side filter and lets this condition go; agreed with Emily in !255740 (comment 3839012200).

The !hasNextPage guard on the decision empty state is dropped: the branch it protected (an all-CLI page filtering to zero while a further page exists) cannot be reached once multi-page results are left unfiltered.

Also adds a :duo_cli factory trait and a generated get_user_agent_flow_inbox_with_cli_session fixture so the MSW integration spec tracks backend changes.

The inbox is behind duo_panel_session_inbox. As it is behind that flag, I have elected to not add a changelog.

References

Screenshots or screen recordings

Needs a decision All
02-needs-decision-tab 01-all-tab

Session 3 is the CLI session: present in All, absent from Needs a decision. Session 4 is a web Duo Developer session in the same state and stays in both.

How to set up and validate locally

  1. Follow the steps in the parent MR to get a CLI session in input_required, plus one web-started Duo Developer session in input_required.
  2. Open the Duo panel Sessions tab. "Needs a decision" lists only the web session and its badge counts 1; "All" lists both.
  3. Multi-page case: create 21+ sessions in input_required (enough for a second page) plus the idle CLI session. "Needs a decision" now shows the CLI row too and the badge reads 20+.
  4. Apply a search filter that shrinks the set to a single page: the CLI row disappears from "Needs a decision" and stays on "All".

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Andrew Fontaine

Merge request reports

Loading
Loading