From 9fefa6c1eee46802d8ad0541a082c532bd12b2c9 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Mon, 12 Jan 2026 17:26:00 +0100 Subject: [PATCH] fix: Correctly initialize new sessions for troubleshooting mode, b=no-bug, c=common --- src/zen/ZenComponents.manifest | 3 ++- src/zen/common/modules/ZenUIManager.mjs | 10 +++++----- src/zen/sessionstore/SessionComponents.manifest | 1 - src/zen/sessionstore/ZenSessionManager.sys.mjs | 15 ++++----------- src/zen/sessionstore/ZenWindowSync.sys.mjs | 3 ++- 5 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/zen/ZenComponents.manifest b/src/zen/ZenComponents.manifest index 0f38828a1..bb1049da1 100644 --- a/src/zen/ZenComponents.manifest +++ b/src/zen/ZenComponents.manifest @@ -9,8 +9,9 @@ # Thus we restrict it to these apps: # # browser: {ec8030f7-c20a-464f-9b0e-13a3a9e97384} +# mobile/android: {aa3c5121-dab2-40e2-81ca-7ea25febc110} -category app-startup nsBrowserGlue @mozilla.org/browser/browserglue;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} +category app-startup nsBrowserGlue @mozilla.org/browser/browserglue;1 application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} application={aa3c5121-dab2-40e2-81ca-7ea25febc110} #include common/Components.manifest #include sessionstore/SessionComponents.manifest diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs index 6afcfbb4f..c4dbb5e07 100644 --- a/src/zen/common/modules/ZenUIManager.mjs +++ b/src/zen/common/modules/ZenUIManager.mjs @@ -859,6 +859,7 @@ window.gZenVerticalTabsManager = { animateItemOpen(aItem) { if ( + !gZenUIManager.motion || !aItem || !gZenUIManager._hasLoadedDOM || !aItem.isConnected || @@ -889,7 +890,7 @@ window.gZenVerticalTabsManager = { }, { duration: 0.11, - ease: "easeOut", + easing: "ease-out", } ) .then(() => {}) @@ -906,7 +907,7 @@ window.gZenVerticalTabsManager = { }, { duration: 0.11, - ease: "easeOut", + easing: "ease-out", } ) .then(() => {}) @@ -937,9 +938,8 @@ window.gZenVerticalTabsManager = { }), }, { - duration: 0.75, - ease: "easeOut", - fill: "forwards", + duration: 0.075, + easing: "ease-out", } ); }, diff --git a/src/zen/sessionstore/SessionComponents.manifest b/src/zen/sessionstore/SessionComponents.manifest index 8e3b0f9b0..675e2b3a7 100644 --- a/src/zen/sessionstore/SessionComponents.manifest +++ b/src/zen/sessionstore/SessionComponents.manifest @@ -3,7 +3,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Browser global components initializing before UI startup -category browser-before-ui-startup resource:///modules/zen/ZenSessionManager.sys.mjs ZenSessionStore.init category browser-before-ui-startup resource:///modules/zen/ZenWindowSync.sys.mjs ZenWindowSync.init # App shutdown consumers diff --git a/src/zen/sessionstore/ZenSessionManager.sys.mjs b/src/zen/sessionstore/ZenSessionManager.sys.mjs index 65b70733a..a8bd78812 100644 --- a/src/zen/sessionstore/ZenSessionManager.sys.mjs +++ b/src/zen/sessionstore/ZenSessionManager.sys.mjs @@ -9,15 +9,7 @@ const lazy = {}; ChromeUtils.defineESModuleGetters(lazy, { PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs", - // eslint-disable-next-line mozilla/valid-lazy - BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.sys.mjs", - // eslint-disable-next-line mozilla/valid-lazy - TabGroupState: "resource:///modules/sessionstore/TabGroupState.sys.mjs", SessionStore: "resource:///modules/sessionstore/SessionStore.sys.mjs", - // eslint-disable-next-line mozilla/valid-lazy - SessionSaver: "resource:///modules/sessionstore/SessionSaver.sys.mjs", - // eslint-disable-next-line mozilla/valid-lazy - setTimeout: "resource://gre/modules/Timer.sys.mjs", gWindowSyncEnabled: "resource:///modules/zen/ZenWindowSync.sys.mjs", DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs", }); @@ -43,7 +35,7 @@ const BROWSER_STARTUP_RESUME_SESSION = 3; // The amount of time (in milliseconds) to wait for our backup regeneration // debouncer to kick off a regeneration. -const REGENERATION_DEBOUNCE_RATE_MS = 20 * 60 * 1000; // 20 minutes +const REGENERATION_DEBOUNCE_RATE_MS = 5 * 60 * 1000; // 5 minutes /** * Class representing the sidebar object stored in the session file. @@ -80,7 +72,6 @@ export class nsZenSessionManager { */ #deferredBackupTask = null; - // Called from SessionComponents.manifest on app-startup init() { this.log("Initializing session manager"); let profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile).path; @@ -101,7 +92,8 @@ export class nsZenSessionManager { log(...args) { if (lazy.gShouldLog) { - console.warn("ZenSessionManager:", ...args); + // eslint-disable-next-line no-console + console.log("ZenSessionManager:", ...args); } } @@ -152,6 +144,7 @@ export class nsZenSessionManager { * @see SessionFileInternal.read */ async readFile() { + this.init(); try { this.log("Reading Zen session file from disk"); let promises = []; diff --git a/src/zen/sessionstore/ZenWindowSync.sys.mjs b/src/zen/sessionstore/ZenWindowSync.sys.mjs index 6e289804c..3d2f4116b 100644 --- a/src/zen/sessionstore/ZenWindowSync.sys.mjs +++ b/src/zen/sessionstore/ZenWindowSync.sys.mjs @@ -125,7 +125,8 @@ class nsZenWindowSync { log(...args) { if (lazy.gShouldLog) { - console.warn("ZenWindowSync:", ...args); + // eslint-disable-next-line no-console + console.info("ZenWindowSync:", ...args); } }