Add credits_generalization_ui feature flag and update Free /billing subheader

Summary

  • Adds the credits_generalization_ui feature flag (gitlab_com_derisk, disabled by default) to gate copy changes across billing surfaces.
  • Wires the flag at exactly one usage site: the GitLab Credits card subheader on the /billing page for Free users.
  • When the flag is enabled for a namespace, the subheader copy changes from the old AI-focused copy to the new generalized credits messaging.
  • No other copy, layout, or behavior changes.

This is intentionally a minimum-viable change. Future MRs will wire the flag at additional surfaces (Trial billing, Credits Dashboard, Duo page, etc.).

References

What changed

File Change
config/feature_flags/gitlab_com_derisk/credits_generalization_ui.yml New feature flag YAML
ee/app/helpers/billing_plans_helper.rb Pass flag state to frontend via data-provide
ee/app/assets/javascripts/.../dap_monthly_credit_card.vue Inject flag, branch description copy
ee/spec/helpers/billing_plans_helper_spec.rb Update expected attributes hash
ee/spec/frontend/.../dap_monthly_credit_card_spec.js Add tests for both flag states
locale/gitlab.pot New i18n string

How to verify

  1. Enable the flag: Feature.enable(:credits_generalization_ui, Group.find(<id>))
  2. Visit /groups/<group>/-/billings as a Free user
  3. Confirm the Credits card subheader shows the new copy
  4. Disable the flag and confirm the old copy returns

Merge request reports

Loading