Fix double click needed to leave the pipeline security tab

What does this MR do and why?

handleUrlParams in the vulnerability report filtered search strips empty values from the query before comparing it with the current route, so an unchanged filter set issues no $router.push.

Without the strip, the filtered search pushed a semantically empty query a few milliseconds after a pipeline tab's own navigation and cancelled it, so leaving the Security tab took two clicks. isEqual treats { state: undefined } as different from {}, and Vue Router 4 reports the cancelled navigation as a resolved NavigationFailure (type 8) instead of rejecting, so nothing surfaced in the console.

The sibling vulnerability_report.vue already strips empty values in updateQueryString.

References

#609371 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

Needs an Ultimate license — the tab is gated on read_security_resource.

  1. Enable the Vue 3 pipelines lane:

    Feature.enable(:vue3_migrate_pipelines)
  2. Give a project a pipeline carrying a security report, which is what makes the Security tab appear. Commit this .gitlab-ci.yml and let the pipeline finish:

    include:
      - template: Jobs/SAST.gitlab-ci.yml
  3. Open the finished pipeline at /<group>/<project>/-/pipelines/<id> and confirm a Security tab is present.

  4. Click Security, then click another tab, for example Jobs or Tests.

  5. The first click navigates: the URL and the tab contents change together. Before this change the tab highlighted but the URL and contents stayed until a second click.

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 Manuel Grabowski

Merge request reports

Loading
Loading