Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

fix(macos): activate the application Settings command

deefd52e5469971
diff --git a/desktop/macos/Runner/SwarmTitlebar.swift b/desktop/macos/Runner/SwarmTitlebar.swift
index d4ff34cff..8d88b44e4 100644
--- a/desktop/macos/Runner/SwarmTitlebar.swift
+++ b/desktop/macos/Runner/SwarmTitlebar.swift
@@ -67,6 +67,18 @@ final class SwarmTitlebar: NSObject, NSMenuItemValidation {
private func installSwarmMenu() {
guard let main = NSApp.mainMenu, main.item(withTitle: "Swarm") == nil else { return }
+ // The stock Flutter nib includes a disabled Preferences placeholder. Make
+ // the app-menu command work, and give ⌘, a single native owner.
+ var settingsInAppMenu = false
+ if let appMenu = main.item(at: 0)?.submenu,
+ let settings = appMenu.items.first(where: { $0.keyEquivalent == "," && $0.action == nil }) {
+ settings.title = "Settings…"
+ settings.target = self
+ settings.action = #selector(menuAction(_:))
+ settings.representedObject = "settings"
+ settings.keyEquivalentModifierMask = [.command]
+ settingsInAppMenu = true
+ }
let menu = NSMenu(title: "Swarm")
func add(_ title: String, _ key: String, _ action: String, _ modifiers: NSEvent.ModifierFlags = [.command]) {
let item = NSMenuItem(title: title, action: #selector(menuAction(_:)), keyEquivalent: key)
@@ -84,7 +96,7 @@ final class SwarmTitlebar: NSObject, NSMenuItemValidation {
menu.addItem(.separator())
add("Add Agent…", "f", "addAgent", [.command, .shift])
add("Close Agent View", "w", "closePane", [.command, .shift])
- add("Settings…", ",", "settings")
+ if !settingsInAppMenu { add("Settings…", ",", "settings") }
let item = NSMenuItem(title: "Swarm", action: nil, keyEquivalent: "")
item.submenu = menu
main.insertItem(item, at: min(2, main.numberOfItems))
diff --git a/docs/harness-v2-progress.md b/docs/harness-v2-progress.md
index 3afa13f8c..821739e65 100644
--- a/docs/harness-v2-progress.md
+++ b/docs/harness-v2-progress.md
@@ -91,7 +91,7 @@ Approved reference: `/Users/ab/code/harness-new-ui`, React prototype commit `f83
- Native tab click, double-click rename, context menu, close, drag/drop reorder. Tab button instances are retained across refreshes.
- Accessibility names/selection update with state, including overflowed tabs that have never painted. Tab context menus obey modal-disabled state. Layout reveals the selected tab after window resize.
- Accessibility child order follows the displayed order after a reorder; AppKit receives a layout-change notification when tabs are added, moved or closed. A windowless check compiles the production Swift source and exercises these native controls directly, without booting Flutter or reading saved account/layout data.
-- Native Swarm menu includes new/close/rename, previous/next, Add agent, close agent view, Settings.
+- Native Swarm menu includes new/close/rename, previous/next, Add agent and close agent view. Settings activates the former disabled Preferences placeholder in the application menu, giving Cmd+, one native owner. It follows the same modal-disabled state as the titlebar controls.
- Real tabs alongside traffic lights were visually verified. Native selection, new tabs, modal-disabled controls, and independently accessible select/close buttons were checked. Drag/reorder, overflow, and a wider keyboard/accessibility audit remain.
### CLI project metadata