From e105aa7378818e93410be98ccc95c043a51c3d3e Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Wed, 19 Aug 2026 15:17:40 +0200 Subject: [PATCH] Hide Mail integration behind a kill switch pending the macOS 27 beta fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Confirmed via live debugging this is a genuine OS bug (first-time Automation consent grants never work on this beta), not fixable in-app. Rather than ship a Settings section that can't currently work, added MailTools.isHiddenPendingAppleFix (true for now) mirroring the existing PersonalDataTools kill switch used for the same purpose during an earlier Calendar/Contacts TCC bug — hides the Settings UI and forces mailEnabled to false regardless of the persisted value, with no code deleted. Flip back to false once a newer beta/RC is confirmed to fix it. --- oAI/Services/SettingsService.swift | 11 ++++++++++- oAI/Views/Screens/SettingsView.swift | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/oAI/Services/SettingsService.swift b/oAI/Services/SettingsService.swift index 2e6e8f4..72aea9e 100644 --- a/oAI/Services/SettingsService.swift +++ b/oAI/Services/SettingsService.swift @@ -32,6 +32,15 @@ enum PersonalDataTools { static let isHiddenPendingAppleFix = false } +/// Kill switch for the Mail integration, hidden while blocked by a confirmed macOS 27 beta bug: +/// first-time Automation consent grants never show a dialog or create a TCC record at all (not +/// fixable in-app — see feature_mail_applescript_integration in memory for the full investigation). +/// Same shape as `PersonalDataTools` above. Flip back to `false` once Rune confirms a newer beta/RC +/// fixes it — the tool code itself is complete and doesn't need changes, just re-enabling. +enum MailTools { + static let isHiddenPendingAppleFix = true +} + @Observable class SettingsService { static let shared = SettingsService() @@ -760,7 +769,7 @@ class SettingsService { // MARK: - Mail Settings (Apple Mail.app via AppleScript) var mailEnabled: Bool { - get { cache["mailEnabled"] == "true" } + get { !MailTools.isHiddenPendingAppleFix && cache["mailEnabled"] == "true" } set { cache["mailEnabled"] = String(newValue) DatabaseService.shared.setSetting(key: "mailEnabled", value: String(newValue)) diff --git a/oAI/Views/Screens/SettingsView.swift b/oAI/Views/Screens/SettingsView.swift index 010b846..ea3c3a0 100644 --- a/oAI/Views/Screens/SettingsView.swift +++ b/oAI/Views/Screens/SettingsView.swift @@ -1033,6 +1033,10 @@ It's better to admit "I need more information" or "I cannot do that" than to fak } // MARK: Mail + // Hidden while MailTools.isHiddenPendingAppleFix is true — blocked by a confirmed macOS 27 + // beta bug (first-time Automation consent grants never work), not an app bug. See + // feature_mail_applescript_integration in memory. Flip the switch back once fixed. + if !MailTools.isHiddenPendingAppleFix { Divider() VStack(alignment: .leading, spacing: 8) { @@ -1120,6 +1124,7 @@ It's better to admit "I need more information" or "I cannot do that" than to fak } } } + } } // MARK: - External MCP Servers Section