Closed Bug 1952902 Opened 1 year ago Closed 1 year ago

Only 25 Tabs are restored for Saved and Closed or Deleted groups

Categories

(Firefox :: Session Restore, defect, P1)

Desktop
Unspecified
defect
Points:
2

Tracking

()

VERIFIED FIXED
138 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox136 --- disabled
firefox137 --- verified
firefox138 --- verified

People

(Reporter: rdoghi, Assigned: sthompson)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [fidefe-tabgrps-sessionstore][fidefe-quality-foundation?])

Attachments

(3 files)

Attached video 25s.mp4

Found in

  • 138.0a1 (2025-03-10)

Affected versions

  • 138.0a1 (2025-03-10)
    137.0b4

Affected platforms

  • All

Steps to reproduce

  1. Have at least 30 tabs.
  2. Add all 30 tabs to a group.
  3. Open a New tab.
  4. Save and Close the Tab group or Delete it.
  5. Restore the Tab group from Recently closed Tabs or from the List all Tabs menu

Expected result

  • All tabs should be restored to the previously saved group

Actual result

  • Only 25 tabs are restored to the previously saved group

Regression range
Not a Regression

Assignee: nobody → jswinarton
Points: --- → 2
Component: Tabbed Browser → Session Restore
Priority: -- → P1
Whiteboard: [fidefe-tabgrps-sessionstore]
Whiteboard: [fidefe-tabgrps-sessionstore] → [fidefe-tabgrps-sessionstore][fidefe-quality-foundation?]
Assignee: jswinarton → sthompson
Keywords: regression
Regressed by: 1933574

My changes from bug 1933574 started running closed and saved-and-closed tab groups' tab data through maybeSaveClosedTab in order to utilize maybeSaveClosedTab's existing code for reformatting tab data into the same data format used by closed tabs. This had the unintended side effect of limiting the number of tabs we save in closed or saved-and-closed tab groups to the value of pref browser.sessionstore.max_tabs_undo, which defaults to 25.

When closing single or multiple tabs, session state has historically capped the number of closed tabs being tracked. The main motivation was to prevent session file sizes on disk from getting too large.

When we introduced tab groups to session state, we avoided those caps when the tab group itself is being closed/saved. Users think of tab groups as whole entities. We were successfully saving tab groups with any number of tabs.

I introduced a regression causing closed tab groups and saved-and-closed tab groups to have their tab lists in session state capped. This patch resolves the regression by bypassing the cap when a closing tab is being closed as part of a tab group closing as a whole. Single or multiple tabs that are closed directly by the user should still be capped even if those tabs were in a tab group.

Pushed by sthompson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b22a8fb3e4b closed tab groups and saved tab groups should retain all tabs r=dao,sessionstore-reviewers
Regressions: 1953337
Regressions: 1953338
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch

This issue is verified as fixed in our latest Nightly 138.0a1 (2025-03-12).
Since the Tab group limit is no longer 25, I encountered a performance issue with a Tab group of over 200 tabs and I logged it here Bug 1953533.

When closing single or multiple tabs, session state has historically capped the number of closed tabs being tracked. The main motivation was to prevent session file sizes on disk from getting too large.

When we introduced tab groups to session state, we avoided those caps when the tab group itself is being closed/saved. Users think of tab groups as whole entities. We were successfully saving tab groups with any number of tabs.

I introduced a regression causing closed tab groups and saved-and-closed tab groups to have their tab lists in session state capped. This patch resolves the regression by bypassing the cap when a closing tab is being closed as part of a tab group closing as a whole. Single or multiple tabs that are closed directly by the user should still be capped even if those tabs were in a tab group.

Original Revision: https://phabricator.services.mozilla.com/D241087

Attachment #9471468 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: Data loss for users who save and/or close tab groups with more than 25 tabs and then later restore those tab groups
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: Create more than 25 non-empty tabs. Multi-select all tabs, right-click, add tabs to a new tab group. Right click tab group label and choose to save and close the group. Open the tab overflow menu/all tabs menu and click on the tab group to restore it. The tab group should be restored to its previous condition with all tabs.
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Single-line logical change to exempt tab groups from the standard limit on the number of closed tabs tracked by the session store. Automated tests confirm no regressions related to the limits on closed tabs. Automated tests confirm that users will have all grouped tabs retained in session state.
  • String changes made/needed: No
  • Is Android affected?: no
Attachment #9471468 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed in our latest Beta 137.0b6

Status: RESOLVED → VERIFIED
See Also: → 1954300
Regressions: 1954300
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: