From f00ef47af2f0325584be04d2837cd8f05b56dcf2 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 26 Mar 2026 20:19:43 +1100 Subject: [PATCH 1/3] fix: update messaging in menubar icon missing --- .../Coder-Desktop/Coder_DesktopApp.swift | 39 ++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift b/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift index eab01ea..da25933 100644 --- a/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift +++ b/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift @@ -147,7 +147,10 @@ class AppDelegate: NSObject, NSApplicationDelegate { } func applicationShouldHandleReopen(_: NSApplication, hasVisibleWindows _: Bool) -> Bool { - if !state.skipHiddenIconAlert, let menuBar, !menuBar.menuBarExtra.isVisible { + if !state.skipHiddenIconAlert, + let menuBar, + !menuBar.menuBarExtra.isVisible + { displayIconHiddenAlert() } return true @@ -173,15 +176,33 @@ class AppDelegate: NSObject, NSApplicationDelegate { let alert = NSAlert() alert.alertStyle = .informational alert.messageText = "Coder Desktop is hidden!" - alert.informativeText = """ - Coder Desktop is running, but there's no space in the menu bar for it's icon. - You can rearrange icons by holding command. - """ + if #available(macOS 26, *) { + alert.informativeText = """ + Coder Desktop is already running, but its menu bar item may be hidden or disabled. + """ + alert.addButton(withTitle: "Open Menu Bar Settings") + } else { + alert.informativeText = """ + Coder Desktop is already running, but there's no space in the menu bar for its icon. + """ + } + + let suppressCheckbox = NSButton(checkboxWithTitle: "Don't show again", target: nil, action: nil) + suppressCheckbox.state = state.skipHiddenIconAlert ? .on : .off + alert.accessoryView = suppressCheckbox + alert.addButton(withTitle: "OK") - alert.addButton(withTitle: "Don't show again") - let resp = alert.runModal() - if resp == .alertSecondButtonReturn { - state.skipHiddenIconAlert = true + let response = alert.runModal() + state.skipHiddenIconAlert = suppressCheckbox.state == .on + if #available(macOS 26, *), response == .alertFirstButtonReturn { + // We'll need to ensure this continues to work in future macOS versions + if !NSWorkspace.shared.open( + URL(string: "x-apple.systempreferences:com.apple.ControlCenter-Settings.extension?MenuBar")! + ) { + NSWorkspace.shared.open( + URL(string: "x-apple.systempreferences:com.apple.ControlCenter-Settings.extension")! + ) + } } } } From 56d9c4cd9d6796976bbb11609981883d2d048757 Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Wed, 1 Apr 2026 16:27:15 +1100 Subject: [PATCH 2/3] Update Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift Co-authored-by: Ethan <39577870+ethanndickson@users.noreply.github.com> --- Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift b/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift index da25933..c46110b 100644 --- a/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift +++ b/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift @@ -178,7 +178,8 @@ class AppDelegate: NSObject, NSApplicationDelegate { alert.messageText = "Coder Desktop is hidden!" if #available(macOS 26, *) { alert.informativeText = """ - Coder Desktop is already running, but its menu bar item may be hidden or disabled. + Coder Desktop is already running, but its menu bar item may be disabled, or hidden due to a lack of space. + You can rearrange icons by holding command. """ alert.addButton(withTitle: "Open Menu Bar Settings") } else { From d1f6c47a605ff483dc4d19c6c38e2c9a070e0407 Mon Sep 17 00:00:00 2001 From: Jake Date: Wed, 1 Apr 2026 16:47:54 +1100 Subject: [PATCH 3/3] chore: fix lint --- Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift b/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift index c46110b..86b0989 100644 --- a/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift +++ b/Coder-Desktop/Coder-Desktop/Coder_DesktopApp.swift @@ -178,7 +178,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { alert.messageText = "Coder Desktop is hidden!" if #available(macOS 26, *) { alert.informativeText = """ - Coder Desktop is already running, but its menu bar item may be disabled, or hidden due to a lack of space. + Coder Desktop is already running, but its menu bar item may be disabled, or hidden due to a lack of space. You can rearrange icons by holding command. """ alert.addButton(withTitle: "Open Menu Bar Settings")