From 6d95780bb2daf0c0a681fc91c3410e66c1da7b8a Mon Sep 17 00:00:00 2001 From: digua Date: Sun, 9 Aug 2026 13:37:00 +0800 Subject: [PATCH] fix(layout): restore header tools outside debug mode Treat the persisted side position as debug-only at runtime so upgraded users retain a visible header entry while their original preference remains available when debug mode is enabled again. --- src/components/layout/ActionToolsPanel.vue | 6 ++--- .../layout/session/SessionAnalysisHeader.vue | 2 +- src/stores/layout.ts | 8 ++++++- src/stores/settings.test.ts | 24 +++++++++++++++++++ 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/components/layout/ActionToolsPanel.vue b/src/components/layout/ActionToolsPanel.vue index 6145d688..acbefbb7 100644 --- a/src/components/layout/ActionToolsPanel.vue +++ b/src/components/layout/ActionToolsPanel.vue @@ -6,9 +6,9 @@ import { useLayoutStore } from '@/stores/layout' const { t } = useI18n() const layoutStore = useLayoutStore() -const { isToolsPanelMini, toolsPanelPosition, isToolsPanelOpen } = storeToRefs(layoutStore) +const { isToolsPanelMini, effectiveToolsPanelPosition, isToolsPanelOpen } = storeToRefs(layoutStore) -const isHeaderMode = computed(() => toolsPanelPosition.value === 'header') +const isHeaderMode = computed(() => effectiveToolsPanelPosition.value === 'header') const isPanelVisible = computed(() => !isHeaderMode.value || isToolsPanelOpen.value) const panelRef = ref(null) @@ -99,7 +99,7 @@ const headerTools = [ const visibleTools = computed(() => (isHeaderMode.value ? headerTools : tools)) -watch(toolsPanelPosition, () => { +watch(effectiveToolsPanelPosition, () => { isToolsPanelOpen.value = false }) diff --git a/src/components/layout/session/SessionAnalysisHeader.vue b/src/components/layout/session/SessionAnalysisHeader.vue index 3421db11..ca132f4c 100644 --- a/src/components/layout/session/SessionAnalysisHeader.vue +++ b/src/components/layout/session/SessionAnalysisHeader.vue @@ -58,7 +58,7 @@ const navigationItems = computed(() =>