From 31b032429dfe09a9d00c3989ec6dd2f6ce8e861d Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Wed, 3 Sep 2025 15:46:33 +0800 Subject: [PATCH] fix(sidebar): change default pinned state to true for sidebar restoration --- static/js/components/SidebarManager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/components/SidebarManager.js b/static/js/components/SidebarManager.js index 637959ab..674fe825 100644 --- a/static/js/components/SidebarManager.js +++ b/static/js/components/SidebarManager.js @@ -173,7 +173,7 @@ export class SidebarManager { if (!sidebar || !hoverArea) return; // Get stored pin state - const isPinned = getStorageItem(`${this.pageType}_sidebarPinned`, false); + const isPinned = getStorageItem(`${this.pageType}_sidebarPinned`, true); this.isPinned = isPinned; // Sidebar starts hidden by default (CSS handles this) @@ -922,7 +922,7 @@ export class SidebarManager { } restoreSidebarState() { - const isPinned = getStorageItem(`${this.pageType}_sidebarPinned`, false); + const isPinned = getStorageItem(`${this.pageType}_sidebarPinned`, true); const expandedPaths = getStorageItem(`${this.pageType}_expandedNodes`, []); const displayMode = getStorageItem(`${this.pageType}_displayMode`, 'tree'); // 'tree' or 'list', default to 'tree'