-
Date: Tue, 25 Nov 2025 11:30:10 +1100
Subject: [PATCH 09/15] refactor: update vertical tabs CSS by removing
deprecated styles and enhancing separator animations for grouping
---
src/zen/tabs/zen-tabs/vertical-tabs.css | 43 ++++++++++++-------------
1 file changed, 20 insertions(+), 23 deletions(-)
diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css
index 06bbaead18..becd31a357 100644
--- a/src/zen/tabs/zen-tabs/vertical-tabs.css
+++ b/src/zen/tabs/zen-tabs/vertical-tabs.css
@@ -157,25 +157,6 @@
border-inline-start: none;
}
- &::after {
- content: '';
- position: absolute;
- inset: auto 4px;
- left: 4px;
- right: 4px;
- top: 50%;
- height: 12px;
- transform: translateY(-50%);
- background-color: currentColor;
- mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2012'%20fill='none'%3E%3Cpath%20d='M0%206%20Q6%200%2012%206%20T24%206%20T36%206%20T48%206'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20fill='none'/%3E%3C/svg%3E");
- mask-size: 48px 12px;
- mask-repeat: repeat;
- mask-position: 0 50%;
- opacity: 0;
- pointer-events: none;
- transition: opacity 0.2s ease-in-out;
- will-change: mask-position;
- }
}
#tabbrowser-tabs[movingtab] & {
@@ -237,11 +218,27 @@
&[data-grouping='true'] toolbarseparator {
background: transparent;
- }
- &[data-grouping='true'] toolbarseparator::after {
- opacity: 0.9;
- animation: zenWorkspaceSquiggle 1.2s linear infinite;
+ &::after {
+ content: '';
+ position: absolute;
+ inset: auto 4px;
+ left: 4px;
+ right: 4px;
+ top: 50%;
+ height: 12px;
+ transform: translateY(-50%);
+ background-color: currentColor;
+ mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2012'%20fill='none'%3E%3Cpath%20d='M0%206%20Q6%200%2012%206%20T24%206%20T36%206%20T48%206'%20stroke='white'%20stroke-width='2'%20stroke-linecap='round'%20fill='none'/%3E%3C/svg%3E");
+ mask-size: 48px 12px;
+ mask-repeat: repeat;
+ mask-position: 0 50%;
+ opacity: 0.9;
+ pointer-events: none;
+ transition: opacity 0.2s ease-in-out;
+ will-change: mask-position;
+ animation: zenWorkspaceSquiggle 1.2s linear infinite;
+ }
}
}
From 8956cfb59ce3fd1e47285689da7453f0e0a99633 Mon Sep 17 00:00:00 2001
From: Matteo Mekhail <67237370+matteoiscrying@users.noreply.github.com>
Date: Tue, 25 Nov 2025 11:30:59 +1100
Subject: [PATCH 10/15] refactor: remove unused Services import from
ZenTabsTidy.sys.mjs
---
src/zen/ml/ZenTabsTidy.sys.mjs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/zen/ml/ZenTabsTidy.sys.mjs b/src/zen/ml/ZenTabsTidy.sys.mjs
index de29c23d6b..f5d6fd36bc 100644
--- a/src/zen/ml/ZenTabsTidy.sys.mjs
+++ b/src/zen/ml/ZenTabsTidy.sys.mjs
@@ -2,7 +2,6 @@
// 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/.
-const Services = globalThis.Services;
const { setTimeout } = ChromeUtils.importESModule('resource://gre/modules/Timer.sys.mjs');
export async function groupTabsBySimilarity({
From c33c23cc4847e3b9479390cf1b0b02b9657636cc Mon Sep 17 00:00:00 2001
From: Matteo Mekhail <67237370+matteoiscrying@users.noreply.github.com>
Date: Tue, 25 Nov 2025 11:34:40 +1100
Subject: [PATCH 11/15] refactor: optimize EngineProcess import by using lazy
loading in ZenTabsTidy.sys.mjs
---
src/zen/ml/ZenTabsTidy.sys.mjs | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/zen/ml/ZenTabsTidy.sys.mjs b/src/zen/ml/ZenTabsTidy.sys.mjs
index f5d6fd36bc..8a83039d23 100644
--- a/src/zen/ml/ZenTabsTidy.sys.mjs
+++ b/src/zen/ml/ZenTabsTidy.sys.mjs
@@ -3,6 +3,11 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
const { setTimeout } = ChromeUtils.importESModule('resource://gre/modules/Timer.sys.mjs');
+const lazy = {};
+
+ChromeUtils.defineESModuleGetters(lazy, {
+ EngineProcess: 'chrome://global/content/ml/EngineProcess.sys.mjs',
+});
export async function groupTabsBySimilarity({
window: browserWindow,
@@ -317,9 +322,7 @@ async function generateTabEmbeddings(tabData) {
}
try {
- const { createEngine } = ChromeUtils.importESModule(
- 'chrome://global/content/ml/EngineProcess.sys.mjs'
- );
+ const { createEngine } = lazy.EngineProcess;
const engine = await createEngine({
taskName: 'feature-extraction',
@@ -475,9 +478,7 @@ async function generateAiClusterLabel(clusterData) {
}
try {
- const { createEngine } = ChromeUtils.importESModule(
- 'chrome://global/content/ml/EngineProcess.sys.mjs'
- );
+ const { createEngine } = lazy.EngineProcess;
const tabDescriptions = clusterData
.map((data, idx) => {
From 4cf856ebbf2cb51c8d06ead23470ac2fc5f92a2d Mon Sep 17 00:00:00 2001
From: Matteo Mekhail <67237370+matteoiscrying@users.noreply.github.com>
Date: Tue, 25 Nov 2025 12:01:27 +1100
Subject: [PATCH 12/15] refactor: update ZenTabsTidy import path and clean up
zen-assets.jar.inc.mn
---
src/browser/base/content/zen-assets.jar.inc.mn | 1 -
src/zen/ml/moz.build | 8 ++++++++
src/zen/moz.build | 1 +
src/zen/workspaces/ZenWorkspaces.mjs | 2 +-
4 files changed, 10 insertions(+), 2 deletions(-)
create mode 100644 src/zen/ml/moz.build
diff --git a/src/browser/base/content/zen-assets.jar.inc.mn b/src/browser/base/content/zen-assets.jar.inc.mn
index 1e038ef388..d8ee81f6ed 100644
--- a/src/browser/base/content/zen-assets.jar.inc.mn
+++ b/src/browser/base/content/zen-assets.jar.inc.mn
@@ -44,7 +44,6 @@
content/browser/zen-components/ZenWorkspaceCreation.mjs (../../zen/workspaces/ZenWorkspaceCreation.mjs)
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
- content/browser/zen-components/ZenTabsTidy.sys.mjs (../../zen/ml/ZenTabsTidy.sys.mjs)
content/browser/zen-components/ZenGradientGenerator.mjs (../../zen/workspaces/ZenGradientGenerator.mjs)
* content/browser/zen-styles/zen-workspaces.css (../../zen/workspaces/zen-workspaces.css)
content/browser/zen-styles/zen-gradient-generator.css (../../zen/workspaces/zen-gradient-generator.css)
diff --git a/src/zen/ml/moz.build b/src/zen/ml/moz.build
new file mode 100644
index 0000000000..0c0e1c65fa
--- /dev/null
+++ b/src/zen/ml/moz.build
@@ -0,0 +1,8 @@
+# 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/.
+
+EXTRA_JS_MODULES += [
+ "ZenTabsTidy.sys.mjs",
+]
+
diff --git a/src/zen/moz.build b/src/zen/moz.build
index 21915a69ab..660e34bdba 100644
--- a/src/zen/moz.build
+++ b/src/zen/moz.build
@@ -9,6 +9,7 @@ EXTRA_PP_COMPONENTS += [
DIRS += [
"common",
"glance",
+ "ml",
"mods",
"tests",
"urlbar",
diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs
index d4947972df..eae658e2cc 100644
--- a/src/zen/workspaces/ZenWorkspaces.mjs
+++ b/src/zen/workspaces/ZenWorkspaces.mjs
@@ -56,7 +56,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
async #getTabsTidyModule() {
if (!this.#tabsTidyModulePromise) {
this.#tabsTidyModulePromise = ChromeUtils.importESModule(
- 'chrome://browser/content/zen-components/ZenTabsTidy.sys.mjs'
+ 'resource:///modules/ZenTabsTidy.sys.mjs'
);
}
return this.#tabsTidyModulePromise;
From 700fc53effadcf20f23b9caca1348ccddd329d4f Mon Sep 17 00:00:00 2001
From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com>
Date: Mon, 8 Dec 2025 10:44:54 +0100
Subject: [PATCH 13/15] Discard changes to
locales/en-GB/browser/browser/zen-workspaces.ftl
---
.../en-GB/browser/browser/zen-workspaces.ftl | 50 ++++++++-----------
1 file changed, 21 insertions(+), 29 deletions(-)
diff --git a/locales/en-GB/browser/browser/zen-workspaces.ftl b/locales/en-GB/browser/browser/zen-workspaces.ftl
index 95d34d0d8a..0439556353 100644
--- a/locales/en-GB/browser/browser/zen-workspaces.ftl
+++ b/locales/en-GB/browser/browser/zen-workspaces.ftl
@@ -3,53 +3,53 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
zen-panel-ui-workspaces-text = Other workspaces
-zen-panel-ui-workspaces-create =
+zen-panel-ui-workspaces-create =
.label = Create Space
-zen-panel-ui-folder-create =
+zen-panel-ui-folder-create =
.label = Create Folder
-zen-panel-ui-new-empty-split =
+zen-panel-ui-new-empty-split =
.label = New Split
-zen-workspaces-panel-context-delete =
+zen-workspaces-panel-context-delete =
.label = Delete Workspace
.accesskey = D
-zen-workspaces-panel-change-name =
+zen-workspaces-panel-change-name =
.label = Change Name
-zen-workspaces-panel-change-icon =
+zen-workspaces-panel-change-icon =
.label = Change Icon
-zen-workspaces-panel-context-default-profile =
+zen-workspaces-panel-context-default-profile =
.label = Set Profile
-zen-workspaces-panel-unload =
+zen-workspaces-panel-unload =
.label = Unload Space
zen-workspaces-how-to-reorder-title = How to reorder spaces
zen-workspaces-how-to-reorder-desc = Drag the space icons at the bottom of the sidebar to reorder them
-zen-workspaces-change-theme =
+zen-workspaces-change-theme =
.label = Edit Theme
-zen-workspaces-panel-context-open =
+zen-workspaces-panel-context-open =
.label = Open Workspace
.accesskey = O
-zen-workspaces-panel-context-edit =
+zen-workspaces-panel-context-edit =
.label = Edit Workspace
.accesskey = E
-context-zen-change-workspace-tab =
+context-zen-change-workspace-tab =
.label = Change Tab(s) To Workspace
.accesskey = C
-zen-bookmark-edit-panel-workspace-selector =
+zen-bookmark-edit-panel-workspace-selector =
.value = Other Workspace
.accesskey = W
-zen-panel-ui-gradient-generator-algo-complementary =
+zen-panel-ui-gradient-generator-algo-complementary =
.label = Complementary
-zen-panel-ui-gradient-generator-algo-splitComplementary =
+zen-panel-ui-gradient-generator-algo-splitComplementary =
.label = Split
-zen-panel-ui-gradient-generator-algo-analogous =
+zen-panel-ui-gradient-generator-algo-analogous =
.label = Analogous
-zen-panel-ui-gradient-generator-algo-triadic =
+zen-panel-ui-gradient-generator-algo-triadic =
.label = Triadic
-zen-panel-ui-gradient-generator-algo-floating =
+zen-panel-ui-gradient-generator-algo-floating =
.label = Floating
zen-panel-ui-gradient-click-to-add = Click to add a colour
-zen-workspace-creation-name =
+zen-workspace-creation-name =
.placeholder = Space Name
-zen-workspaces-panel-context-reorder =
+zen-workspaces-panel-context-reorder =
.label = Reorder Spaces
zen-workspace-creation-profile = Profile
.tooltiptext = Profiles are used to separate cookies and site data between spaces.
@@ -60,14 +60,6 @@ zen-workspaces-delete-workspace-body = Are you sure you want to delete { $name }
# Note that the html tag MUST not be changed or removed, as it is used to better
# display the shortcut in the toast notification.
zen-workspaces-close-all-unpinned-tabs-toast = Tabs Closed! Use { $shortcut } to undo.
-zen-workspaces-close-all-unpinned-tabs-title =
+zen-workspaces-close-all-unpinned-tabs-title =
.label = Clear
.tooltiptext = Close all unpinned tabs
-
-zen-workspaces-group-tabs-toast = Created { $count } { $count ->
- [one] group
- *[other] groups
- }!
-zen-workspaces-group-tabs-title =
- .label = Group
- .tooltiptext = Group tabs by similarity
From 50b7b1868b9d7c40f727897062fe07c480d47b74 Mon Sep 17 00:00:00 2001
From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com>
Date: Mon, 8 Dec 2025 10:45:01 +0100
Subject: [PATCH 14/15] Discard changes to
locales/it/browser/browser/zen-workspaces.ftl
---
locales/it/browser/browser/zen-workspaces.ftl | 50 ++++++++-----------
1 file changed, 21 insertions(+), 29 deletions(-)
diff --git a/locales/it/browser/browser/zen-workspaces.ftl b/locales/it/browser/browser/zen-workspaces.ftl
index 70927fd956..45eb15dbc9 100644
--- a/locales/it/browser/browser/zen-workspaces.ftl
+++ b/locales/it/browser/browser/zen-workspaces.ftl
@@ -3,53 +3,53 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
zen-panel-ui-workspaces-text = Spazi
-zen-panel-ui-workspaces-create =
+zen-panel-ui-workspaces-create =
.label = Crea Spazio
-zen-panel-ui-folder-create =
+zen-panel-ui-folder-create =
.label = Crea Cartella
-zen-panel-ui-new-empty-split =
+zen-panel-ui-new-empty-split =
.label = Nuova Divisione
-zen-workspaces-panel-context-delete =
+zen-workspaces-panel-context-delete =
.label = Elimina lo Spazio
.accesskey = D
-zen-workspaces-panel-change-name =
+zen-workspaces-panel-change-name =
.label = Cambia Nome
-zen-workspaces-panel-change-icon =
+zen-workspaces-panel-change-icon =
.label = Cambia Icona
-zen-workspaces-panel-context-default-profile =
+zen-workspaces-panel-context-default-profile =
.label = Imposta Profilo
-zen-workspaces-panel-unload =
+zen-workspaces-panel-unload =
.label = Scarica Spazio
zen-workspaces-how-to-reorder-title = Come riordinare gli spazi
zen-workspaces-how-to-reorder-desc = Trascina le icone degli spazi in fondo alla barra laterale per riordinarle
-zen-workspaces-change-theme =
+zen-workspaces-change-theme =
.label = Modifica Tema
-zen-workspaces-panel-context-open =
+zen-workspaces-panel-context-open =
.label = Apri Spazio
.accesskey = O
-zen-workspaces-panel-context-edit =
+zen-workspaces-panel-context-edit =
.label = Modifica Spazio
.accesskey = E
-context-zen-change-workspace-tab =
+context-zen-change-workspace-tab =
.label = Metti scheda/e su uno spazio di lavoro
.accesskey = C
-zen-bookmark-edit-panel-workspace-selector =
+zen-bookmark-edit-panel-workspace-selector =
.value = Spazi
.accesskey = W
-zen-panel-ui-gradient-generator-algo-complementary =
+zen-panel-ui-gradient-generator-algo-complementary =
.label = Complementare
-zen-panel-ui-gradient-generator-algo-splitComplementary =
+zen-panel-ui-gradient-generator-algo-splitComplementary =
.label = Dividi
-zen-panel-ui-gradient-generator-algo-analogous =
+zen-panel-ui-gradient-generator-algo-analogous =
.label = Analogo
-zen-panel-ui-gradient-generator-algo-triadic =
+zen-panel-ui-gradient-generator-algo-triadic =
.label = Triadico
-zen-panel-ui-gradient-generator-algo-floating =
+zen-panel-ui-gradient-generator-algo-floating =
.label = Fluttuante
zen-panel-ui-gradient-click-to-add = Clicca per aggiungere un colore
-zen-workspace-creation-name =
+zen-workspace-creation-name =
.placeholder = Nome dello Spazio
-zen-workspaces-panel-context-reorder =
+zen-workspaces-panel-context-reorder =
.label = Riordina Spazi
zen-workspace-creation-profile = Profilo
.tooltiptext = I profili vengono usati per separare i cookie e i dati dei siti tra gli spazi.
@@ -60,14 +60,6 @@ zen-workspaces-delete-workspace-body = Sei sicuro di voler cancellare { $name }?
# Note that the html tag MUST not be changed or removed, as it is used to better
# display the shortcut in the toast notification.
zen-workspaces-close-all-unpinned-tabs-toast = Scheda chiusa! Usa { $shortcut } per riaprirla.
-zen-workspaces-close-all-unpinned-tabs-title =
+zen-workspaces-close-all-unpinned-tabs-title =
.label = Pulisci
.tooltiptext = Chiudi tutte le schede non bloccate
-
-zen-workspaces-group-tabs-toast = { $count ->
- [one] Creato { $count } gruppo
- *[other] Creati { $count } gruppi
- }!
-zen-workspaces-group-tabs-title =
- .label = Raggruppa
- .tooltiptext = Raggruppa le schede per similarità
From acb38ca05fe683eb2fa6c9a74c20308afd6ecc5d Mon Sep 17 00:00:00 2001
From: Matteo Mekhail <67237370+matteoiscrying@users.noreply.github.com>
Date: Tue, 9 Dec 2025 17:43:07 +1100
Subject: [PATCH 15/15] fix: hide group tabs button when browser.ml.enable is
disabled
---
src/browser/themes/shared/zen-icons/icons.css | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css
index af184d20cb..4211f037ee 100644
--- a/src/browser/themes/shared/zen-icons/icons.css
+++ b/src/browser/themes/shared/zen-icons/icons.css
@@ -403,6 +403,10 @@
@media -moz-pref('zen.view.show-clear-tabs-button', false) {
display: none;
}
+
+ @media -moz-pref('browser.ml.enable', false) {
+ display: none;
+ }
}
.zen-workspace-close-unpinned-tabs-button {