diff --git a/Sources/AppDelegate.swift b/Sources/AppDelegate.swift index cd623863..f1769ec7 100644 --- a/Sources/AppDelegate.swift +++ b/Sources/AppDelegate.swift @@ -2705,6 +2705,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent isTerminatingApp = true _ = saveSessionSnapshot(includeScrollback: true, removeWhenEmpty: false) + // Tagged DEV builds are ephemeral, skip quit confirmation entirely. + if SocketControlSettings.isTaggedDevBuild() { + return .terminateNow + } + // If the user already confirmed via the Cmd+Q shortcut warning dialog // (handleQuitShortcutWarning), skip the check to avoid a second alert. if isQuitWarningConfirmed { @@ -9005,6 +9010,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent } private func handleQuitShortcutWarning() -> Bool { + // Tagged DEV builds are ephemeral, skip quit confirmation entirely. + if SocketControlSettings.isTaggedDevBuild() { + NSApp.terminate(nil) + return true + } + if !QuitWarningSettings.isEnabled() { NSApp.terminate(nil) return true diff --git a/Sources/SocketControlSettings.swift b/Sources/SocketControlSettings.swift index 8d44e573..9524cf51 100644 --- a/Sources/SocketControlSettings.swift +++ b/Sources/SocketControlSettings.swift @@ -533,6 +533,12 @@ struct SocketControlSettings { || bundleIdentifier.hasPrefix("com.cmuxterm.app.debug.") } + /// Tagged DEV builds have bundle IDs like `com.cmuxterm.app.debug.`. + static func isTaggedDevBuild(bundleIdentifier: String? = Bundle.main.bundleIdentifier) -> Bool { + guard let bundleIdentifier else { return false } + return bundleIdentifier.hasPrefix("\(baseDebugBundleIdentifier).") + } + static func taggedDebugSocketPath( bundleIdentifier: String?, environment: [String: String]