fix(desktop): request Apple Events permission upfront to prevent repeated macOS prompts
Merged
KI
8mo ago+72+72+01234567890123456789-0-0-0123456789
Summary
- macOS repeatedly shows "Superset would like to access data from other apps" when terminal commands interact with other apps (e.g.
osascript,open) - The app lacked the
com.apple.security.automation.apple-eventsentitlement andNSAppleEventsUsageDescription, so macOS couldn't grant persistent permission - Now requests the permission once at app startup so users aren't interrupted mid-session
Changes
src/resources/build/entitlements.mac.plist— New main app entitlements with Apple Events permissionsrc/resources/build/entitlements.mac.inherit.plist— New child process entitlements (inherited by node-pty terminal processes)electron-builder.ts— Reference entitlements files + addNSAppleEventsUsageDescriptiontoextendInfoelectron-builder.canary.ts— SpreadbaseConfig.mac?.extendInfoso canary builds inherit permission descriptionssrc/main/lib/apple-events-permission.ts— Proactively trigger the Automation permission prompt at startup (same pattern asrequestLocalNetworkAccess)src/main/index.ts— CallrequestAppleEventsAccess()at app ready
Test Plan
- Build the desktop app and launch it on macOS
- Verify the Apple Events permission dialog appears once at startup
- After granting, run terminal commands that interact with other apps (e.g.
osascript -e 'tell application "Finder" to activate') - Verify no further "access data from other apps" dialogs appear
- Verify canary build also has the permission descriptions in Info.plist
Summary by CodeRabbit
- New Features
- Added a macOS Apple Events permission prompt at app startup so users can authorize automation/Apple Events access.
- Updated macOS entitlements to enable required runtime capabilities (JIT, unsigned memory, library-validation adjustments, Apple Events automation).
- Improved Canary build behavior to merge and inherit base macOS configuration settings for consistent mac builds.