diff --git a/features/conversation-assistant/macos/Sources/Views/MenuBarView.swift b/features/conversation-assistant/macos/Sources/Views/MenuBarView.swift index c0fddf0b8..747cc5f4f 100644 --- a/features/conversation-assistant/macos/Sources/Views/MenuBarView.swift +++ b/features/conversation-assistant/macos/Sources/Views/MenuBarView.swift @@ -2,6 +2,7 @@ import SwiftUI struct MenuBarView: View { @StateObject private var viewModel = MenuBarViewModel() + @Environment(\.openSettings) private var openSettings var body: some View { VStack(spacing: 0) { @@ -29,7 +30,13 @@ struct MenuBarView: View { // Footer HStack { - Button(action: viewModel.openSettings) { + Button { + // Close popover first, then open settings + if let appDelegate = NSApp.delegate as? AppDelegate { + appDelegate.closePopover() + } + openSettings() + } label: { Image(systemName: "gear") .accessibilityLabel("Settings") }