Mount the merge request Pipelines tab with initVueApp
What does this MR do and why?
This MR mounts the Pipelines tab of the merge request page with initVueApp, in place of new Vue(...).$mount(). It tears the app down with unmountVueApp, in place of $destroy().
This prepares !266580, which mounts a second initVueApp root on the same element for the new merge request page:
unmountVueApptears down aninitVueApproot on Vue 2 and on Vue 3.- On Vue 3,
unmountVueAppdoes nothing for anew Vueroot. A review on !266580 found that mixing both kinds of root would leave the table running after you leave the tab. - With this MR, both roots share one teardown path.
initVueApp replaces its element, so the app mounts on a child of #commit-pipeline-table-view. The update-pipelines-count listener on that element stays in the document.
No behaviour change is intended:
- The
mr_pipelines_graphqlflag still picks the GraphQL or the legacy table wrapper. Both load lazily, throughdefineAsyncComponent. - The
providevalues and the props are the same.
Screenshots or screen recordings
No visual change is intended. Each screenshot shows the Pipelines tab after this path: Pipelines, Overview, Pipelines, Pipelines again. The table renders once, and #commit-pipeline-table-view has one child.
Before (79caff74) |
After (40a19c64) |
|---|---|
![]() |
![]() |
![]() |
![]() |
How the screenshots were taken
- A temporary local feature spec ran in GDK. It is not committed.
- Before: merge-base
79caff74. After: MR head40a19c64. - Full page, light and dark mode.
How to set up and validate locally
- Open the Pipelines tab of a merge request that has pipelines. The table renders.
- Select another tab, then Pipelines again. The table renders once.
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.
Local verification
merge_request_tabs_spec.jspasses in the Vue 2 and Vue 3 Jest lanes. It covers:- the mount element and the props from
mrWidgetData - teardown with
unmountVueAppwhen you leave the tab
- the mount element and the props from
- ESLint and Prettier pass.



