Open Bug 2073323 Opened 2 months ago Updated 14 days ago

[HNT] Switching between Normal and Private keeps creating more homepage tabs

Categories

(Firefox for Android :: Homepage, defect)

All
Android
defect

Tracking

()

People

(Reporter: tcampbell, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When using the buttons on homepage to move between Normal and Private mode I keep getting new homepage tabs stack up. Arguably Chrome has the same behaviour but they make it clumsier to switch modes so I don't run into this. In Chrome, the menus say "New Tab" / "New Incognito Tab" which is a bit clearer than a mode switch. The Chrome newtab does have a "Incognito" button that acts as "New Incognito Tab" and racks up lots of tabs.
For firefox we have taken bottons that previously were mode switches and quietly turned them into "New Tab" like buttons.

Possible duplicate: 2003402

PrivateBrowsingController.kt calls fenixBrowserUseCases.addNewHomepageTab() unconditionally when enableHomepageAsNewTab is set, and FenixBrowserUseCases.kt always adds a fresh about:home tab, so each toggle appends another homepage tab in the target mode instead of returning to the one already open. The block was added intentionally in Bug 1969252 (changeset 3192711610d2).

Fix: Select the target mode's existing homepage tab when there is one, via tabsUseCases.selectOrAddTab(ABOUT_HOME_URL, private = newMode.isPrivate) behind a new FenixBrowserUseCases helper, and update the two toggle tests in DefaultPrivateBrowsingControllerTest.kt to assert reuse. Note that I triaged from the description and the code, not from the attached recording.

Suggested severity: S3. Empty homepage tabs accumulate in the tab list on a normal mode-switching flow, but nothing is lost and closing them is an easy workaround, and the feature is currently on by default only on nightly and developer channels.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-wrong-file, ai-triage-wrong-cause, ai-triage-hallucination, ai-triage-out-of-scope, ai-triage-wrong-fix, ai-triage-shallow-fix.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

Duplicate of this bug: 2072896

RE: BUG 2003402, and with context from BUG 2067198: The expected behavior of HNT with the Private Browsing Mode toggle should be re-evaluated.

Behaviors like this and BUG 2072896 present as a bug, not as a design expectation. I cannot view the referenced spec for further input, as it is locked and private.as

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

For more information, please visit BugBot documentation.

Flags: needinfo?(gl)

confirmed, same here on 3 android devices, with firefox nightly. Seems to be the case since some versions now.

Flags: needinfo?(gl)

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

For more information, please visit BugBot documentation.

Flags: needinfo?(gl)

This has been quite an annoyance to me since HNT. Maybe it's because I only use PBM for one-off things and some UX flows aren't as intuitive.

In Chrome, I click "...", "New incognito tab", close the tab and am back in the normal browsing tabs overview. Having to go to the menu for incognito tabs is annoying, but it's three clicks and easy to close.

In Firefox, I click the PBM toggle, close the tab and now what? I think the UX is a bit unclear.

  • Till now, I opened a new home page to click the PBM toggle, close the additional home page, go to notifications, click the "close private tabs" notification. That's seven actions compared to three in Chrome. If I don't click the notification and go back to PBM, I'm prompted for biometrics just for seeing the home page.
  • I guess the better option is to use the second of the four top buttons to go to normal tabs, then go to home page. As no PBM tab remains, there's no "close private tabs" notification. So it's four actions.

I remember my experience was much smoother before HNT.

Some ideas

  • When leaving PBM, automatically close private tabs if they're only home pages. Don't show the notification. Going back to PBM wouldn't prompt for biometrics nor create a second PBM home page.
  • When clicking the PBM toggle and there already is a home page, go to that one rather than open a new one. Possibly only if the home page is the most recent tab.
  • Maybe automatically go to the normal browsing tabs view if all PBM tabs are closed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: