Show non-billable usage on the personal credits dashboard
What does this MR do and why?
The personal GitLab Credits dashboard (User settings > GitLab Credits, GitLab.com only) showed billable usage only, so a user's Orbit promotional usage was invisible there, while the group dashboard's Total usage card already counts it.
This MR makes the personal dashboard match the group dashboard:
- Credits used in this billing period, Total usage, Daily average usage and Peak day usage count billable plus non-billable usage.
- The chart keeps its "Billable: X credits / Non-billable: Y credits" header and stacks one series per skip reason next to Billable usage, through the shared
CreditsConsumptionChart. - Non-billable usage comes from the
nonBillableUsagefield added in !265505 (merged), read in its own query (get_user_non_billable_usage.query.graphql) so a failure there never blanks the billed dashboard: the cards fall back to billable usage only. The query runs twice: once with only the namespace path for the billing-period card, and once with the date range and product filters for the range-scoped cards and chart. Both usefetchPolicy: 'no-cache'because they read the same un-normalizedcreditsUsagefield as the billable queries. - Non-billable usage of products this instance doesn't display is left out, as on the group dashboard. The billing-period card uses a product catalog from the dashboard-level query, so it doesn't depend on the filter-scoped query having resolved.
- The field is selected with
@gl_introduced(version: "19.6.0"), so the frontend keeps working while the backend MR is not deployed yet: the field is nulled and the cards show billable usage only. - Jest specs and a
WithoutNonBillableUsagestory.
This is change C of the plan in #633154 (comment 4099142904). B (!265505 (merged)) is merged; this MR targets master and merges only after B has fully rolled out on GitLab.com.
References
- Closes https://gitlab.com/gitlab-org/gitlab/-/work_items/634216
- Related to #633154 (closed)
- Plan: #633154 (comment 4099142904)
- Parent epic: https://gitlab.com/groups/gitlab-org/-/work_items/24080
- Backend: !265505 (merged)
- Group dashboard equivalent: !260725 (merged)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
-
Check out this branch (!265505 (merged) is merged in
master). -
Set up GDK in SaaS mode with a local CustomersDot, as in "How to set up and validate locally" in !260725 (merged).
-
In CustomersDot, seed billable and non-billable usage for your user and run enrichment, for example:
bin/populate_usage_data -r 20 --realm SaaS --root-namespace-id <id> --user-id <user_id> --feature-qualified-name orbit_mcp --team-member --skip-reason promo bin/populate_usage_data -r 20 --realm SaaS --root-namespace-id <id> --user-id <user_id> --feature-qualified-name orbit_rest -
Visit
/-/profile/gitlab_credits_dashboard. -
The Credits used in this billing period and Total usage cards show billable + non-billable credits; the chart header splits them and the chart stacks a Promotional series on top of Billable usage.
-
Apply a Products filter: the non-billable usage follows the filter.
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.

