Show subscription dialog when users skip onboarding#7929
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
7 tasks
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared a fix for 1 of the 2 issues found in the latest run.
- ✅ Fixed: Test doesn't validate the seven-day install check
- Enabled the
privacyProCtaSkippedOnboardingtoggle in the less-than-seven-days test so it now exercises the day-threshold path instead of failing early on a disabled feature flag.
- Enabled the
Or push these changes by commenting:
@cursor push 3c965bb09d
Preview (3c965bb09d)
diff --git a/app/src/test/java/com/duckduckgo/app/cta/ui/OnboardingDaxDialogTests.kt b/app/src/test/java/com/duckduckgo/app/cta/ui/OnboardingDaxDialogTests.kt
--- a/app/src/test/java/com/duckduckgo/app/cta/ui/OnboardingDaxDialogTests.kt
+++ b/app/src/test/java/com/duckduckgo/app/cta/ui/OnboardingDaxDialogTests.kt
@@ -284,6 +284,7 @@
whenever(appInstallStore.installTimestamp).thenReturn(System.currentTimeMillis() - 3 * 24 * 3600 * 1000L)
whenever(dismissedCtaDao.exists(DAX_INTRO_PRIVACY_PRO)).thenReturn(false)
whenever(extendedOnboardingFeatureToggles.privacyProCta()).thenReturn(mockEnabledToggle)
+ whenever(extendedOnboardingFeatureToggles.privacyProCtaSkippedOnboarding()).thenReturn(mockEnabledToggle)
whenever(mockSubscriptions.isEligible()).thenReturn(true)
val result = testee.refreshCta(f86e3d8 to
9b38a82
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed:
markAsReadOnShow=falsealso changes regular onboarding CTA behavior- Made
DaxPrivacyProCta.markAsReadOnShowconditional (!onboardingSkipped) so regular onboarding still auto-dismisses on show while skipped-onboarding continues requiring explicit dismissal.
- Made
Or push these changes by commenting:
@cursor push 82c8655380
Preview (82c8655380)
diff --git a/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt b/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt
--- a/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt
+++ b/app/src/main/java/com/duckduckgo/app/cta/ui/Cta.kt
@@ -824,7 +824,7 @@
onboardingStore = onboardingStore,
appInstallStore = appInstallStore,
) {
- override val markAsReadOnShow: Boolean = false
+ override val markAsReadOnShow: Boolean = !onboardingSkipped
private fun subscriptionOnboardingPixelParams(): Map<String, String> = mapOf(
Pixel.PixelParameter.CTA_SHOWN to ctaPixelParam,
nalcalag
commented
Mar 11, 2026
Comment on lines
+848
to
+855
| viewModelScope.launch { | ||
| // whenever an event fires, so the user switched to a new tab page, launch the input screen | ||
| // unless an onboarding promo message is displayed | ||
| val hasPendingOnboardingPromo = ctaViewModel.isPromoOnboardingDialogShowing() | ||
| if (!hasPendingOnboardingPromo) { | ||
| command.value = LaunchInputScreen | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This was already reviewed by @joshliebe in a stacked PR. There was a conflict between the onboarding dialog and the duck.ai toggle that was fixed there.
Task/Issue URL: https://app.asana.com/1/137249556945/task/1213568547695591 ### Description Avoid launching input screen when onboarding promo dialog is shown ### Steps to test this PR - [x] Apply patch pinned on https://app.asana.com/1/137249556945/project/1209991789468715/task/1210448620621729?focus=true - [x] Fresh install - [x] Skip onboarding tapping on "I've been here before" > "Start browsing" - [x] Check duck ai toggle is enabled - [x] Close the app and set the date to 7 days from today. - [x] Open app - [x] Check duck.ai toggle is not launched and the onboarding dialog shows correctly ### UI changes | Before | After | | ------ | ----- | <img width="370" height="820" alt="Screenshot 2026-03-10 at 15 44 35" src="https://github.com/user-attachments/assets/bca20627-4460-426a-98c9-98fb5d4f6d8c" />|<img width="380" height="844" alt="Screenshot 2026-03-10 at 11 21 50" src="https://github.com/user-attachments/assets/fae4208a-ed57-4a32-96dd-aa1fd93e4d19" />| <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk UX gating change that only affects when `LaunchInputScreen` is emitted for new blank tabs; main risk is unintended suppression/extra IO on tab switches due to the new suspend check. > > **Overview** > Prevents Duck.ai’s input screen from auto-launching on a new blank tab when the Privacy Pro skipped-onboarding promo dialog is eligible to be shown. > > `BrowserTabViewModel` now checks `CtaViewModel.isPromoOnboardingDialogShowing()` before issuing `Command.LaunchInputScreen`, and tests add coverage to ensure the command is suppressed under that promo-onboarding condition. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 8a0cd34. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
9b38a82 to
9d4e7cf
Compare
This was referenced Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1210557489696946?focus=true
Description
Show subscription dialog 7 days after install if onboarding is skipped
Steps to test this PR
Pre steps
Subscription dialog for users that skip onboarding
Free Trial copy
FF disabled
privacyProCtaSkippedOnboardingUI changes
Note
Medium Risk
Changes onboarding CTA selection and command emission timing, which can affect when promos/omnibar input auto-launch and subscription URLs are triggered. Risk is moderate due to new time-based gating, new feature flags, and updated pixel parameters, but it’s isolated to onboarding/promo flows.
Overview
Adds a new Privacy Pro onboarding promo path for returning users who previously skipped onboarding: after 7 days since install, a
DaxPrivacyProCtacan be returned fromCtaViewModel.refreshCtawhenprivacyProCtaSkippedOnboardingis enabled.Updates the Privacy Pro CTA model to derive title/CTA copy from
onboardingSkippedand free-trial eligibility, avoid auto-marking the CTA as read on show, and include new pixel params (ru,free_trial) for shown/OK events. Privacy Pro launch now builds theoriginquery parameter dynamically viagetPrivacyProOnboardingOrigin().Prevents Duck.ai’s
LaunchInputScreenauto-open on new empty tabs when the skipped-onboarding promo is eligible to be shown, reducing UI conflicts. Feature toggle defaults are adjusted (extendedOnboarding.selfandprivacyProCtadefault to true; newprivacyProCtaSkippedOnboardingadded), and tests are updated/added to cover the new gating and suppression behavior.Written by Cursor Bugbot for commit 9d4e7cf. This will update automatically on new commits. Configure here.