Add credits_generalization_ui feature flag and update Free /billing subheader
Summary
- Adds the
credits_generalization_uifeature 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
/billingpage 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
- Closes https://gitlab.com/gitlab-org/gitlab/-/work_items/604446
- Closes https://gitlab.com/gitlab-org/gitlab/-/work_items/604440
- Rollout: https://gitlab.com/gitlab-org/gitlab/-/work_items/604447
- Parent epic: https://gitlab.com/groups/gitlab-org/-/epics/22233
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
- Enable the flag:
Feature.enable(:credits_generalization_ui, Group.find(<id>)) - Visit
/groups/<group>/-/billingsas a Free user - Confirm the Credits card subheader shows the new copy
- Disable the flag and confirm the old copy returns