Restoring a Session will show Tab groups twice in the List all tabs menu
Categories
(Firefox :: Session Restore, defect, P1)
Tracking
()
People
(Reporter: rdoghi, Assigned: sthompson)
References
(Blocks 1 open bug)
Details
(Keywords: regressionwindow-wanted, Whiteboard: [fidefe-tabgrps-sessionstore])
Attachments
(4 files)
Found in
- Nightly 138.0a1 (2023-08-25)
Affected versions
- Nightly 139.0a1 (2025-04-17)
- Nightly 138.0a1 (2023-08-25)
- Beta 137.0b11
Affected platforms
- All
Steps to reproduce
- Create a few Tab groups and close Firefox.
- Start Firefox in offline mode or normal mode.
- Restore the previous session.
- Open the list all tabs menu.
Expected result
- There should only be 1 of each created Tab groups.
Actual result
- Each tab group is duplicated after restoring the previous session in Offline or normal Browsing mode.
Regression range
I will update with a regression range as soon as possible.
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:mak, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Reporter | ||
Comment 2•1 year ago
|
||
I think I found a regression range for this issue but im not entirely sure its correct since the GUI stopped:
13:26.69 INFO: Last good revision: ba305ce7ad141ea641cf08868285b4372403e0b0
13:26.69 INFO: First bad revision: 4374d7fb7f40240e75f41519202eaf8127f323cc
13:26.69 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ba305ce7ad141ea641cf08868285b4372403e0b0&tochange=4374d7fb7f40240e75f41519202eaf8127f323cc
It says its Bug 1951750 that might have caused this but I'm not sure.
Comment 3•1 year ago
|
||
(In reply to Rares Doghi, Desktop QA from comment #2)
I think I found a regression range for this issue but im not entirely sure its correct since the GUI stopped:
13:26.69 INFO: Last good revision: ba305ce7ad141ea641cf08868285b4372403e0b0
13:26.69 INFO: First bad revision: 4374d7fb7f40240e75f41519202eaf8127f323cc
13:26.69 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ba305ce7ad141ea641cf08868285b4372403e0b0&tochange=4374d7fb7f40240e75f41519202eaf8127f323ccIt says its Bug 1951750 that might have caused this but I'm not sure.
I think this is likely not the correct range. I can't access the bug, but judging by the changesets it seems like it should be unrelated :/
| Assignee | ||
Comment 4•1 year ago
|
||
I haven't been able to reproduce this in Nightly 139.0a1 (2025-04-17) (aarch64) on macOS
- Create tabs and 2 tab groups, close Firefox with Cmd + Q
- Start Firefox (and select File > Work Offline to test offline mode)
- Restore the previous session using Cmd + Shift + T
- Open the List All Tabs menu by clicking on the downward arrow button
Result:
- the 2 tab groups are listed at the top of the List All Tabs menu with the heading "Recent Tab Groups." This is expected behavior.
- the menu version of the tab strip with the heading "Current Window" lists all tabs and tab groups in the correct order with no duplicates
I've tried a number of variations
- before restoring the session, open and then close the list all tabs menu
- before restoring the session, open the list all tabs menu and leave it open
| Assignee | ||
Comment 5•1 year ago
|
||
Updated•1 year ago
|
| Reporter | ||
Comment 6•1 year ago
|
||
Adding a Screen recording of this issue. It still occurs in our latest Nightly 139.0a1 (2025-04-21)
| Reporter | ||
Comment 7•1 year ago
|
||
Hi @Stephen can you take a look at this screen recording ? it seems that if we simply reopen those Saved groups they will all be displayed twice in the list all tabs menu, could this be caused by the same issue ? or is this related more to Bug 1961159
| Assignee | ||
Comment 8•1 year ago
|
||
This is great, thank you! I think bug 1961159 may be causing the problems at the very end of dupe2.mp4, but I think the other issues might be caused by something else. I will try the repro steps on Windows to see if that helps me.
| Assignee | ||
Comment 9•1 year ago
|
||
I can reproduce this on Windows 11. I can't reproduce it on macOS.
What's supposed to happen:
- closing the window puts the tab groups on the tab strip into the list of saved tab groups
- opening a window shows the saved tab groups in the list all tabs menu
- restoring the session puts the saved tab groups into the tab strip and removes them from the session's list of saved tab groups
That's happening on macOS, but in Windows, restoring the session puts the saved tab groups into the tab strip but keeps the saved tab groups in the session. Since the list all tabs menu is supposed to list both saved tab groups and open tab groups, this appears as duplicate tab groups. A tab group should only be in one place at a time: 1) tab strip, 2) saved groups, 3) closed groups.
I will investigate on Windows
| Assignee | ||
Comment 10•1 year ago
|
||
Current behavior on Windows: if you close a window that has open tab groups, the tab groups are automatically saved. Opening Firefox into the initial deferred restore state properly shows the tab groups as saved. However, after restoring the previous session manually, the tab groups exist both in the tab strip (correct) and in the list of saved tab groups (incorrect).
Bug 1950611 and bug 1954488 dealt with several edge cases around saved groups + session restore. In Windows, it looks like on session startup, _prepDataForDeferredRestore receives a state where the open tab groups from last session are stored in both savedGroups and windows[].groups[]. _prepDataForDeferredRestore has logic to convert the open tab groups in windows[].groups[] into saved groups, but it'll skip any that are already present in the list of saved groups. This was fine until the fix for bug 1954488, which unsets removeAfterRestore from the saved group; the windows[].groups[] groups get the removeAfterRestore flag set, but that does not get put into savedGroups because the group already exists in savedGroups.
I amended the logic so that when a group is in windows[].groups[] and savedGroups, the tab group state from savedGroups will get removeAfterRestore set back to true.
Not totally sure why I could reproduce this on Windows but not on macOS. It looks like the saved groups in defaultState.savedGroups still have removeAfterRestore: true set even after the delete group.removeAfterRestore. I don't understand how that would happen.
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
Comment 13•1 year ago
|
||
The patch landed in nightly and beta is affected.
:sthompson, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox138towontfix.
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 14•1 year ago
|
||
Verified as fixed in our latest Nightly 139.0a1 (2025-04-24)
| Assignee | ||
Updated•1 year ago
|
| Reporter | ||
Comment 15•1 year ago
|
||
Updating the main status flag.
Description
•