diff --git a/src/renderer/components/Sidebar/Sidebar.tsx b/src/renderer/components/Sidebar/Sidebar.tsx index a3d5a02..d61edaa 100644 --- a/src/renderer/components/Sidebar/Sidebar.tsx +++ b/src/renderer/components/Sidebar/Sidebar.tsx @@ -683,12 +683,22 @@ const TagsNav: React.FC = () => { }; const SettingsNav: React.FC = () => { - const { syncConfigured } = useAppStore(); + const { syncConfigured, tabs, activeTabId, openTab } = useAppStore(); const [activeSection, setActiveSection] = useState(null); + // Check if settings panel is currently active + const isSettingsTabActive = tabs.some(t => t.type === 'settings' && t.id === activeTabId); + const handleNavClick = (category: SettingsCategory) => { + // If settings panel is not open or not active, open it first + if (!isSettingsTabActive) { + openTab({ type: 'settings', id: 'settings', isTransient: false }); + } setActiveSection(category); - scrollToSettingsSection(category); + // Use setTimeout to allow panel to open before scrolling + setTimeout(() => { + scrollToSettingsSection(category); + }, isSettingsTabActive ? 0 : 100); }; return ( @@ -721,6 +731,13 @@ const SettingsNav: React.FC = () => { 📋 Content +