Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
81e854a
feat: Full cross-window workspace syncing, b=no-bug, c=workspaces
mr-cheffy Aug 27, 2025
7a4cdaa
feat: Also change icons and labels if the tab is pending, b=no-bug, c…
mr-cheffy Sep 1, 2025
91f5d58
feat: Dont session duplicate the tabs, b=no-bug, c=workspaces
mr-cheffy Sep 2, 2025
f6922ef
Merge branch 'dev' into window-sync
mr-cheffy Sep 3, 2025
6b12153
Merge branch 'dev' into window-sync
mr-cheffy Sep 27, 2025
6e6337a
Merge branch 'dev' into window-sync
mr-cheffy Sep 27, 2025
a55b1c7
feat: Properly handle tab moves, b=no-bug, c=workspaces
mr-cheffy Sep 27, 2025
86006c8
feat: Start on new session restore, b=no-bug, c=no-component
mr-cheffy Sep 28, 2025
9bc7b9c
Merge branch 'window-sync' of https://github.com/zen-browser/desktop …
mr-cheffy Sep 28, 2025
240a031
Discard changes to prefs/browser.yaml
mr-cheffy Oct 18, 2025
a738a82
Merge branch 'dev' into window-sync
mr-cheffy Oct 18, 2025
4a7f8fc
Merge branch 'dev' into window-sync
mr-cheffy Oct 19, 2025
af20a65
Merge branch 'dev' into window-sync
mr-cheffy Oct 19, 2025
79ff574
feat: Start doing out own session restore, b=no-bug, c=folders, tabs
mr-cheffy Oct 29, 2025
1b83b77
Merge branch 'dev' into window-sync
mr-cheffy Oct 31, 2025
76acc8b
feat: Stop using pinned manager and use zen session sidebar, b=no-bug…
mr-cheffy Oct 31, 2025
bf1b0dc
feat: Dont restore windows that are already initialized, b=no-bug, c=…
mr-cheffy Nov 1, 2025
c4dd470
chore: Update patches to ff 145, b=no-bug, c=no-component
mr-cheffy Nov 13, 2025
e5517eb
Discard changes to src/browser/components/sessionstore/SessionStore-s…
mr-cheffy Nov 13, 2025
3e39ef2
Discard changes to src/browser/components/tabbrowser/content/tab-js.p…
mr-cheffy Nov 13, 2025
7f225ac
Discard changes to src/browser/components/tabbrowser/content/tabbrows…
mr-cheffy Nov 13, 2025
68b37ac
Discard changes to src/zen/tabs/ZenPinnedTabsStorage.mjs
mr-cheffy Nov 13, 2025
e419c4d
Merge branch 'dev' into window-sync
mr-cheffy Nov 13, 2025
12c921f
feat: Run session saver before opening a new winodw, b=no-bug, c=tabs
mr-cheffy Nov 13, 2025
eefc8cb
feat: Clone the previous state, b=no-bug, c=no-component
mr-cheffy Nov 13, 2025
c86875b
feat: Move window sync to its own JS module, b=no-bug, c=workspaces
mr-cheffy Nov 17, 2025
ce986be
feat: Run session saver before opening a new window, b=no-bug, c=no-c…
mr-cheffy Nov 17, 2025
0adf260
feat: Full cross-window workspace syncing, b=no-bug, c=workspaces
mr-cheffy Aug 27, 2025
c3b9c3c
feat: Also change icons and labels if the tab is pending, b=no-bug, c…
mr-cheffy Sep 1, 2025
acb3708
feat: Dont session duplicate the tabs, b=no-bug, c=workspaces
mr-cheffy Sep 2, 2025
1d26040
feat: Start on new session restore, b=no-bug, c=no-component
mr-cheffy Sep 28, 2025
c60990c
feat: Properly handle tab moves, b=no-bug, c=workspaces
mr-cheffy Sep 27, 2025
435762c
Discard changes to prefs/browser.yaml
mr-cheffy Oct 18, 2025
34c725a
feat: Start doing out own session restore, b=no-bug, c=folders, tabs
mr-cheffy Oct 29, 2025
61659c6
feat: Stop using pinned manager and use zen session sidebar, b=no-bug…
mr-cheffy Oct 31, 2025
2706e87
feat: Dont restore windows that are already initialized, b=no-bug, c=…
mr-cheffy Nov 1, 2025
32d603c
chore: Update patches to ff 145, b=no-bug, c=no-component
mr-cheffy Nov 13, 2025
0041758
Discard changes to src/browser/components/sessionstore/SessionStore-s…
mr-cheffy Nov 13, 2025
c2a5066
Discard changes to src/browser/components/tabbrowser/content/tab-js.p…
mr-cheffy Nov 13, 2025
a61846b
Discard changes to src/browser/components/tabbrowser/content/tabbrows…
mr-cheffy Nov 13, 2025
c5df637
Discard changes to src/zen/tabs/ZenPinnedTabsStorage.mjs
mr-cheffy Nov 13, 2025
6fbba04
feat: Run session saver before opening a new winodw, b=no-bug, c=tabs
mr-cheffy Nov 13, 2025
9c5bf19
feat: Clone the previous state, b=no-bug, c=no-component
mr-cheffy Nov 13, 2025
8a963a9
feat: Move window sync to its own JS module, b=no-bug, c=workspaces
mr-cheffy Nov 17, 2025
40bc51f
feat: Run session saver before opening a new window, b=no-bug, c=no-c…
mr-cheffy Nov 17, 2025
a765d36
Merge branch 'window-sync' of https://github.com/zen-browser/desktop …
mr-cheffy Nov 21, 2025
c6cd912
feat: Start making use of IDs instead of sync identifiers, b=no-bug, …
mr-cheffy Nov 21, 2025
1fcef12
feat: Listen to new tab opens for new sync system, b=no-bug, c=common…
mr-cheffy Nov 22, 2025
04ab9a4
feat: Listen for more tab events and properly sync them, b=no-bug, c=…
mr-cheffy Nov 22, 2025
57233a1
feat: Start moving browser views to the selected windows, b=no-bug, c…
mr-cheffy Nov 23, 2025
722ffa5
chore: Remove extra patch, b=no-bug, c=no-component
mr-cheffy Nov 23, 2025
7dd3cf5
feat: Leave a screenshot of the page behind when switching windows or…
mr-cheffy Nov 28, 2025
ae62f5c
feat: Run session saves right before writing and quiting, b=no-bug, c…
mr-cheffy Nov 28, 2025
a84bd5b
fix: Fixed going back to a different window not allowing to type on i…
mr-cheffy Dec 2, 2025
8bf790d
feat: Start syncing folders as well, b=no-bug, c=folders
mr-cheffy Dec 2, 2025
8be603a
Merge branch 'dev' of https://github.com/zen-browser/desktop into win…
mr-cheffy Dec 3, 2025
a0268ac
Discard changes to src/browser/components/tabbrowser/content/tab-js.p…
mr-cheffy Dec 3, 2025
5d96451
chore: Update patches to ff 146, b=no-bug, c=no-component
mr-cheffy Dec 3, 2025
22f2b1f
feat: Early support for unsynced windoiws, b=no-bug, c=workspaces
mr-cheffy Dec 3, 2025
899d590
fix: Move back active views when closing a window, b=no-bug, c=no-com…
mr-cheffy Dec 3, 2025
73f408c
feat: Stop rendering sub-layers when swaping browsers, b=no-bug, c=co…
mr-cheffy Dec 4, 2025
aecea1f
feat: Improved support for unsynced windows support, b=no-bug, c=work…
mr-cheffy Dec 5, 2025
cde32ca
feat: Implemented 'Move To...' Button for unsynced windows, b=no-bug,…
mr-cheffy Dec 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions locales/en-US/browser/browser/zen-workspaces.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ zen-panel-ui-gradient-click-to-add = Click to add a color
zen-workspace-creation-name =
.placeholder = Space Name
zen-move-tab-to-workspace-button =
.label = Move To...
.tooltiptext = Move all tabs in this window to a Space
zen-workspaces-panel-context-reorder =
.label = Reorder Spaces
Expand Down
6 changes: 6 additions & 0 deletions prefs/zen/window-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

- name: zen.window-sync.enabled
value: true
1 change: 0 additions & 1 deletion src/browser/base/content/zen-assets.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
# Scripts used all over the browser
<script type="module" src="chrome://browser/content/zen-components/ZenFolder.mjs"></script>

<script type="module" src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs"></script>
<script type="module" src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs"></script>

<script type="module" src="chrome://browser/content/zen-components/ZenMediaController.mjs"></script>
Expand Down
5 changes: 5 additions & 0 deletions src/browser/base/content/zen-panels/popups.inc
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@
<menuseparator />
<menuitem id="context_zenOpenSiteSettings" data-l10n-id="zen-site-data-site-settings"/>
</menupopup>

<menupopup id="zenMoveTabsToSyncedWorkspacePopup">
# Popup to move tabs to a synced workspace.
# This would be automatically populated with the list of available synced workspaces.
</menupopup>
21 changes: 21 additions & 0 deletions src/browser/components/sessionstore/SessionFile-sys-mjs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/browser/components/sessionstore/SessionFile.sys.mjs b/browser/components/sessionstore/SessionFile.sys.mjs
index 31140cb8be3b529a0952ca8dc55165690b0e2120..605c9e0aa84da0a2d3171a0573e8cd95e27bd0c4 100644
--- a/browser/components/sessionstore/SessionFile.sys.mjs
+++ b/browser/components/sessionstore/SessionFile.sys.mjs
@@ -22,6 +22,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
RunState: "resource:///modules/sessionstore/RunState.sys.mjs",
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
SessionWriter: "resource:///modules/sessionstore/SessionWriter.sys.mjs",
+ ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
});

const PREF_UPGRADE_BACKUP = "browser.sessionstore.upgradeBackup.latestBuildID";
@@ -380,7 +381,7 @@ var SessionFileInternal = {
this._readOrigin = result.origin;

result.noFilesFound = noFilesFound;
-
+ await lazy.ZenSessionStore.readFile();
return result;
},

20 changes: 20 additions & 0 deletions src/browser/components/sessionstore/SessionSaver-sys-mjs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/browser/components/sessionstore/SessionSaver.sys.mjs b/browser/components/sessionstore/SessionSaver.sys.mjs
index 9141793550f7c7ff6aa63d4c85bf571b4499e2d0..f00314ebf75ac826e1c9cca8af264ff8aae106c0 100644
--- a/browser/components/sessionstore/SessionSaver.sys.mjs
+++ b/browser/components/sessionstore/SessionSaver.sys.mjs
@@ -20,6 +20,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
SessionFile: "resource:///modules/sessionstore/SessionFile.sys.mjs",
SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs",
sessionStoreLogger: "resource:///modules/sessionstore/SessionLogger.sys.mjs",
+ ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
});

/*
@@ -305,6 +306,7 @@ var SessionSaverInternal = {
this._maybeClearCookiesAndStorage(state);

Glean.sessionRestore.collectData.stopAndAccumulate(timerId);
+ lazy.ZenSessionStore.saveState(state);
return this._writeState(state);
},

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/browser/components/sessionstore/SessionStartup.sys.mjs b/browser/components/sessionstore/SessionStartup.sys.mjs
index be23213ae9ec7e59358a17276c6c3764d38d9996..ca5a8ccc916ceeab5140f1278d15233cefbe5815 100644
--- a/browser/components/sessionstore/SessionStartup.sys.mjs
+++ b/browser/components/sessionstore/SessionStartup.sys.mjs
@@ -40,6 +40,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
StartupPerformance:
"resource:///modules/sessionstore/StartupPerformance.sys.mjs",
sessionStoreLogger: "resource:///modules/sessionstore/SessionLogger.sys.mjs",
+ ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
});

const STATE_RUNNING_STR = "running";
@@ -179,6 +180,8 @@ export var SessionStartup = {
this._initialState = parsed;
}

+ lazy.ZenSessionStore.onFileRead(this._initialState);
+
if (this._initialState == null) {
// No valid session found.
this._sessionType = this.NO_SESSION;
102 changes: 83 additions & 19 deletions src/browser/components/sessionstore/SessionStore-sys-mjs.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb22176c60c4e 100644
index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..ddeb16347bd279934ad3b8fcd158961ff1220f29 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -127,6 +127,8 @@ const TAB_EVENTS = [
Expand All @@ -11,7 +11,15 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
];

const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
@@ -1911,6 +1913,8 @@ var SessionStoreInternal = {
@@ -196,6 +198,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
TabStateCache: "resource:///modules/sessionstore/TabStateCache.sys.mjs",
TabStateFlusher: "resource:///modules/sessionstore/TabStateFlusher.sys.mjs",
setTimeout: "resource://gre/modules/Timer.sys.mjs",
+ ZenSessionStore: "resource:///modules/zen/ZenSessionManager.sys.mjs",
});

ChromeUtils.defineLazyGetter(lazy, "blankURI", () => {
@@ -1911,6 +1914,8 @@ var SessionStoreInternal = {
case "TabPinned":
case "TabUnpinned":
case "SwapDocShells":
Expand All @@ -20,7 +28,36 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
this.saveStateDelayed(win);
break;
case "TabGroupCreate":
@@ -2384,11 +2388,9 @@ var SessionStoreInternal = {
@@ -2020,6 +2025,10 @@ var SessionStoreInternal = {
this._windows[aWindow.__SSi].isTaskbarTab = true;
}

+ if (aWindow.document.documentElement.hasAttribute("zen-unsynced-window")) {
+ this._windows[aWindow.__SSi].isZenUnsynced = true;
+ }
+
let tabbrowser = aWindow.gBrowser;

// add tab change listeners to all already existing tabs
@@ -2151,7 +2160,6 @@ var SessionStoreInternal = {
if (closedWindowState) {
let newWindowState;
if (
- AppConstants.platform == "macosx" ||
!lazy.SessionStartup.willRestore()
) {
// We want to split the window up into pinned tabs and unpinned tabs.
@@ -2215,6 +2223,9 @@ var SessionStoreInternal = {
});
this._shouldRestoreLastSession = false;
}
+ else if (!aInitialState && isRegularWindow) {
+ lazy.ZenSessionStore.restoreNewWindow(aWindow, this);
+ }

if (this._restoreLastWindow && aWindow.toolbar.visible) {
// always reset (if not a popup window)
@@ -2384,11 +2395,9 @@ var SessionStoreInternal = {
tabbrowser.selectedTab.label;
}

Expand All @@ -32,7 +69,25 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221

// Store the window's close date to figure out when each individual tab
// was closed. This timestamp should allow re-arranging data based on how
@@ -3373,7 +3375,7 @@ var SessionStoreInternal = {
@@ -2465,7 +2474,7 @@ var SessionStoreInternal = {
// 2) Flush the window.
// 3) When the flush is complete, revisit our decision to store the window
// in _closedWindows, and add/remove as necessary.
- if (!winData.isPrivate && !winData.isTaskbarTab) {
+ if (!winData.isPrivate && !winData.isTaskbarTab && !winData.isZenUnsynced) {
this.maybeSaveClosedWindow(winData, isLastWindow);
}

@@ -2486,7 +2495,7 @@ var SessionStoreInternal = {

// Save non-private windows if they have at
// least one saveable tab or are the last window.
- if (!winData.isPrivate && !winData.isTaskbarTab) {
+ if (!winData.isPrivate && !winData.isTaskbarTab && !winData.isZenUnsynced) {
this.maybeSaveClosedWindow(winData, isLastWindow);

if (!isLastWindow && winData.closedId > -1) {
@@ -3373,7 +3382,7 @@ var SessionStoreInternal = {
if (!isPrivateWindow && tabState.isPrivate) {
return;
}
Expand All @@ -41,28 +96,28 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
return;
}

@@ -4089,6 +4091,12 @@ var SessionStoreInternal = {
@@ -4089,6 +4098,12 @@ var SessionStoreInternal = {
Math.min(tabState.index, tabState.entries.length)
);
tabState.pinned = false;
+ tabState.zenEssential = false;
+ tabState.zenPinnedId = null;
+ tabState.zenSyncId = null;
+ tabState.zenIsGlance = false;
+ tabState.zenGlanceId = null;
+ tabState.zenHasStaticLabel = false;
+ tabState.zenWorkspace = aWindow.gZenWorkspaces.activeWorkspace;

if (inBackground === false) {
aWindow.gBrowser.selectedTab = newTab;
@@ -4525,6 +4533,7 @@ var SessionStoreInternal = {
@@ -4525,6 +4540,7 @@ var SessionStoreInternal = {
// Append the tab if we're opening into a different window,
tabIndex: aSource == aTargetWindow ? pos : Infinity,
pinned: state.pinned,
+ essential: state.zenEssential,
userContextId: state.userContextId,
skipLoad: true,
preferredRemoteType,
@@ -5374,7 +5383,7 @@ var SessionStoreInternal = {
@@ -5374,7 +5390,7 @@ var SessionStoreInternal = {

for (let i = tabbrowser.pinnedTabCount; i < tabbrowser.tabs.length; i++) {
let tab = tabbrowser.tabs[i];
Expand All @@ -71,7 +126,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
removableTabs.push(tab);
}
}
@@ -5434,7 +5443,7 @@ var SessionStoreInternal = {
@@ -5434,7 +5450,7 @@ var SessionStoreInternal = {
}

let workspaceID = aWindow.getWorkspaceID();
Expand All @@ -80,7 +135,16 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
winData.workspaceID = workspaceID;
}
},
@@ -5625,11 +5634,12 @@ var SessionStoreInternal = {
@@ -5483,7 +5499,7 @@ var SessionStoreInternal = {

// collect the data for all windows
for (ix in this._windows) {
- if (this._windows[ix]._restoring || this._windows[ix].isTaskbarTab) {
+ if (this._windows[ix]._restoring || this._windows[ix].isTaskbarTab || this._windows[ix].isZenUnsynced) {
// window data is still in _statesToRestore
continue;
}
@@ -5625,11 +5641,12 @@ var SessionStoreInternal = {
}

let tabbrowser = aWindow.gBrowser;
Expand All @@ -94,15 +158,15 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
// update the internal state data for this window
for (let tab of tabs) {
if (tab == aWindow.FirefoxViewHandler.tab) {
@@ -5640,6 +5650,7 @@ var SessionStoreInternal = {
@@ -5640,6 +5657,7 @@ var SessionStoreInternal = {
tabsData.push(tabData);
}

+ winData.folders = aWindow.gZenFolders?.storeDataForSessionStore() || [];
// update tab group state for this window
winData.groups = [];
for (let tabGroup of aWindow.gBrowser.tabGroups) {
@@ -5652,7 +5663,7 @@ var SessionStoreInternal = {
@@ -5652,7 +5670,7 @@ var SessionStoreInternal = {
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
// since it's only inserted into the tab strip after it's selected).
if (aWindow.FirefoxViewHandler.tab?.selected) {
Expand All @@ -111,7 +175,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
winData.title = tabbrowser.tabs[0].label;
}
winData.selected = selectedIndex;
@@ -5765,8 +5776,8 @@ var SessionStoreInternal = {
@@ -5765,8 +5783,8 @@ var SessionStoreInternal = {
// selectTab represents.
let selectTab = 0;
if (overwriteTabs) {
Expand All @@ -122,7 +186,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
selectTab = Math.min(selectTab, winData.tabs.length);
}

@@ -5809,6 +5820,8 @@ var SessionStoreInternal = {
@@ -5809,6 +5827,8 @@ var SessionStoreInternal = {
winData.tabs,
winData.groups ?? []
);
Expand All @@ -131,7 +195,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
this._log.debug(
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
);
@@ -6372,6 +6385,25 @@ var SessionStoreInternal = {
@@ -6372,6 +6392,25 @@ var SessionStoreInternal = {

// Most of tabData has been restored, now continue with restoring
// attributes that may trigger external events.
Expand All @@ -145,8 +209,8 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
+ if (tabData.zenHasStaticLabel) {
+ tab.setAttribute("zen-has-static-label", "true");
+ }
+ if (tabData.zenPinnedId) {
+ tab.setAttribute("zen-pin-id", tabData.zenPinnedId);
+ if (tabData.zenSyncId) {
+ tab.setAttribute("id", tabData.zenSyncId);
+ }
+ if (tabData.zenDefaultUserContextId) {
+ tab.setAttribute("zenDefaultUserContextId", true);
Expand All @@ -157,7 +221,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221

if (tabData.pinned) {
tabbrowser.pinTab(tab);
@@ -7290,7 +7322,7 @@ var SessionStoreInternal = {
@@ -7290,7 +7329,7 @@ var SessionStoreInternal = {

let groupsToSave = new Map();
for (let tIndex = 0; tIndex < window.tabs.length; ) {
Expand All @@ -166,7 +230,7 @@ index 2c2f43bf743ef458b378e85e9ed44a971711e1d9..61bfa1b530c407dd1236543f785eb221
// Adjust window.selected
if (tIndex + 1 < window.selected) {
window.selected -= 1;
@@ -7305,7 +7337,7 @@ var SessionStoreInternal = {
@@ -7305,7 +7344,7 @@ var SessionStoreInternal = {
);
// We don't want to increment tIndex here.
continue;
Expand Down
7 changes: 4 additions & 3 deletions src/browser/components/sessionstore/TabState-sys-mjs.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
index 82721356d191055bec0d4b0ca49e481221988801..1ea5c394c704da295149443d7794961a12f2060b 100644
index 82721356d191055bec0d4b0ca49e481221988801..e1d2c5ca0cbe5431df01f8d6411f88e3325e0ee9 100644
--- a/browser/components/sessionstore/TabState.sys.mjs
+++ b/browser/components/sessionstore/TabState.sys.mjs
@@ -85,7 +85,22 @@ class _TabState {
@@ -85,7 +85,23 @@ class _TabState {
tabData.groupId = tab.group.id;
}

+ tabData.zenWorkspace = tab.getAttribute("zen-workspace-id");
+ tabData.zenPinnedId = tab.getAttribute("zen-pin-id");
+ tabData.zenSyncId = tab.getAttribute("id");
+ tabData.zenEssential = tab.getAttribute("zen-essential");
+ tabData.pinned = tabData.pinned || tabData.zenEssential;
+ tabData.zenDefaultUserContextId = tab.getAttribute("zenDefaultUserContextId");
Expand All @@ -17,6 +17,7 @@ index 82721356d191055bec0d4b0ca49e481221988801..1ea5c394c704da295149443d7794961a
+ tabData.zenHasStaticLabel = tab.hasAttribute("zen-has-static-label");
+ tabData.zenGlanceId = tab.getAttribute("glance-id");
+ tabData.zenIsGlance = tab.hasAttribute("zen-glance-tab");
+ tabData._zenIsActiveTab = tab._zenContentsVisible;
+
tabData.searchMode = tab.ownerGlobal.gURLBar.getSearchMode(browser, true);
+ if (tabData.searchMode?.source === tab.ownerGlobal.UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS) {
Expand Down
14 changes: 3 additions & 11 deletions src/browser/components/tabbrowser/content/tab-js.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..02d70e9b0261f92917d274759838cfbfd6214f77 100644
index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..23b134a8ba674978182415a8bac926f7600f564a 100644
--- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@
Expand Down Expand Up @@ -121,15 +121,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..02d70e9b0261f92917d274759838cfbf
on_click(event) {
if (event.button != 0) {
return;
@@ -575,6 +599,7 @@
)
);
} else {
+ gZenPinnedTabManager._removePinnedAttributes(this, true);
gBrowser.removeTab(this, {
animate: true,
triggeringEvent: event,
@@ -587,6 +612,14 @@
@@ -587,6 +611,14 @@
// (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true;
}
Expand All @@ -144,7 +136,7 @@ index 2dacb325190b6ae42ebeb3e9f0e862dc690ecdca..02d70e9b0261f92917d274759838cfbf
}

on_dblclick(event) {
@@ -610,6 +643,8 @@
@@ -610,6 +642,8 @@
animate: true,
triggeringEvent: event,
});
Expand Down
Loading
Loading