Fix DAP Impact Abandonment panel to measure users who did not return
What does this MR do?
Changes the Abandonment panel on the Adoption tab of the DAP Impact system dashboard so it counts users who did not return, instead of users with one active day in the range.
Closes #631553
Why
The panel was a stat counting users with activeDays = 1 in the selected range, described as "Users who tried DAP once and did not return". That count included:
- Users whose only active day was near the end of the range. They had no time to return yet.
- Long-time users who happened to be active on one day in the range.
So it measured one active day in the window, not abandonment.
What changed
Only ee/lib/gitlab/analytics/dashboards/system/dap_impact.yaml. The panel now:
- Queries the previous period and the selected period with
created >= previousStartDate and created <= endDate and activeDays = 1. - Buckets by
created(granularity="%{rangeDays}d", origin="%{previousStartDate}")and sorts the newest bucket first. - Shows
churnedUsersCount as "Did not return"as a bar list withmetricRows: true. In that mode the bar list renders one row per metric from the newest bucket.
churnedUsersCount on the newest bucket is the number of users present in the previous bucket but absent from the current one. activeDays is computed over the whole queried range, so activeDays = 1 keeps users with exactly one active day across both periods. A counted user had their single day in the previous period and did not come back during a full period of the same length.
The panel cannot stay a stat. Window metrics require the created dimension, and the stat display rejects dimensions. The tooltip and description now say the panel measures users from the previous period of the same length.
Screenshots
Rendered on GDK with the panel queries answered by production data for gitlab-org, 30-day preset, 2026-10-07.
| Before | After |
|---|---|
![]() |
![]() |
Evidence
Checked on production for gitlab-org with the 30-day preset on 2026-10-07. The compiled query returns two buckets:
| Bucket | churnedUsersCount |
|---|---|
| 2026-09-07 (newest) | 172 |
| 2026-08-07 (baseline) | 0 |
The old stat for the same selected range returned 310.
Tests
ee/spec/models/analytics/aggregation_engines/duo_workflows_spec.rb: new example running the panel's query shape (two origin-anchored fixed-day buckets,activeDays = 1) and asserting bothusersCountandchurnedUsersCountper bucket, so a brokenactiveDaysfilter or bucket anchoring fails it. Passes locally against ClickHouse.ee/spec/models/analytics/custom_dashboards/system_dashboard_spec.rbanddashboard_constraints_spec.rbpass on the changed YAML, 26 examples.
How to test
- Open the DAP Impact dashboard on a group with Duo Agent Platform sessions and go to the Adoption tab.
- Check that the Abandonment panel shows one bar labelled "Did not return".
- Check that its value matches
churnedUsersCountof the newest bucket of the New vs returning panel's query withactiveDays = 1.
Related
- !256591 (merged) introduced the two-bucket "New vs returning" pattern this panel now follows. Issues #631551 and #631552 were closed as not reproducible on master. The evidence is on the issues.
Known limitation
Window metrics only emit buckets that have rows. If no single-day user created a flow in the selected period, the newest bucket is missing and the panel falls back to the baseline bucket, which reports 0 exactly when churn is total. The same gap already affects "New vs returning". It needs a fix in the aggregation layer, tracked in #632563 (closed).

