A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
Coucou window: in the Dock, Flow and the notch's settings in one place
Claude3d2f3a040a3a
diff --git a/NotchBuddy/Resources/Localizable.xcstrings b/NotchBuddy/Resources/Localizable.xcstringsindex 9da80a82..8921eb9b 100644--- a/NotchBuddy/Resources/Localizable.xcstrings+++ b/NotchBuddy/Resources/Localizable.xcstrings@@ -4690,6 +4690,136 @@}}},+ "hub.section.notch" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "النوتش"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "নচ"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Notch"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Notch"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Notch"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "नॉच"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Notch"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Notch"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Notch"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "刘海"+ }+ }+ }+ },+ "hub.settings.app" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "التطبيق"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "অ্যাপ"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "App"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "App"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "App"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "ऐप"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Aplikasi"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "App"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Приложение"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "App"+ }+ }+ }+ },"hub.settings.cancel" : {"extractionState" : "manual","localizations" : {@@ -4950,6 +5080,136 @@}}},+ "hub.settings.dock" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "إظهار Coucou في Dock"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Dock-এ Coucou দেখান"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Show Coucou in the Dock"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mostrar Coucou en el Dock"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Afficher Coucou dans le Dock"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou को Dock में दिखाएँ"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Tampilkan Coucou di Dock"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Mostrar o Coucou no Dock"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Показывать Coucou в Dock"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "在程序坞中显示 Coucou"+ }+ }+ }+ },+ "hub.settings.dock-detail" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "افتح Coucou كأي تطبيق؛ والنقر على أيقونته يعيد هذه النافذة. عند الإيقاف يبقى Coucou في شريط القوائم فقط."+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "যেকোনো অ্যাপের মতো Coucou খুলুন; এর আইকনে ক্লিক করলে এই উইন্ডো ফিরে আসে। বন্ধ থাকলে Coucou শুধু মেনু বারে থাকে।"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Open Coucou like any app; a click on its icon brings this window back. Off, Coucou lives in the menu bar only."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Abre Coucou como cualquier app; un clic en su icono trae esta ventana. Desactivado, Coucou solo está en la barra de menús."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ouvre Coucou comme n'importe quelle app ; un clic sur son icône ramène cette fenêtre. Désactivé, Coucou vit seulement dans la barre des menus."+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou को किसी भी ऐप की तरह खोलें; इसके आइकन पर क्लिक करने से यह विंडो वापस आती है। बंद होने पर Coucou सिर्फ़ मेनू बार में रहता है।"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Buka Coucou seperti aplikasi lain; klik ikonnya untuk memunculkan jendela ini. Jika mati, Coucou hanya ada di bar menu."+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Abra o Coucou como qualquer app; um clique no ícone traz esta janela de volta. Desligado, o Coucou fica só na barra de menus."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Открывайте Coucou как обычное приложение; щелчок по значку возвращает это окно. Если выключено, Coucou живёт только в строке меню."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "像其他 App 一样打开 Coucou;点按其图标即可回到此窗口。关闭后,Coucou 只在菜单栏中。"+ }+ }+ }+ },"hub.settings.engine-apple" : {"extractionState" : "manual","localizations" : {@@ -5405,6 +5665,71 @@}}},+ "hub.settings.open-at-launch" : {+ "extractionState" : "manual",+ "localizations" : {+ "ar" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "فتح هذه النافذة عند فتح Coucou"+ }+ },+ "bn" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou খুললে এই উইন্ডো খুলুন"+ }+ },+ "en" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Open this window when you open Coucou"+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Abrir esta ventana al abrir Coucou"+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Ouvrir cette fenêtre quand tu lances Coucou"+ }+ },+ "hi" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Coucou खोलने पर यह विंडो खोलें"+ }+ },+ "id" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Buka jendela ini saat membuka Coucou"+ }+ },+ "pt-BR" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Abrir esta janela ao abrir o Coucou"+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Открывать это окно при запуске Coucou"+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "打开 Coucou 时打开此窗口"+ }+ }+ }+ },"hub.settings.paste-again" : {"extractionState" : "manual","localizations" : {diff --git a/NotchBuddy/Sources/App/AppDelegate.swift b/NotchBuddy/Sources/App/AppDelegate.swiftindex 1d61217d..a12ed8ce 100644--- a/NotchBuddy/Sources/App/AppDelegate.swift+++ b/NotchBuddy/Sources/App/AppDelegate.swift@@ -20,9 +20,23 @@ final class AppDelegate: NSObject, NSApplicationDelegate {signal(SIGPIPE, SIG_IGN)// Warm up Keychain cache on main thread BEFORE any poller or view touches it_ = KeychainStore.shared+ #if APPSTORENSApp.setActivationPolicy(.accessory)+ #else+ // In the Dock like a regular app (Coucou → Settings → Flow), or only in the menu bar.+ NSApp.setActivationPolicy(FlowHubController.showInDock ? .regular : .accessory)+ #endifsetupMenuBarItem()setupIsland()+ #if !APPSTORE+ // Opened by hand (Finder, Dock, Spotlight): the Coucou window shows. Not at login.+ if FlowHubController.openAtLaunch && !FlowHubController.launchedAtLogin() {+ Task { @MainActor in+ try? await Task.sleep(for: .milliseconds(600))+ FlowHubController.shared.show()+ }+ }+ #endif#if DEBUGlet debugMenu = NSMenu(title: "Debug")debugMenu.addItem(NSMenuItem(title: "Render recap image", action: #selector(renderRecapImage), keyEquivalent: ""))@@ -36,10 +50,49 @@ final class AppDelegate: NSObject, NSApplicationDelegate {}func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool {+ #if APPSTOREopenIsland()+ #else+ // A click on the Dock icon: the Coucou window.+ FlowHubController.shared.show()+ #endifreturn true}+ #if !APPSTORE+ /// Right-click on the Dock icon.+ func applicationDockMenu(_ sender: NSApplication) -> NSMenu? {+ let menu = NSMenu()+ func add(_ title: String, _ action: Selector) {+ let item = NSMenuItem(title: title, action: action, keyEquivalent: "")+ item.target = self+ menu.addItem(item)+ }+ add(String(localized: "hub.page.dictation"), #selector(openFlowHub))+ add(String(localized: "hub.page.notes"), #selector(openNotes))+ add(NoteTaker.shared.isRecording ? String(localized: "notes.stop") : String(localized: "hub.record-call"),+ #selector(toggleCallRecording))+ menu.addItem(.separator())+ add(String(localized: "Open Coucou"), #selector(openIsland))+ add(NSLocalizedString("Settings…", comment: ""), #selector(openSettings))+ return menu+ }++ @objc private func openNotes() {+ FlowHubController.shared.show(.notes)+ }++ @objc private func toggleCallRecording() {+ let taker = NoteTaker.shared+ if taker.isRecording {+ taker.stop()+ } else {+ FlowHubController.shared.show(.notes)+ Task { await taker.start() }+ }+ }+ #endif+// MARK: - Menu barprivate func setupMenuBarItem() {@@ -88,7 +141,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {#if !APPSTORE@objc private func openFlowHub() {if AppState.shared.mode == .expanded { islandController?.collapse() }- FlowHubController.shared.show()+ FlowHubController.shared.show(.dictation)}#endif@@ -101,9 +154,14 @@ final class AppDelegate: NSObject, NSApplicationDelegate {openSettings()}- @objc private func openSettings() {+ @objc func openSettings() {// The island floats above every window; fold it away so it can't cover Settings.if AppState.shared.mode == .expanded { islandController?.collapse() }+ #if !APPSTORE+ // Everything in one place: Settings are the notch's pages of the Coucou window.+ let section = UserDefaults.standard.string(forKey: "settingsSection") ?? "general"+ FlowHubController.shared.show(HubPage.forSettings(section))+ #elseif let w = settingsWindow, w.isVisible {placeBelowIsland(w)@@ -122,6 +180,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {settingsWindow = winwin.makeKeyAndOrderFront(nil)NSApp.activate(ignoringOtherApps: true)+ #endif}/// Centres the window horizontally and keeps its title bar clear of the island paneldiff --git a/NotchBuddy/Sources/App/FlowHub.swift b/NotchBuddy/Sources/App/FlowHub.swiftindex 1ba71d29..fb811e1e 100644--- a/NotchBuddy/Sources/App/FlowHub.swift+++ b/NotchBuddy/Sources/App/FlowHub.swift@@ -1,15 +1,46 @@#if !APPSTOREimport AppKit+import Carbonimport SwiftUI-/// The pages of the Coucou Flow window.+/// The pages of the Coucou window: Flow (the dictation, the Notetaker) and the notch's settings.enum HubPage: String, CaseIterable, Identifiable {case dictation, notes, insights, dictionary, snippets, styles, settings+ case general, pills, agents, chat, integrations, voice, shortcutsvar id: String { rawValue }+ static let flowPages: [HubPage] = [.dictation, .notes, .insights, .dictionary, .snippets, .styles, .settings]+ static let notchPages: [HubPage] = [.general, .pills, .agents, .chat, .integrations, .voice, .shortcuts]++ /// The section of Settings this page shows, for the notch's pages.+ var settingsSection: String? {+ switch self {+ case .general: return "general"+ case .pills: return "activepills"+ case .agents: return "agents"+ case .chat: return "chat"+ case .integrations: return "integrations"+ case .voice: return "voice"+ case .shortcuts: return "shortcuts"+ default: return nil+ }+ }++ /// The page showing a section of Settings ("chat", "voice"…).+ static func forSettings(_ section: String) -> HubPage {+ notchPages.first { $0.settingsSection == section } ?? .general+ }+var title: String {switch self {+ case .general: return String(localized: "General")+ case .pills: return String(localized: "Active pills")+ case .agents: return String(localized: "Agents")+ case .chat: return String(localized: "Chat")+ case .integrations: return String(localized: "Integrations")+ case .voice: return String(localized: "Voice")+ case .shortcuts: return String(localized: "Shortcuts")case .dictation: return String(localized: "hub.page.dictation")case .notes: return String(localized: "hub.page.notes")case .insights: return String(localized: "hub.page.insights")@@ -28,7 +59,14 @@ enum HubPage: String, CaseIterable, Identifiable {case .dictionary: return "book.closed"case .snippets: return "bolt"case .styles: return "textformat"- case .settings: return "gearshape"+ case .settings: return "slider.horizontal.3"+ case .general: return "gearshape"+ case .pills: return "square.grid.2x2"+ case .agents: return "terminal"+ case .chat: return "bubble.left.and.bubble.right"+ case .integrations: return "puzzlepiece.extension"+ case .voice: return "waveform"+ case .shortcuts: return "keyboard"}}}@@ -67,6 +105,36 @@ final class FlowHubController {let router = HubRouter()private var window: NSWindow?+ static let showInDockKey = "coucouShowInDock"+ static let openAtLaunchKey = "coucouOpenAtLaunch"++ /// Coucou in the Dock, like a regular app (on by default in the GitHub build).+ static var showInDock: Bool {+ get { UserDefaults.standard.object(forKey: showInDockKey) as? Bool ?? true }+ set {+ UserDefaults.standard.set(newValue, forKey: showInDockKey)+ NSApp.setActivationPolicy(newValue ? .regular : .accessory)+ if newValue { NSApp.activate(ignoringOtherApps: true) }+ }+ }++ /// The window opens when Coucou is opened by hand (never at login).+ static var openAtLaunch: Bool {+ get { UserDefaults.standard.object(forKey: openAtLaunchKey) as? Bool ?? true }+ set { UserDefaults.standard.set(newValue, forKey: openAtLaunchKey) }+ }++ /// Whether macOS opened Coucou at login, rather than you from the Finder, the Dock or Spotlight.+ static func launchedAtLogin() -> Bool {+ if let event = NSAppleEventManager.shared().currentAppleEvent,+ event.paramDescriptor(forKeyword: AEKeyword(keyAEPropData))?.enumCodeValue == OSType(keyAELaunchedAsLogInItem) {+ return true+ }+ // A login item started by launchd may come without that flag: the first minutes after+ // the Mac starts count as a login.+ return ProcessInfo.processInfo.systemUptime < 180+ }+func show(_ page: HubPage? = nil) {if let page { router.page = page }if let window {@@ -77,7 +145,7 @@ final class FlowHubController {let win = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1100, height: 720),styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView],backing: .buffered, defer: false)- win.title = "Coucou Flow"+ win.title = "Coucou"win.titlebarAppearsTransparent = truewin.titleVisibility = .hiddenwin.appearance = NSAppearance(named: .darkAqua)@@ -118,6 +186,11 @@ struct FlowHubView: View {case .snippets: HubSnippetsPage()case .styles: HubStylesPage(router: router)case .settings: HubSettingsPage()+ default:+ if let section = router.page.settingsSection {+ SettingsView(embeddedSection: section)+ .id(section)+ }}}}@@ -132,18 +205,27 @@ private struct HubSidebar: View {VStack(alignment: .leading, spacing: 3) {HStack(spacing: 10) {HubMochi(size: 28)- (Text(verbatim: "Coucou ") + Text(verbatim: "Flow").foregroundColor(HubTheme.accent))+ Text(verbatim: "Coucou").font(.system(size: 18, weight: .bold))}.padding(.horizontal, 8).padding(.top, 44)- .padding(.bottom, 18)+ .padding(.bottom, 12)- ForEach([HubPage.dictation, .notes, .insights, .dictionary, .snippets, .styles]) { page in- HubSidebarItem(page: page, selected: router.page == page) { router.page = page }+ ScrollView {+ VStack(alignment: .leading, spacing: 2) {+ HubSidebarHeader(text: "Flow")+ ForEach(HubPage.flowPages) { page in+ HubSidebarItem(page: page, selected: router.page == page) { router.page = page }+ }+ HubSidebarHeader(text: String(localized: "hub.section.notch"))+ .padding(.top, 14)+ ForEach(HubPage.notchPages) { page in+ HubSidebarItem(page: page, selected: router.page == page) { router.page = page }+ }+ }}- Spacer(minLength: 12)- HubSidebarItem(page: .settings, selected: router.page == .settings) { router.page = .settings }+ .scrollIndicators(.never)status.padding(.top, 8)}@@ -178,6 +260,20 @@ private struct HubSidebar: View {}}+/// "FLOW", "NOTCH": the small capitals above a group of pages.+private struct HubSidebarHeader: View {+ let text: String++ var body: some View {+ Text(text.uppercased(with: .current))+ .font(.system(size: 10.5, weight: .bold))+ .tracking(1.2)+ .foregroundColor(HubTheme.muted)+ .padding(.horizontal, 10)+ .padding(.bottom, 4)+ }+}+private struct HubSidebarItem: View {let page: HubPagelet selected: Bool@@ -196,7 +292,7 @@ private struct HubSidebarItem: View {}.foregroundColor(selected ? HubTheme.text : Color(hex: "#B7BBC2")).padding(.horizontal, 10)- .frame(height: 36)+ .frame(height: 32).background(RoundedRectangle(cornerRadius: 9).fill(Color.white.opacity(selected ? 0.08 : (hover ? 0.04 : 0)))).contentShape(Rectangle())diff --git a/NotchBuddy/Sources/App/FlowHubSettings.swift b/NotchBuddy/Sources/App/FlowHubSettings.swiftindex 3367add9..f17e84ed 100644--- a/NotchBuddy/Sources/App/FlowHubSettings.swift+++ b/NotchBuddy/Sources/App/FlowHubSettings.swift@@ -8,6 +8,8 @@ struct HubSettingsPage: View {@ObservedObject private var store = FlowStore.shared@AppStorage("dictationLanguage") private var language = MacDictation.automatic@State private var confirmClear = false+ @State private var showInDock = FlowHubController.showInDock+ @State private var openAtLaunch = FlowHubController.openAtLaunchvar body: some View {HubPageScaffold(title: String(localized: "hub.page.settings")) {@@ -76,6 +78,21 @@ struct HubSettingsPage: View {.fixedSize(horizontal: false, vertical: true)}+ HubLabel(String(localized: "hub.settings.app"))+ HubCard {+ HubRow(title: String(localized: "hub.settings.dock"), detail: String(localized: "hub.settings.dock-detail")) {+ Toggle("", isOn: Binding(get: { showInDock }, set: { showInDock = $0; FlowHubController.showInDock = $0 }))+ .toggleStyle(.switch)+ .labelsHidden()+ }+ HubDivider()+ HubRow(title: String(localized: "hub.settings.open-at-launch")) {+ Toggle("", isOn: Binding(get: { openAtLaunch }, set: { openAtLaunch = $0; FlowHubController.openAtLaunch = $0 }))+ .toggleStyle(.switch)+ .labelsHidden()+ }+ }+HubLabel(String(localized: "hub.settings.privacy"))HubCard {HubRow(title: String(localized: "hub.settings.keep")) {diff --git a/NotchBuddy/Sources/App/NotchBuddyApp.swift b/NotchBuddy/Sources/App/NotchBuddyApp.swiftindex 2adffe99..39404dfa 100644--- a/NotchBuddy/Sources/App/NotchBuddyApp.swift+++ b/NotchBuddy/Sources/App/NotchBuddyApp.swift@@ -9,5 +9,16 @@ struct NotchBuddyApp: App {Settings {SettingsView()}+ #if !APPSTORE+ .commands {+ // ⌘, and Coucou → Settings… open the notch's pages of the Coucou window.+ CommandGroup(replacing: .appSettings) {+ Button(NSLocalizedString("Settings…", comment: "")) {+ delegate.openSettings()+ }+ .keyboardShortcut(",")+ }+ }+ #endif}}diff --git a/NotchBuddy/Sources/App/SettingsView.swift b/NotchBuddy/Sources/App/SettingsView.swiftindex a15d67df..70f59e04 100644--- a/NotchBuddy/Sources/App/SettingsView.swift+++ b/NotchBuddy/Sources/App/SettingsView.swift@@ -137,6 +137,10 @@ struct SettingsView: View {// Sidebar selection persisted across sessions@AppStorage("settingsSection") private var selectedSection: String = "general"+ /// Shown inside the Coucou Flow window (GitHub build): one section, without this window's+ /// sidebar, as the window has its own.+ private var embeddedSection: String? = nil+ private var section: String { embeddedSection ?? selectedSection }// Active pills: the pill whose colour palette is open, if any@State private var colorPalettePill: String? = nil#if PHONE_LINK@@ -155,6 +159,7 @@ struct SettingsView: View {var body: some View {HStack(spacing: 0) {+ if embeddedSection == nil {// Sidebar — 200 pt, sidebar visual effect backgroundZStack(alignment: .topLeading) {SidebarBackground()@@ -197,21 +202,31 @@ struct SettingsView: View {.frame(width: 200)Divider()+ }// Detail panelVStack(alignment: .leading, spacing: 0) {- Text(sectionTitle)- .font(.title2)- .fontWeight(.semibold)- .padding(.horizontal, 20)- .padding(.top, 20)- .padding(.bottom, 12)+ if embeddedSection == nil {+ Text(sectionTitle)+ .font(.title2)+ .fontWeight(.semibold)+ .padding(.horizontal, 20)+ .padding(.top, 20)+ .padding(.bottom, 12)+ } else {+ Text(sectionTitle)+ .font(.system(size: 28, weight: .bold))+ .padding(.horizontal, 40)+ .padding(.top, 38)+ .padding(.bottom, 18)+ }ScrollView {VStack(alignment: .leading, spacing: 18) {sectionContent}- .padding(.horizontal, 20)+ .padding(.horizontal, embeddedSection == nil ? 20 : 40).padding(.bottom, 16)+ .frame(maxWidth: embeddedSection == nil ? .infinity : 760, alignment: .leading)}if !statusMessage.isEmpty {Divider()@@ -250,7 +265,7 @@ struct SettingsView: View {// MARK: - Section routingprivate var sectionTitle: String {- switch selectedSection {+ switch section {case "general": return String(localized: "General")case "activepills": return String(localized: "Active pills")case "agents": return String(localized: "Agents")@@ -263,7 +278,7 @@ struct SettingsView: View {}@ViewBuilder private var sectionContent: some View {- switch selectedSection {+ switch section {case "activepills": activePillsSectioncase "agents": agentsSectioncase "chat": chatSection@@ -2409,3 +2424,11 @@ struct ShortcutRecorderButton: View {return map[c] ?? "·"}}++extension SettingsView {+ /// One section of Settings, for the Coucou Flow window.+ init(embeddedSection: String) {+ self.init()+ self.embeddedSection = embeddedSection+ }+}