"Restore previous session" appends to the Smart Window new tab instead of overwriting it
Categories
(Core :: Machine Learning: Frontend, enhancement)
Tracking
()
People
(Reporter: giulia, Assigned: giulia)
References
Details
(Whiteboard: [aife])
Attachments
(1 file)
When Smart Window is the user's default and you restore the previous session manually (History -> Restore Previous Session), the restored tabs open alongside the empty Smart Window new tab instead of replacing it. In a Classic window the restore correctly overwrites the initial new tab.
Steps to reproduce:
- Enable Smart Window and set it as the default (
browser.smartwindow.enabled+browser.smartwindow.isDefaultWindow), signed in, withbrowser.startup.page = 1. - Open a few tabs and quit.
- Start Firefox — it opens a Smart Window showing the new tab.
- History menu → "Restore previous session".
Expected: the restored session replaces the new tab (same as a Classic window).
Actual: the new tab is kept and the restored tabs open separately.
Root cause:
SessionStoreInternal._prepWindowToRestoreInto decides whether restore can overwrite the current tabs by checking each tab's URL against a list of "home pages" (about:blank + HomePage.get()):
https://searchfox.org/firefox-main/source/browser/components/sessionstore/SessionStore.sys.mjs (see _prepWindowToRestoreInto, the homePages / removableTabs logic)
A Smart Window's new tab is chrome://browser/content/aiwindow/aiWindow.html, which isn't in that list, so it's not treated as removable. As a result canOverwriteTabs stays false and the restore appends the previous session's tabs instead of overwriting the new tab. A Classic window's initial tab (about:home) is in the list, so it gets overwritten.
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Updated•1 month ago
|
Comment 5•23 days ago
|
||
Verified as fixed in our latest Nightly 155.0a1 (2026-08-10)
Updated•18 days ago
|
Comment 6•17 days ago
|
||
Updating the main status flag.
Description
•