From 5e09cf7a8eedf8896b995bea267c865af979c93f Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Mon, 29 Dec 2025 21:34:42 -0800 Subject: [PATCH] fix(conversation-assistant): version generation and settings button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add ./generate-version.sh call in install.sh before swift build to ensure AppVersion.swift is regenerated with latest VERSION.json - Fix openSettings() selector syntax: remove extra parentheses from Selector(("...")) and add fallback for macOS 12 and earlier - Remove test comment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../macos/Sources/Views/MenuBarViewModel.swift | 10 +++++----- features/conversation-assistant/macos/install.sh | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/features/conversation-assistant/macos/Sources/Views/MenuBarViewModel.swift b/features/conversation-assistant/macos/Sources/Views/MenuBarViewModel.swift index 4d84b4da6..04aaa99d8 100644 --- a/features/conversation-assistant/macos/Sources/Views/MenuBarViewModel.swift +++ b/features/conversation-assistant/macos/Sources/Views/MenuBarViewModel.swift @@ -140,11 +140,12 @@ class MenuBarViewModel: ObservableObject { } // Activate the app (required for menu bar apps to show settings) NSApp.activate(ignoringOtherApps: true) - // Open settings window - use the modern selector + // Open settings window - macOS 14+ renamed to showSettingsWindow, older versions use showPreferencesWindow + // Note: Using string-based selector since #selector requires @objc exposure which NSApplication methods don't have if #available(macOS 14, *) { - NSApp.sendAction(Selector(("showSettingsWindow:")), to: nil, from: nil) - } else if #available(macOS 13, *) { - NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil) + NSApp.sendAction(Selector("showSettingsWindow:"), to: nil, from: nil) + } else { + NSApp.sendAction(Selector("showPreferencesWindow:"), to: nil, from: nil) } } @@ -162,4 +163,3 @@ class MenuBarViewModel: ObservableObject { lastSyncText = text } } -// v0.0.31 - pipeline test diff --git a/features/conversation-assistant/macos/install.sh b/features/conversation-assistant/macos/install.sh index 6ed20a34e..ecea56790 100755 --- a/features/conversation-assistant/macos/install.sh +++ b/features/conversation-assistant/macos/install.sh @@ -89,6 +89,14 @@ build_application() { cd "$SCRIPT_DIR" + # Generate version file from VERSION.json + print_info "Generating version info..." + if [[ -x "./generate-version.sh" ]]; then + ./generate-version.sh + else + print_warning "generate-version.sh not found or not executable, skipping version generation" + fi + # Clean previous builds if [[ -d ".build" ]]; then rm -rf .build