Remove unused glFeatureFlagsMixin registrations in EE

What does this MR do and why?

Removes the glFeatureFlagsMixin import and the mixins entry from EE components (ee/app/) that never read glFeatures. The CE half is a separate MR so each side stays small and rebases cleanly.

  • Touches 27 components.
  • Removing an unused registration does not change behaviour. A mixin whose members are never read only adds an inject or a method nobody calls.
  • The change was produced by the local-rules/vue-mixin-pairing rule from !256664 (merged) (now merged), then Prettier ran on the touched files.
  • The rule shipped with its unused-registration half switched off for this mixin (reportUnused: false), because the missing-registration half is what prevents Vue 3 runtime breakage and must not wait. This cleanup can merge in any order relative to the other cleanups. A last MR switches the unused half on once they are all in.
  • After a rebase onto master, the rule was run again over ee/app/assets/javascripts with reportUnused: true. It found four more components that the first pass missed. They are included here:
    • ee/app/assets/javascripts/ai/components/ai_genie.vue
    • ee/app/assets/javascripts/ai/shared/feature_settings/model_select_dropdown.vue
    • ee/app/assets/javascripts/boards/components/board_add_new_column.vue
    • ee/app/assets/javascripts/work_items/components/shared/work_item_link_child_metadata.vue
  • After this MR, the rule reports no unused glFeatureFlagsMixin registration under ee/app/assets/javascripts.

A second commit removes the now inert glFeatures setup from five specs of the touched components, as asked in !256677 (comment 3882984375). In four specs the flag was exposed as a factory parameter, which suggested it still drove the component. No assertion changes.

  • ee/spec/frontend/approvals/mr_edit/app_spec.js
    • drops the mrCollapsedApprovalRules factory parameter and its provide
  • ee/spec/frontend/security_dashboard/components/pipeline/pipeline_vulnerability_report_spec.js
    • drops the vulnerabilityReportTypeScannerFilter parameter and its provide
  • ee/spec/frontend/ai/shared/feature_settings/model_select_dropdown_spec.js
    • drops the features parameter and its provide
  • ee/spec/frontend/security_orchestration/components/policy_editor/scan_result/advanced_settings/policy_exceptions/policy_exceptions_selector_spec.js
    • drops the glFeatures parameter and its provide
  • ee/spec/frontend/ai/duo_agents_platform/pages/flow_triggers/components/flow_trigger_form_spec.js
    • drops the inline glFeatures: {}

mrCollapsedApprovalRules and vulnerabilityReportTypeScannerFilter no longer exist in the app code either.

Left out on purpose:

  • ee/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js registers the mixin inside a mixin object. The rule does not cover .js mixin files. The only consumer, app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue, registers glFeatureFlagsMixin() itself, so the nested registration is redundant but harmless.
  • ee/spec/frontend/ai/components/ai_genie_spec.js keeps glFeatures: { inlineBlame: false }. That provide goes to the real source-viewer Chunk component, which injects glFeatures directly.
  • Specs of parent components that mount the touched components as children. Their glFeatures setup drives the parent, not the child.

How to set up and validate locally

  1. Run ESLint on the touched files:

    git diff --name-only origin/master...HEAD | xargs ./node_modules/.bin/eslint

    No local-rules/vue-mixin-pairing error is reported.

  2. Optional: in eslint.config.mjs, set reportUnused: true on the gl_feature_flags_mixin entry and run ESLint over ee/app/assets/javascripts. No unused registration is reported.

  3. Run the Jest specs of the touched components:

    git diff --name-only origin/master...HEAD | sed -E 's#^(ee/)?app/assets/javascripts/#\1spec/frontend/#; s#\.vue$#_spec.js#' | xargs ls 2>/dev/null | xargs yarn jest

    26 suites, 687 tests pass. self_managed_add_on_eligible_user_list.vue has no spec of its own.

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.

References

🤖 Generated with Claude Code

Edited by Miguel Rincon

Merge request reports

Loading
Loading