Closed Bug 2072661 Opened 2 months ago Closed 1 month ago

Menu's "Move to non-private tab" functionality is broken with HNT

Categories

(Firefox for Android :: Homepage, defect)

All
Android
defect

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- verified

People

(Reporter: petru, Assigned: npoon)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid] [group5])

Attachments

(2 files, 1 external file, 2 obsolete files)

Attached video MoveToNormalTabsBrokenWithHNT.mp4 (obsolete) —

Steps to reproduce

  1. Enable "Homepage as a New Tab"
  2. Create a new private tab and visit a webpage
  3. Open the browser menu and select "More -> Move to non-private tab"

Expected behavior

The private tab should now be a normal tab and the user should remain viewing this tab, without any glitches.

Actual behavior

Sometimes the private tab is converted to a normal tab but the user is brought to HNT instead.

Attachment #9643376 - Attachment is obsolete: true
Whiteboard: [fxdroid] [group5]
Assignee: nobody → npoon
Status: NEW → ASSIGNED
  • Fixes a race condition between HomepageTabBinding and migratePrivateTabUseCase when there is only a homepage tab in PBM (and no normal tab) and homepage as new tab is enabled
  • If HomepageTabBinding won, the bug's actual result reproduces
  • If migratePrivateTabUseCase won, the bug's expected result reproduces

Moving the only private tab to a normal tab selects the new normal tab, then removes the private tab. The browsing mode used to follow the selected tab through an async flow collector. HomepageTabBinding could see the new state while the mode was still private, find no private tabs, and open a private homepage tab over the migrated tab.

The browsing mode is now updated from a plain store observer, which runs during the dispatch. Other async observers then see a browsing mode that matches the selected tab. The rest of the tab-selection handling stays in observeTabSelection.

Attachment #9646473 - Attachment is obsolete: true
Severity: -- → N/A
Flags: qe-verify+
Pushed by npoon@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/255dc0f0ed32 https://hg.mozilla.org/integration/autoland/rev/18d58779e1db Observe the browsing mode in BaseBrowserFragment.onViewCreated r=android-reviewers,jonalmeida
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
Severity: N/A → S3
Type: task → defect

Verified as fixed on the latest Nightly 161.0a1 from 11/04 with Motorola Moto G72 (Android 13) and Honor Magic V2 (Android 14).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: