Closed Bug 2076210 Opened 1 month ago Closed 1 month ago

Review prompt is dismissed before it is visible when an about:home tab is selected at startup

Categories

(Firefox for Android :: Onboarding, defect, P1)

All
Android
defect
Points:
3

Tracking

()

RESOLVED FIXED
159 Branch
Tracking Status
firefox159 --- fixed

People

(Reporter: towhite, Assigned: towhite)

References

Details

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

Attachments

(1 external file)

Prerequisites

  • Nightly, where Homepage as a New Tab is enabled by default, on a profile with at least one about:home tab.
  • Telemetry enabled so the custom review prompt UI is used.
  • Firefox set as default browser, continuous onboarding completed (or a pre-continuous-onboarding profile once bug 2071254 lands).

Steps to reproduce

  1. Cold launch Firefox at least five times so the app_opened trigger is met.
  2. On the launch that meets all review prompt criteria, watch logcat filtered on ReviewPromptAction.

Actual behavior

ShowCustomReviewPrompt and ReviewPromptShown are dispatched, then CheckIfEligibleForReviewPrompt is dispatched again about 70 ms later from a brand new HomeFragment. No review prompt is ever visible. Every later launch dispatches DoNotShowReviewPrompt because hasNotBeenPromptedLastFourMonths now fails, so the user is locked out of the prompt for 16 weeks without having seen it.

Expected behavior

The review prompt stays on screen, and the cooldown only starts once the prompt has actually been displayed.

Root cause

ShowReviewPromptBinding navigates to customReviewPromptDialogFragment and immediately dispatches ReviewPromptShown, which records the review_prompt_shown Nimbus event. On a cold start this happens from HomeFragment.onStart, before tab restore completes. When restore then selects an about:home tab, AboutHomeBinding sees the URL change while the current destination is the review prompt dialog, which is not in its allow list, and navigates to the homepage. That destroys the dialog. This is the same mechanism as bug 2073532, which fixed it for the IP Protection onboarding sheet only.

Disabling Homepage as a New Tab does not help on an existing profile: AboutHomeBinding does not consult that setting, and previously created about:home tabs still trigger it.

The Play Store path has the same weakness: ReviewPromptShown is dispatched regardless of whether PlayStoreReviewPromptController.tryPromptReview reports the flow as displayed.

Proposed fix

  • Show the review prompt bottom sheet through the fragment manager, as bug 2073532 did for the IP Protection sheet, or add customReviewPromptDialogFragment to the AboutHomeBinding allow list.
  • Dispatch ReviewPromptShown only once the prompt is actually displayed: from the bottom sheet when it is shown, and for the Play path only when tryPromptReview does not report a no-op or error.

Found while QA-testing bug 2071254 on Nightly builds: on every fresh profile the prompt fired once during the launches following onboarding and was never seen, which masked the onboarding gate fix.

Points: --- → 3
Pushed by icedicedcoffee@proton.me: https://github.com/mozilla-firefox/firefox/commit/4bb61966096e https://hg.mozilla.org/integration/autoland/rev/7ffe03bcdd34 Show the custom review prompt through the fragment manager so it is not dismissed by a navigation to the homepage. r=android-reviewers,Roger
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: