Enable Vue 3 migration rollout for code review analytics
What does this MR do and why?
Enables the Vue 3 migration rollout for the project code review analytics page (ee/app/assets/javascripts/pages/projects/analytics/code_reviews/index, served by Projects::Analytics::CodeReviewsController#index).
This uses the vue3_migration.yml mechanism to opt the page into Vue 3 behind a feature flag. When vue3_migrate_code_review_analytics is enabled, Rails serves the Vue 3 (@vue/compat) chunk, otherwise the page continues to run on Vue 2.
What changed
- Added
config/feature_flags/beta/vue3_migrate_code_review_analytics.yml - Added
ee/app/assets/javascripts/pages/projects/analytics/code_reviews/index/vue3_migration.ymlwithstatus: rollout
No JavaScript or controller changes are needed.
How to verify
- Enable the feature flag:
Feature.enable(:vue3_migrate_code_review_analytics) - Make sure the test project has a Premium or Ultimate license: the page is gated behind the
code_review_analyticslicensed feature and the controller'sauthorize_read_code_review_analytics!before_action, so a project without that license gets a 404. - Navigate to the project's code review analytics page (Analyze > Code review analytics,
/<group>/<project>/-/analytics/code_reviews) - Open the browser console and confirm the message:
[gitlab] [V] Using Vue.js 3 - Verify the merge requests in review table renders with review time, author, approvers, comments, commits, and line change columns
- Verify filtering by milestone and label updates the table and total count
- Verify paginating through merge requests loads the next page
Existing test coverage for the code review analytics page
For visibility while this rollout is in flight: what is and is not covered for this page today, independent of the Vue 3 mechanism.
Frontend unit tests (Jest), ee/spec/frontend/analytics/code_review_analytics/
components/app_spec.jscovers the main app: rendering the filter bar, the loading state (spinner, no MR count badge, no table, no pagination), the loaded state with and without merge requests (empty state, MR count badge, table, pagination), and paging (dispatchingsetPageandfetchMergeRequestson pagination input).components/merge_request_table_spec.jscovers the table: rendering theGlTable, the correct headers, and the review time column formatting (days, hours, "< 1 hour", and the "-" fallback when review time is null).components/approvers_column_spec.jscovers the approvers column: the dash for an empty list, a singleGlAvatarLinkfor one approver, andGlAvatarsInlinewith the collapsed/maxVisiblebehaviour for multiple approvers.components/filter_bar_spec.jscovers the filter bar: renderingFilteredSearchBarwithterms-as-tokens, the initial milestone/label tokens from state, dispatchingsetFilterson search, and setting the milestone/label URL parameters.store/actions_spec.jscovers the rootsetFiltersaction committingSET_FILTERS.store/modules/merge_requests/actions_spec.jscovers themergeRequestsmodule actions:setProjectId, andfetchMergeRequestssuccess and error paths.utils_spec.jscoverstransformFilters: building the selected milestone/label state from query params, including the negation (not[...]) operators.
None of these files appear in scripts/frontend/quarantined_vue3_specs.txt (that file currently has no active entries), so they run and must pass in both the jest (Vue 2) and jest vue3 (@vue/compat) CI jobs.
Backend
ee/spec/requests/projects/analytics/code_reviews_controller_spec.rbcovers#index: 200 for a reporter+ whencode_review_analyticsis licensed, 404 when the license is off, 404 for guests, and (in thetype: :controllerhalf) unique-visit and Snowplow/RedisHLL event tracking.ee/spec/requests/api/analytics/code_review_analytics_spec.rbcovers the underlyingGET /analytics/code_reviewAPI the page calls: success for an authorized reporter, the returned MR fields and pagination headers, label/milestone filters and their negations, 403 for an unauthorized guest or when the license is off, and 400 whenproject_idis missing.ee/spec/helpers/analytics/code_review_helper_spec.rbcoversAnalytics::CodeReviewHelper#code_review_app_data, the hash of paths and URLs passed to the Vue app, including thenew_merge_request_urlbeing nil when the source project is unavailable.
Feature (system) specs
ee/spec/features/analytics/code_analytics_spec.rb(:js) visitsproject_analytics_code_reviews_pathand covers the filtered search bar rendering and its milestone/label hints, plus the empty state (with or without the "New merge request" button) for a regular user, an auditor who is or is not a project member, and a signed-out user.
QA / E2E
qa/qa/ee/page/project/sub_menus/analyze.rbdefines ago_to_code_review_analyticspage-object method for the "Code review analytics" menu item, but no QA spec calls it.
Not covered
- No spec covers the
store/modules/merge_requestsmutations (SET_PROJECT_ID,REQUEST_MERGE_REQUESTS,RECEIVE_MERGE_REQUESTS_SUCCESS,RECEIVE_MERGE_REQUESTS_ERROR,SET_PAGE) directly, only indirectly through the actions and component specs. - No QA/E2E spec actually exercises the code review analytics page, only the page-object navigation method exists.
- No feature spec exercises the merge requests table with data (rows, columns, filtering, or pagination) in a browser-level test; the existing feature spec only covers the filtered search bar and the empty state.
References
- Resolves #614007
- Rollout issue: #614052
- Parent epic: gitlab-org#23041