Closed Bug 1898609 Opened 6 months ago Closed 2 months ago

[Returning Users] Refresh Firefox Infobar shouldn't display on first startup after a user refreshes their profile

Categories

(Firefox :: Messaging System, defect, P1)

defect
Points:
5

Tracking

()

RESOLVED FIXED
132 Branch
Iteration:
132.1 - Sep 2 - Sep 13
Tracking Status
firefox132 --- fixed

People

(Reporter: pdahiya, Assigned: mviar)

References

(Depends on 1 open bug, Blocks 3 open bugs)

Details

Attachments

(3 files, 1 obsolete file)

Refresh Firefox infobar shows up on about:welcome for users reinstalling Firefox. Considering we are showing user option to reset profile settings in installer, we should avoid duplicate action by showing Refresh Firefox infobar again during first run.

STR

  1. On latest windows, delete Firefox app from 'Add or Remove Program'
  2. Install Firefox keeping 'Restore default profile settings..' checkbox checked

Actual Result
Firefox opens with Refresh infobar showing on about:welcome

Expected result:
Refresh infobar should not show on about:welcome

Additional Notes:

  1. Click of Refresh Firefox resets pref and unenrolls user if enrolled in 'aboutwelcome' or other firstrun Nimbus experiments

https://searchfox.org/mozilla-central/rev/010ccb86d48fa23b2874d1a7cbe6957ec78538c3/browser/components/BrowserGlue.sys.mjs#1884
https://searchfox.org/mozilla-central/source/browser/components/BrowserGlue.sys.mjs#1583

See Also: → 1882078
Summary: Refresh Firefox Infobar shouldn't display on first run during onboarding → [Returning Users] Refresh Firefox Infobar shouldn't display on first run during onboarding
See Also: → 1095739
Priority: -- → P1
Iteration: --- → 128.2 - May 27 - Jun 7

My understanding reset profile notification is a legacy notification that’s been for a while (2016?) and hasn’t caught up to UX changes made in installer and new user onboarding. Restore Default Settings checkbox in installer (see attached) serves the same purpose as reset profile notification message.

@nalexander for windows users is it possible to read in code (pref or something) when user has completed profile reset before starting Firefox. We can use it to avoid showing reset profile notification (see attached). This will improve user experience and help avoid unenrollment from nimbus experiments on profile reset from reset notification message. This can be its own bug.

For fixing collision issue reported in the bug for all platforms, we should not show reset profile notification when user is onboarding (about:welcome ). NI @gijs for feedback if it’s possible to append notification selectively that is for all tabs except about:welcome or second tab onwards or any other way to hide this message on about:welcome. Thanks!

Flags: needinfo?(nalexander)
Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Punam Dahiya [:pdahiya] from comment #3)

My understanding reset profile notification is a legacy notification that’s been for a while (2016?) and hasn’t caught up to UX changes made in installer and new user onboarding. Restore Default Settings checkbox in installer (see attached) serves the same purpose as reset profile notification message.

Does this checkbox show up in all installers (ie both stub and full)?

I'm not Nick but for the other question I think the thing you're looking for is: https://searchfox.org/mozilla-central/rev/fc76676f61ee37b4c5420649cad6677164a29405/browser/components/migration/FirefoxProfileMigrator.sys.mjs#311-320 .

For fixing collision issue reported in the bug for all platforms,

Which bug?

we should not show reset profile notification when user is onboarding (about:welcome ). NI @gijs for feedback if it’s possible to append notification selectively that is for all tabs except about:welcome or second tab onwards or any other way to hide this message on about:welcome. Thanks!

That doesn't sound like a great fix. The intent of the message is that it is surfaced early on as an opportunity for people to get the good experience that we also now offer in the installer. Letting them first experience a browser that may be various degrees of broken doesn't seem like it would work well with that.

I'm also confused - why would about:welcome show if the browser has been reinstalled but the profile hasn't been touched (ie no refresh happened, because we're not on the OSes with an installer that supports that)?

In the installer case, we already refreshed and so I can vaguely understand it - though the refresh code has explicit bits that are supposed to bypass onboarding (setting mstone etc.); why isn't that preventing about:welcome from being shown? I'd expect the previous session to be restored, not a new one.

More generally, moving the notification to use the messaging system and letting that sort this all out (assuming that is also in control of the about:welcome bits) seems like a better fix than trying to add a hack to the notification bar code to avoid it showing some but not all of the time? :-)

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(pdahiya)

(In reply to :Gijs (he/him) from comment #4)

(In reply to Punam Dahiya [:pdahiya] from comment #3)

My understanding reset profile notification is a legacy notification that’s been for a while (2016?) and hasn’t caught up to UX changes made in installer and new user onboarding. Restore Default Settings checkbox in installer (see attached) serves the same purpose as reset profile notification message.

Does this checkbox show up in all installers (ie both stub and full)?

I was using stub installer. Just tested with full installer and checkbox doesn't show up for full installer

I'm not Nick but for the other question I think the thing you're looking for is: https://searchfox.org/mozilla-central/rev/fc76676f61ee37b4c5420649cad6677164a29405/browser/components/migration/FirefoxProfileMigrator.sys.mjs#311-320 .

For fixing collision issue reported in the bug for all platforms,

Which bug?

1898609 (see attached - infobar/notification seen on about:welcome), please ignore above concern is invalid as Reset Profile Notification is windows only.

I'm also confused - why would about:welcome show if the browser has been reinstalled but the profile hasn't been touched (ie no refresh happened, because we're not on the OSes with an installer that supports that)?

Agreed this is windows only, Firefox installed via stub installer issue.

In the installer case, we already refreshed and so I can vaguely understand it - though the refresh code has explicit bits that are supposed to bypass onboarding (setting mstone etc.); why isn't that preventing about:welcome from being shown? I'd expect the previous session to be restored, not a new one.

Thanks for pointing , looks like above code bits (FirefoxProfileMigrator.sys.mjs#226-240) aren't getting executed for restore profile flow triggered from installer. Will debug and check if MOZ_RESET_PROFILE_MIGRATE_SESSION gets set in time.

More generally, moving the notification to use the messaging system and letting that sort this all out (assuming that is also in control of the about:welcome bits) seems like a better fix than trying to add a hack to the notification bar code to avoid it showing some but not all of the time? :-)

Totally, bringing Refresh Firefox notification under Messaging System will be ideal and we can look into complexity of this work. Thanks!

Flags: needinfo?(pdahiya)
Flags: needinfo?(nalexander)

The severity field is not set for this bug.
:aminomancer, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(shughes)

The infobar consistently does not show when you uncheck 'Restore default profile settings..' checkbox in the installer?

Severity: -- → S3
Flags: needinfo?(shughes)

(In reply to Shane Hughes [:aminomancer] from comment #7)

The infobar consistently does not show when you uncheck 'Restore default profile settings..' checkbox in the installer?

I'm confused - I would have expected it to? Specifically, this code is meant to deal with that situation. Can you elaborate?

Flags: needinfo?(shughes)
Depends on: 1901533
Depends on: 1901540

(In reply to :Gijs (he/him) from comment #8)

(In reply to Shane Hughes [:aminomancer] from comment #7)

The infobar consistently does not show when you uncheck 'Restore default profile settings..' checkbox in the installer?

I'm confused - I would have expected it to? Specifically, this code is meant to deal with that situation. Can you elaborate?

That was meant to be a question, badly phrased. I'm just trying to understand what the unexpected behavior is. Is the infobar supposed to show when you check the checkbox or when you uncheck it? Or neither?

I'm also confused - why would about:welcome show if the browser has been reinstalled but the profile hasn't been touched (ie no refresh happened, because we're not on the OSes with an installer that supports that)?

I'm thinking we probably don't want it to show, but it doesn't care whether the profile is new, it cares whether the --first-startup launch argument was passed - by the installer. Given the difficulty of making the installer know what profile Firefox is going to use, the simplest way to avoid this is probably to start checking trailhead.firstrun.didSeeAboutWelcome in BrowserContentHandler where we determine whether about:welcome is going to show.

Edit: Meg actually filed bug 1901540 to resolve that.

Flags: needinfo?(shughes)
Iteration: 128.2 - May 27 - Jun 7 → 129.1 - Jun 10 - Jun 21
Depends on: 1902046
Iteration: 129.1 - Jun 10 - Jun 21 → 129.2 - Jun 24 - Jul 5
Iteration: 129.2 - Jun 24 - Jul 5 → ---
Priority: P1 → P3
Assignee: nobody → mviar

I'm thinking we probably don't want it to show, but it doesn't care whether the profile is new, it cares whether the --first-startup launch argument was passed - by the installer. Given the difficulty of making the installer know what profile Firefox is going to use, the simplest way to avoid this is probably to start checking trailhead.firstrun.didSeeAboutWelcome in BrowserContentHandler where we determine whether about:welcome is going to show.

Edit: Meg actually filed bug 1901540 to resolve that.

A profile refresh clears the trailhead.firstrun.didSeeAboutWelcome pref, but we may be able to build on the fix from bug 1901540 to address this issue. I'm thinking we could expand the resetHomepageOverrides function added in the patch to set browser.disableResetPrompt (checked here in BrowserGlue) to true.

Summary: [Returning Users] Refresh Firefox Infobar shouldn't display on first run during onboarding → [Returning Users] Refresh Firefox Infobar shouldn't display on first startup after a user refreshes their profile
Iteration: --- → 131.2 - Aug 19 - Aug 30
See Also: → 1911404

//Patch is being repurposed after a change in direction from product, and will be updated.//

This patch prevents the refresh firefox infobar prompt from appearing on top of about:welcome after users refresh their profile via the stub installer.

Attachment #9417561 - Attachment is obsolete: true
Blocks: 1901540
Points: --- → 3
No longer depends on: 1901540
Priority: P3 → P1
Iteration: 131.2 - Aug 19 - Aug 30 → 132.1 - Sep 2 - Sep 13
Attachment #9419908 - Attachment description: WIP: Bug 1898609 - Avoid showing the refresh firefox infobar prompt on first startup after profile refresh → Bug 1898609 - Avoid showing the refresh firefox infobar prompt on first startup after profile refresh

Ack, this fell off my radar (since the patch was approved). Setting a needinfo to respond later today.

Flags: needinfo?(mconley)
Attachment #9419908 - Attachment description: Bug 1898609 - Avoid showing the refresh firefox infobar prompt on first startup after profile refresh → WIP: Bug 1898609 - Avoid showing the refresh firefox infobar prompt on first startup after profile refresh
Attachment #9419908 - Attachment description: WIP: Bug 1898609 - Avoid showing the refresh firefox infobar prompt on first startup after profile refresh → Bug 1898609 - Avoid showing the refresh firefox infobar prompt on first startup after profile refresh
Blocks: 1917350
Pushed by mviar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb073e45ff56 Avoid showing the refresh firefox infobar prompt on first startup after profile refresh r=migration-reviewers,mconley,mossop
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Flags: needinfo?(mconley)
Points: 3 → 5

There are several situations in which the steps can be ran:

  1. Installing from .exe FullInstaller:
    In this case, the installer does not give the option to 'Restore default profile settings..'; At First run, the about:welcome page is not displayed and the "Refresh Nightly" infobar is displayed.

  2. Installing from .msi FullInstaller:
    In this case, the installer does not give the option to 'Restore default profile settings..'; At First run, the about:welcome page is not displayed and the "Refresh Nightly" infobar is displayed.

  3. Installing from STUB Installer:
    The installer option to 'Restore default profile settings..' is only offered for the STUB installer, on the Re-Install prompt. At first run, the about:welcome is not shown and neither is the "Refresh Nightly" infobar. The "FirstRun" page is displayed.

This was tested on Windows 11, 23H2 22631.4317 with the latest Nightly v133.0a1. I cannot determine whether this testing provides sufficient confirmation for the fix. To test in Fx132, please provide a STUB installer for this branch Or improve the steps to reproduce. Regards.

Flags: needinfo?(mviar)

Thanks, :danibodea. I have a note to revisit this on Friday when I'm back from being OOO.

Hi :danibodea. As you mentioned, profile refresh is only offered via the stub installer so no need to test full installer flows for this one. You can download a 132 release stub installer by going to this page and clicking the "Download Firefox" button all the way at the bottom.

The refresh prompt should appear in the stub installer if you have a current default profile from a previously installed (and now uninstalled) version of Firefox release that is no more than two versions behind the one being installer.

There is a test plan for local testing in the attached patch that could be used with a 132 release branch.

Thank you for testing and please let me know if I can provide any additional support.

Flags: needinfo?(mviar)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: