Skip to content

Add WinBackPromptEvaluator to re-engage users who were previously default browser#8319

Open
catalinradoiu wants to merge 7 commits intodevelopfrom
feature/cradoiu/show-winback-prompt-after-default-change
Open

Add WinBackPromptEvaluator to re-engage users who were previously default browser#8319
catalinradoiu wants to merge 7 commits intodevelopfrom
feature/cradoiu/show-winback-prompt-after-default-change

Conversation

@catalinradoiu
Copy link
Copy Markdown
Contributor

@catalinradoiu catalinradoiu commented Apr 17, 2026

Task/Issue URL:https://app.asana.com/1/137249556945/project/1211724162604201/task/1213440050991462?focus=true

Description

Introduces a "win back" prompt for users who previously set DuckDuckGo as their default browser but no longer have it set as default. Key changes include:

  • Added a new WinBackPromptEvaluator that shows the browser comparison screen to eligible users (those who were once the default browser but no longer are, and haven't seen the browser comparison prompt before). This evaluator is registered as a ModalEvaluator with the highest priority (1).
  • Bumped RemoteMessageModalSurfaceEvaluator priority from 1 to 2 and AdditionalDefaultBrowserPromptsImpl priority from 2 to 3 to accommodate the new evaluator's priority slot.
  • Consolidated wasEverDefaultBrowser tracking logic into the defaultBrowser setter in AppInstallSharedPreferences. Setting defaultBrowser = true now automatically and permanently flips wasEverDefaultBrowser to true, removing the need for callers to set it manually. wasEverDefaultBrowser is now a read-only val.
  • Exposed wasEverDefaultBrowser through the UserBrowserProperties interface and its Android implementation.

Steps to test this PR

Win Back Prompt

  • Clean install the app and enable the reactivateUsers and defaultBrowserWinBackPrompt feature toggles
  • From the settings set the app as default browser and resume the app
  • Set another app as default browser and then resume the app
  • The re-engagement prompt should be displayed

UI changes

Show the browser comparison prompt when the user unsets the app as the default browser and then resumes the app:

Screenshot 2026-04-17 at 19.09.12.png


Note

Medium Risk
Changes modal evaluation priority and introduces a new re-engagement flow, which could affect which prompts users see and when. Also alters persistence semantics for default-browser history, so regressions would mainly impact eligibility/analytics rather than security.

Overview
Adds a new WinBackPromptEvaluatorImpl modal (priority 1) that launches the browser comparison prompt for users who previously set DDG as default but are no longer default, gated by feature toggles, onboarding completion, and “not previously shown” state.

Refactors default-browser history tracking by making AppInstallStore.wasEverDefaultBrowser read-only and permanently set via the defaultBrowser setter (call sites stop writing it directly); this is surfaced via a new UserBrowserProperties.wasEverDefaultBrowser() API.

Rebalances modal ordering by bumping RemoteMessageModalSurfaceEvaluator to priority 2 and AdditionalDefaultBrowserPromptsImpl to 3, and updates/adjusts unit tests accordingly.

Reviewed by Cursor Bugbot for commit f423df4. Bugbot is set up for automated code reviews on this repo. Configure here.

…omatically when defaultBrowser becomes true

This is to avoid having to explicitly set that flag in the code wherever we set defaultBrowser as true. If we introduce a new entry point for this then we would need to update both flags, which could lead to an inconsistent state if not done.
…the user unsets the app as their default browser

Shows the browser comparison prompt as a modal when a returning user is no longer the default browser. Gated behind the reactivateUsers.defaultBrowserWinBackPrompt toggle.
Copy link
Copy Markdown
Contributor Author

catalinradoiu commented Apr 17, 2026

@catalinradoiu catalinradoiu changed the title Update AppInstallStore and set wasEverDefaultBrowser flag to true automatically when defaultBrowser becomes true Add WinBackPromptEvaluator to re-engage users who were previously default browser Apr 17, 2026
@catalinradoiu catalinradoiu marked this pull request as ready for review April 17, 2026 16:10
Comment thread browser-api/src/main/java/com/duckduckgo/browser/api/UserBrowserProperties.kt Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7563c29. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants