Skip to content

Fix Duo workflow sessions pagination and improve fuzzy search

What does this MR do and why?

Fix pagination when status sorting is being applied and improve search feature now allows users to search for workflows by ID numbers in addition to text - when someone types numbers or uses # symbols in their search, the system will look for workflows with those specific IDs while also searching the text content. The search is smarter by separating ID-based searches from text-based searches.

References

Related to [Agent Sessions] Enhance filtering and sorting ... (#576078)

How to set up and validate locally

Use the GraphQL query below to test pagination:

GraphQL
query getAgentFlows(
  $projectPath: ID!,
  $sort: DuoWorkflowsWorkflowSort,
  $statusGroup: DuoWorkflowStatusGroup,
  $type: String,
  $after: String
) {
  project(fullPath: $projectPath) {
    id
    duoWorkflowWorkflows(
      excludeTypes: ["chat"],
      projectPath: $projectPath
      sort: $sort
      statusGroup: $statusGroup
      type: $type
      after: $after
      first: 5
    ) {
      pageInfo {
        startCursor
        endCursor
        hasNextPage
        hasPreviousPage
      }
      edges {
        node {
          id
          goal
          workflowDefinition
          status
          statusName
          statusGroup
        }
      }
    }
  }
}
Variables
{
  "projectPath": "gitlab-duo/test",
  "sort": "STATUS_DESC",
  "statusGroup": null,
  "type": null,
  "after": "MjA" # add th
}

Query plans

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 Wanderson Policarpo

Merge request reports

Loading