Closed Bug 2045094 Opened 2 months ago Closed 2 months ago

[Tab Groups] Tab groups aren't always displayed when first created

Categories

(Firefox for Android :: Tabs, defect)

All
Android
defect

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
relnote-firefox --- 152+
firefox152 --- verified
firefox153 --- verified

People

(Reporter: 007, Assigned: 007)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group4])

Attachments

(2 files)

About 1/10 times, when creating your first tab group, the group will get created but NOT displayed. Instead, the tab manager will display a stale state of no tab groups in the tab grid/list. When this occurs, the tab group page will either show the tab group with zero tabs, or it will not display any tab groups at all.

Pairing with Julie, we found that there was a race condition with how the data was being emitted from the database, where the tab group metadata and the tab group's list of tab IDs were emitting separately and would overlap each other when creating the UI data model.

We found that having one Flow emitting all of the data instead of two Flows emitting the data separately solves this issue.

Summary: [Tab Groups] Tab groups aren't always created AND displayed when created → [Tab Groups] Tab groups aren't always displayed when first created
Attachment #9595338 - Attachment description: WIP: Bug 2045094 - Fix bug causing tab groups to not always display when first created → Bug 2045094 - Fix bug causing tab groups to not always display when first created
Pushed by nbond@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f47b84de71e4 https://hg.mozilla.org/integration/autoland/rev/36432fc2b14c Fix bug causing tab groups to not always display when first created r=android-reviewers,jdelorenzo
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

Reproduced the issue with a Vivo V23 (Android 14) device on RC 152 Firefox for Android.

Flags: qe-verify+

The patch landed in nightly and 152 is affected.
:007, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(nbond)

Verified on the latest Firefox for Android Nightly 153.0a1 from 6/11 using a Vivo v23 (Android 14), and a Pixel 6 (Android 17).

Flags: qe-verify+

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: A subset of users will have a degraded experience, perceiving the app/feature is broken during the first interaction with creating a tab group.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: Create a tab group via drag and drop (or multiselection)

Delete the tab group and try again, if the group is created

  • Risk associated with taking this patch: medium
  • Explanation of risk level: The risk touches how tab group data is read-in from the database. The scope of changes is small, but it involves a core code area.

This change has been baking in Nightly and 153 beta, and it's been verified in Nightly.

  • String changes made/needed?: N/A
  • Is Android affected?: yes
Attachment #9598572 - Flags: approval-mozilla-release?
Flags: qe-verify+

This required changing the Tab Group repo to emit one Flow instead of one per data model (one for group meta data and one for tab group assignments). This was a bit of a jenga block change, and it required some structural changes to our tests and repo code.

This also introduces two new data models:

  • TabGroupData
    • This is the new data class wrapper for everything being emitted from the repo.
  • TabGroup
    • This is a new data class so the underlying database model does not have to leak through the codebase.

Some repo operations were also removed if they were only being used inside of tests.

This patch also fixes a typo with the tab group assignment data model.

Original Differential Revision: https://phabricator.services.mozilla.com/D305413

Flags: in-testsuite+
Attachment #9598572 - Flags: approval-mozilla-release? → approval-mozilla-release+

Added to the 152.0.2 relnotes.

Flags: needinfo?(nbond)

Verified on the latest Firefox for Android 152.0.2 version, using a Samsung Galaxy S24 (Android 16), and a Pixel 6 (Android 17).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: