Add WinBackPromptEvaluator to re-engage users who were previously default browser#8319
Open
catalinradoiu wants to merge 7 commits intodevelopfrom
Open
Add WinBackPromptEvaluator to re-engage users who were previously default browser#8319catalinradoiu wants to merge 7 commits intodevelopfrom
catalinradoiu wants to merge 7 commits intodevelopfrom
Conversation
…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.
Contributor
Author
12 tasks
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
4 tasks
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/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:
WinBackPromptEvaluatorthat 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 aModalEvaluatorwith the highest priority (1).RemoteMessageModalSurfaceEvaluatorpriority from1to2andAdditionalDefaultBrowserPromptsImplpriority from2to3to accommodate the new evaluator's priority slot.wasEverDefaultBrowsertracking logic into thedefaultBrowsersetter inAppInstallSharedPreferences. SettingdefaultBrowser = truenow automatically and permanently flipswasEverDefaultBrowsertotrue, removing the need for callers to set it manually.wasEverDefaultBrowseris now a read-onlyval.wasEverDefaultBrowserthrough theUserBrowserPropertiesinterface and its Android implementation.Steps to test this PR
Win Back Prompt
reactivateUsersanddefaultBrowserWinBackPromptfeature togglesUI changes
Show the browser comparison prompt when the user unsets the app as the default browser and then resumes the app:
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
WinBackPromptEvaluatorImplmodal (priority1) 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.wasEverDefaultBrowserread-only and permanently set via thedefaultBrowsersetter (call sites stop writing it directly); this is surfaced via a newUserBrowserProperties.wasEverDefaultBrowser()API.Rebalances modal ordering by bumping
RemoteMessageModalSurfaceEvaluatorto priority2andAdditionalDefaultBrowserPromptsImplto3, 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.