@@ -318,7 +318,9 @@ export class AICustomizationManagementEditor extends EditorPane {
318318 private harnessDropdownButton : HTMLElement | undefined ;
319319 private harnessDropdownIcon : HTMLElement | undefined ;
320320 private harnessDropdownLabel : HTMLElement | undefined ;
321- private sidebarContent : HTMLElement | undefined ;
321+ private sidebarHeaderContainer : HTMLElement | undefined ;
322+ private homeButton : HTMLElement | undefined ;
323+ private homeButtonLabel : HTMLElement | undefined ;
322324
323325 private readonly inEditorContextKey : IContextKey < boolean > ;
324326 private readonly sectionContextKey : IContextKey < string > ;
@@ -527,10 +529,10 @@ export class AICustomizationManagementEditor extends EditorPane {
527529 }
528530
529531 private createSidebar ( ) : void {
530- const sidebarContent = this . sidebarContent = DOM . append ( this . sidebarContainer , $ ( '.sidebar-content' ) ) ;
532+ const sidebarContent = DOM . append ( this . sidebarContainer , $ ( '.sidebar-content' ) ) ;
531533
532- // Harness dropdown (shown when multiple harnesses available)
533- this . createHarnessDropdown ( sidebarContent ) ;
534+ // Header row with home button and optional harness dropdown
535+ this . createSidebarHeader ( sidebarContent ) ;
534536
535537 // Main sections list container (takes remaining space)
536538 const sectionsListContainer = DOM . append ( sidebarContent , $ ( '.sidebar-sections-list' ) ) ;
@@ -619,12 +621,32 @@ export class AICustomizationManagementEditor extends EditorPane {
619621 }
620622 }
621623
622- private createHarnessDropdown ( sidebarContent : HTMLElement ) : void {
624+ private createSidebarHeader ( sidebarContent : HTMLElement ) : void {
625+ const headerRow = this . sidebarHeaderContainer = DOM . append ( sidebarContent , $ ( '.sidebar-header-row' ) ) ;
626+
627+ // Home/overview button
628+ const homeButton = this . homeButton = DOM . append ( headerRow , $ ( 'button.sidebar-home-button' ) ) ;
629+ homeButton . setAttribute ( 'aria-label' , localize ( 'homeButton' , "Overview" ) ) ;
630+ const homeIcon = DOM . append ( homeButton , $ ( 'span.sidebar-home-icon' ) ) ;
631+ homeIcon . classList . add ( ...ThemeIcon . asClassNameArray ( Codicon . home ) ) ;
632+ homeIcon . setAttribute ( 'aria-hidden' , 'true' ) ;
633+ const homeLabel = this . homeButtonLabel = DOM . append ( homeButton , $ ( 'span.sidebar-home-label' ) ) ;
634+ homeLabel . textContent = localize ( 'overview' , "Overview" ) ;
635+ this . editorDisposables . add ( DOM . addDisposableListener ( homeButton , 'click' , ( ) => {
636+ this . showWelcomePage ( ) ;
637+ } ) ) ;
638+
639+ // Harness dropdown (shown when multiple harnesses available)
640+ this . createHarnessDropdown ( headerRow ) ;
641+ this . updateHomeButtonStyle ( ) ;
642+ }
643+
644+ private createHarnessDropdown ( parent : HTMLElement ) : void {
623645 if ( ! this . isHarnessSelectorEnabled ) {
624646 return ;
625647 }
626648
627- const container = this . harnessDropdownContainer = DOM . append ( sidebarContent , $ ( '.sidebar-harness-dropdown' ) ) ;
649+ const container = this . harnessDropdownContainer = DOM . append ( parent , $ ( '.sidebar-harness-dropdown' ) ) ;
628650
629651 this . harnessDropdownButton = DOM . append ( container , $ ( 'button.harness-dropdown-button' ) ) ;
630652 this . harnessDropdownButton . setAttribute ( 'aria-label' , localize ( 'selectHarness' , "Select customization target" ) ) ;
@@ -659,19 +681,32 @@ export class AICustomizationManagementEditor extends EditorPane {
659681 this . harnessDropdownButton = undefined ;
660682 this . harnessDropdownIcon = undefined ;
661683 this . harnessDropdownLabel = undefined ;
662- } else if ( this . isHarnessSelectorEnabled && ! this . harnessDropdownContainer && this . sidebarContent ) {
663- this . createHarnessDropdown ( this . sidebarContent ) ;
684+ this . updateHomeButtonStyle ( ) ;
685+ } else if ( this . isHarnessSelectorEnabled && ! this . harnessDropdownContainer && this . sidebarHeaderContainer ) {
686+ this . createHarnessDropdown ( this . sidebarHeaderContainer ) ;
687+ this . updateHomeButtonStyle ( ) ;
664688 }
665689 // Visibility is handled by updateHarnessDropdown based on harness count
666690 }
667691
692+ private updateHomeButtonStyle ( ) : void {
693+ if ( ! this . homeButtonLabel || ! this . homeButton ) {
694+ return ;
695+ }
696+ // Show full label when harness dropdown is hidden, icon-only when visible
697+ const harnessVisible = this . harnessDropdownContainer && this . harnessDropdownContainer . style . display !== 'none' ;
698+ this . homeButtonLabel . style . display = harnessVisible ? 'none' : '' ;
699+ this . homeButton . style . flex = harnessVisible ? '' : '1' ;
700+ }
701+
668702 private updateHarnessDropdown ( ) : void {
669703 if ( ! this . harnessDropdownContainer || ! this . harnessDropdownIcon || ! this . harnessDropdownLabel ) {
670704 return ;
671705 }
672706 const harnesses = this . harnessService . availableHarnesses . get ( ) ;
673707 // Hide dropdown when only one harness is available
674708 this . harnessDropdownContainer . style . display = harnesses . length <= 1 ? 'none' : '' ;
709+ this . updateHomeButtonStyle ( ) ;
675710
676711 const activeId = this . harnessService . activeHarness . get ( ) ;
677712 const descriptor = harnesses . find ( h => h . id === activeId ) ;
0 commit comments