Review prompt is dismissed before it is visible when an about:home tab is selected at startup
Categories
(Firefox for Android :: Onboarding, defect, P1)
Tracking
()
| 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:hometab. - 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
- Cold launch Firefox at least five times so the
app_openedtrigger is met. - 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
customReviewPromptDialogFragmentto theAboutHomeBindingallow list. - Dispatch
ReviewPromptShownonly once the prompt is actually displayed: from the bottom sheet when it is shown, and for the Play path only whentryPromptReviewdoes 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.
Updated•1 month ago
|
Description
•