Seed AI audit events filtered search from URL params

What does this MR do?

Makes the AI audit events (agent artifacts) filtered search seed itself from URL query params, so audit filters become deep-linkable and shareable. This will be used by Add mocked Developer activity and Project expos... (!250049 - merged).

On load it reads triggeredByUserId and projectPath from the URL, applies them to the search, and queries the filtered list. It only seeds a filter whose token is actually available in the current mode (for example projectPath has no token in project mode, so it is skipped there), and it stays inert when no known params are present.

These two params are the only ones exposed, matching exactly what the AI Governance dashboard's Developer activity (triggeredByUserId) and Project exposure (projectPath) cards link to. So those cards can deep-link straight to a pre-filtered report.

Security

The URL params flow only into typed GraphQL variables (triggeredByUserId is a UserID global ID, validated server-side; projectPath is a String) and into filtered-search tokens that Vue renders as escaped text.

How to test locally

  1. Set up GitLab Duo locally (SaaS mode + licensed group): Set up GitLab Duo.
  2. Enable the flag: Feature.enable(:ai_governance_dashboard).
  3. On the gitlab-duo group, open Settings → GitLab Duo → Governance with a seeded param, for example ?tab=agent-artifacts&triggeredByUserId=gid://gitlab/User/1, and confirm the filter chip is applied automatically on load.

Example Usage

  1. http://gdk.test:3000/groups/gitlab-duo/-/settings/gitlab_duo/governance?tab=agent-artifacts&triggeredByUserId=gid://gitlab/User/1
  2. http://gdk.test:3000/groups/gitlab-duo/-/settings/gitlab_duo/governance?tab=agent-artifacts&projectPath=gitlab-duo/acme-agents-1786096448-1

Note: the underlying filters require ClickHouse analytics. The resolver rejects them on the PostgreSQL path, the same as applying the filters manually. This MR only wires URL to filter seeding; it does not change that.

Edited by Dheeraj Joshi

Merge request reports

Loading
Loading