From dfc47ee5d746e9f0e77544ccc65edcf5ff5382df Mon Sep 17 00:00:00 2001 From: DQSS Date: Thu, 9 Apr 2026 22:51:24 +0200 Subject: [PATCH] gh-12241: fix skip startup bookmark invalidation when no workspace bookmarks exist (gh-13168) --- src/zen/spaces/ZenSpaceManager.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs index d1f6a609d..53dcf5bed 100644 --- a/src/zen/spaces/ZenSpaceManager.mjs +++ b/src/zen/spaces/ZenSpaceManager.mjs @@ -2469,8 +2469,14 @@ class nsZenWorkspaces { } } - // Reset bookmarks - this.#invalidateBookmarkContainers(); + // Avoid forcing a startup toolbar rebuild when there are no + // workspace-specific bookmark assignments to apply. + const hasWorkspaceBookmarks = !!Object.keys( + this._workspaceBookmarksCache?.bookmarks || {} + ).length; + if (!onInit || hasWorkspaceBookmarks) { + this.#invalidateBookmarkContainers(); + } // Update workspace indicator await this.updateWorkspaceIndicator(workspace, this.workspaceIndicator);