mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
feat: Enhance sidebar navigation with collapsible sections and state management
- Added support for collapsible navigation sections in the sidebar, allowing users to expand or collapse sections based on their preferences. - Integrated the collapsed state management into the app store for persistence across sessions. - Updated the sidebar component to conditionally render the header based on the selected sidebar style. - Ensured synchronization of collapsed section states with user settings for a consistent experience.
This commit is contained in:
@@ -699,6 +699,7 @@ export function hydrateStoreFromSettings(settings: GlobalSettings): void {
|
||||
fontFamilyMono: settings.fontFamilyMono ?? null,
|
||||
sidebarOpen: settings.sidebarOpen ?? true,
|
||||
sidebarStyle: settings.sidebarStyle ?? 'unified',
|
||||
collapsedNavSections: settings.collapsedNavSections ?? {},
|
||||
chatHistoryOpen: settings.chatHistoryOpen ?? false,
|
||||
maxConcurrency: settings.maxConcurrency ?? DEFAULT_MAX_CONCURRENCY,
|
||||
autoModeByWorktree: restoredAutoModeByWorktree,
|
||||
|
||||
@@ -54,6 +54,7 @@ const SETTINGS_FIELDS_TO_SYNC = [
|
||||
'openTerminalMode', // Maps to terminalState.openTerminalMode
|
||||
'sidebarOpen',
|
||||
'sidebarStyle',
|
||||
'collapsedNavSections',
|
||||
'chatHistoryOpen',
|
||||
'maxConcurrency',
|
||||
'autoModeByWorktree', // Per-worktree auto mode settings (only maxConcurrency is persisted)
|
||||
@@ -699,6 +700,7 @@ export async function refreshSettingsFromServer(): Promise<boolean> {
|
||||
theme: serverSettings.theme as unknown as ThemeMode,
|
||||
sidebarOpen: serverSettings.sidebarOpen,
|
||||
sidebarStyle: serverSettings.sidebarStyle ?? 'unified',
|
||||
collapsedNavSections: serverSettings.collapsedNavSections ?? {},
|
||||
chatHistoryOpen: serverSettings.chatHistoryOpen,
|
||||
maxConcurrency: serverSettings.maxConcurrency,
|
||||
autoModeByWorktree: restoredAutoModeByWorktree,
|
||||
|
||||
Reference in New Issue
Block a user