Simplify non-billable usage labels on the credits chart

What does this MR do and why?

Follow-up to !260225 (merged). That MR added non-billable GitLab Credits usage to the daily credits chart on the GitLab Credits dashboard, as one stacked series per skip reason next to "Billed usage". This MR addresses review feedback deferred from it. It is a frontend change. The backend specs only had sample data renamed.

Changes:

  • Usage with no skip reason now shows under "Non-billable usage (Other)" instead of a separate "Non-billable usage (No reason provided)" series. A null reason covers almost all non-billable usage recorded before CustomersDot started setting reasons. Many customers would see it on older date ranges, and it read like something went wrong.
  • Promotional usage is now keyed on the promo skip reason (was orbit_promo) and labelled "Non-billable usage (Promotional)" (was "Orbit promotional"). The label is no longer tied to one product. Backend spec sample data is updated to promo to match.
  • The internal skip reason, its "Non-billable usage (Internal)" label and its green color are removed. CustomersDot no longer records internal team member usage as non-billable (discussion). Any internal usage that's left now shows under "Non-billable usage (Other)"
  • The chart header "Total: X credits" is now "Billed: X credits". It only counts billed usage and sits next to "Non-billable: X credits".
  • The summary cards (total usage, daily average and peak day) now count non-billable usage as well as billed usage, since they give a high-level summary. The chart header and the products list still count billed usage only.
  • While the non-billable query refetches after a date-range or product change, the chart no longer shows the previous range's non-billable rows and total. This uses notifyOnNetworkStatusChange, so the no-cache query reports loading when variables change.
  • An entry with no daily usage no longer adds an empty series and legend item.
  • Spec cleanups from review: the single-reason color check moved to its own describe, and a duplicate color assertion was trimmed.

References

Screenshots or screen recordings

Scenario Screenshot

skipReason coming as promo from CDot

being shown as Non-billable usage (Promotional)


Any other product with skipReason as promo will

be labelled the same way.

Screenshot 2026-10-08 at 6.04.00 PM.png

Empty / null / unknown skipReasons are now clubbed

under Non-billable usage(Other)

Screenshot 2026-10-08 at 6.09.49 PM.png

How to set up and validate locally

  1. Run GDK in SaaS mode (export GITLAB_SIMULATE_SAAS=1 in env.runit) with a local CustomersDot (export CUSTOMER_PORTAL_URL=http://localhost:5000), then restart Rails.
  2. In CustomersDot, add non-billable usage rows (SkipConsumption = true) to the usage_billing_enriched ClickHouse table for your group's subscription. Use skip_reason values beta, promo, an unknown value, and no skip_reason at all.
  3. Visit http://127.0.0.1:3000/groups/<group>/-/settings/gitlab_credits_dashboard and pick a date range that includes those rows.
  4. Check that:
    • Rows with no reason and the unknown reason both appear as "Non-billable usage (Other)".
    • There is no "No reason provided" series.
    • promo rows appear as "Non-billable usage (Promotional)". Orbit rows only show when the orbit_product_list flag is on in CustomersDot.
    • The header reads "Billed: X credits".
  5. Change the date range and check that the non-billable bars and total don't show the previous range's values while loading.

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.

Edited by Harsh Vardhan Sharma

Merge request reports

Loading
Loading