Closed Bug 2076729 Opened 1 month ago Closed 1 month ago

Users can be prompted to set Firefox as the default browser twice during the first week of continuous onboarding

Categories

(Firefox for Android :: Onboarding, defect)

All
Android
defect
Points:
2

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: towhite, Assigned: towhite)

References

Details

(Whiteboard: [android-activation-trust] [fxdroid])

Attachments

(3 external files)

Continuous onboarding (enabled by default since Firefox 155) requests the default-browser role on day 2 and again on day 3 via ContinuousOnboardingFeature.maybeRequestDefaultBrowserRole. A separate, older prompt in HomeActivity.maybeShowSetAsDefaultBrowserPrompt still fires independently, so users who have not set Firefox as default see the same system dialog a third time within the first week, typically alongside the day-5 Sync card.

The legacy prompt is controlled by the Nimbus feature default-browser-prompt and, with its default values, fires on a cold start when Firefox is not the default browser, at least 4 cold starts have occurred since it last fired, at least 14 days have passed since it last fired, and it has fired fewer than 3 times. A new user who cold-opens the app once per stage reaches the fourth cold start on day 3 or day 5, so the two prompts overlap.

Found by QA while verifying bug 2071254: on the cohort 3 upgrade case (onboard on 155, update to 159), the "Set as default" system dialog appeared on day 5 together with the Sync sign-in modal.

Steps to reproduce:

  1. Fresh install of Nightly. Complete initial onboarding without setting Firefox as default.
  2. Close Firefox (swipe away), advance the device date by one day, cold open. Dismiss the default-browser and notification prompts (day 2).
  3. Repeat for day 3.
  4. Close Firefox, advance the date by two days, cold open (day 5).

Expected: only the Sync sign-in card appears on day 5.
Actual: the system default-browser dialog appears as well.

Proposed fix: skip maybeShowSetAsDefaultBrowserPrompt while continuous onboarding is enabled and the day-7 stage has not completed, in the same way showWallpaperOnboardingDialog in home/ext/Settings.kt is already gated on continuousOnboardingFeatureEnabled. Since this changes prompt frequency for all users, the exact gate (feature enabled vs. day-7 complete) should be confirmed with the onboarding owners.

Points: --- → 2

The same predicate was duplicated in ContinuousOnboardingFeature and the review prompt's continuousOnboardingInProgress gate, and Part 2 adds a third consumer. Also rename the feature's private session-scoped check so the two "in progress" concepts are not confused.

No behavior change.

The day-2 and day-3 continuous onboarding stages already request the default-browser role, so the standalone prompt in HomeActivity double-asked within the first week, typically on the fourth cold start alongside the day-5 Sync card.

Depends on bug 2074040: until the onboarding state reconciliation runs on every channel, users who never received continuous onboarding have day 7 permanently unset and would otherwise lose this prompt.

Attachment #9650651 - Attachment description: WIP: Bug 2076729 - Part 1: Refactor to extract the continuous-onboarding-in-progress check into `Settings`. → Bug 2076729 - Part 1: Refactor to extract the continuous-onboarding-in-progress check into `Settings`.
Attachment #9650652 - Attachment description: WIP: Bug 2076729 - Part 2: Suppress the set-as-default prompt while continuous onboarding is in progress. → Bug 2076729 - Part 2: Suppress the set-as-default prompt while continuous onboarding is in progress.

The logger tag still carried a stale Default suffix from an earlier class name, and the class doc listed the stages with a dangling "or" before the last item.

Attachment #9650651 - Attachment description: Bug 2076729 - Part 1: Refactor to extract the continuous-onboarding-in-progress check into `Settings`. → Bug 2076729 - Part 2: Refactor to extract the continuous-onboarding-completed check into `Settings`.
Attachment #9650652 - Attachment description: Bug 2076729 - Part 2: Suppress the set-as-default prompt while continuous onboarding is in progress. → Bug 2076729 - Part 3: Suppress the set-as-default prompt while continuous onboarding is in progress.
Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/bedd5a6f7a72 https://hg.mozilla.org/integration/autoland/rev/32e28ed1227b Part 1: Fix the `ContinuousOnboardingFeature` logger tag and class doc. r=android-reviewers,cbect https://github.com/mozilla-firefox/firefox/commit/cdfba5564f88 https://hg.mozilla.org/integration/autoland/rev/d93b6bde98ca Part 2: Refactor to extract the continuous-onboarding-completed check into `Settings`. r=android-reviewers,gmalekpour https://github.com/mozilla-firefox/firefox/commit/f74cbcf4ef90 https://hg.mozilla.org/integration/autoland/rev/438ce736c026 Part 3: Suppress the set-as-default prompt while continuous onboarding is in progress. r=android-reviewers,gmalekpour
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
See Also: → 2078633
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: