Calls' app menu from RastrilloApple's PlainAppNameCommands; SUBundleName Calls
Human
Prompt
Replace Calls' local PlainNameCommands with `PlainAppNameCommands(name: "Calls")` (needs a RastrilloApple dependency for the Mac target — keep it minimal), keeping Quit-leaves-the-call. Add `SUBundleName` = "Calls" to Calls' own native/scripts/bundle-mac.py output, and CFBundleLocalizations only if Calls ships translations (it doesn't — skip). Settings window navigationTitle "Calls".
From this commit's own message. The prompt ledger has no entries for it — which is what a squashed, rebased or amended commit looks like, and what every commit looks like in a repo without a ledger.
Summary
CallsMac links RastrilloApple (macOS only, beside RastrilloMacUpdates) for PlainAppNameCommands alone, declared first in .commands as the shared docs require, so Check for Updates stays after About. The local PlainNameCommands is gone. Quit is NSApp.terminate, so applicationShouldTerminate still leaves a call first. The Settings window is titled "Calls" (navigationTitle), not SwiftUI's "Oficina Calls Settings". bundle-mac.py writes SUBundleName "Calls", so Sparkle's windows say Calls; no CFBundleLocalizations, since Calls ships no translations.
Agent notes
Checked on a debug build by injecting a menu-dump dylib: app menu About Calls, Check for Updates..., Automatically Check for Updates, Settings... (cmd-,), Services, Hide Calls (cmd-H), Hide Others (opt-cmd-H), Show All, Quit Calls (cmd-Q); Help: Calls Help (cmd-?); Settings window title "Calls". RastrilloNative_RastrilloApple.bundle is copied into Resources by the existing products/*.bundle loop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+24
−33
native/apple/Package.swift+6 −1native/apple/Sources/CallsMac/CallsMac.swift+10 −31native/scripts/bundle-mac.py+8 −1
diff --git a/native/apple/Package.swift b/native/apple/Package.swift| index a94a1c2..dda20be 100644 |
| --- a/native/apple/Package.swift |
| +++ b/native/apple/Package.swift |
| @@ -35,7 +35,12 @@ let package = Package( |
| .target(name: "DeepFilter", condition: .when(platforms: [.macOS])), |
| .product(name: "LiveKitWebRTC", package: "webrtc-xcframework"), |
| ]), |
| - .executableTarget(name: "CallsMac", dependencies: [.product(name: "RastrilloMacUpdates", package: "native", condition: .when(platforms: [.macOS])), "CallsKit"], resources: [.copy("Resources/AppIcon.png"), .copy("Resources/MacIcon.png")]), |
| + // RastrilloApple for PlainAppNameCommands (the app menu's plain name) only; |
| + // Calls' sign-in and session store are still its own (CallsKit). |
| + .executableTarget(name: "CallsMac", dependencies: [ |
| + .product(name: "RastrilloMacUpdates", package: "native", condition: .when(platforms: [.macOS])), |
| + .product(name: "RastrilloApple", package: "native", condition: .when(platforms: [.macOS])), |
| + "CallsKit"], resources: [.copy("Resources/AppIcon.png"), .copy("Resources/MacIcon.png")]), |
| .executableTarget(name: "CallsInterop", dependencies: ["CallsKit"]), |
| .testTarget(name: "CallsKitTests", dependencies: ["CallsKit", "CallsBroadcastKit"], resources: [.copy("Fixtures")]), |
| ] |
diff --git a/native/apple/Sources/CallsMac/CallsMac.swift b/native/apple/Sources/CallsMac/CallsMac.swift| index fa4a4a6..bb845e5 100644 |
| --- a/native/apple/Sources/CallsMac/CallsMac.swift |
| +++ b/native/apple/Sources/CallsMac/CallsMac.swift |
| @@ -1,4 +1,5 @@ |
| #if os(macOS) |
| +import RastrilloApple |
| import RastrilloMacUpdates |
| #endif |
| import AppKit |
| @@ -30,8 +31,13 @@ import LiveKitWebRTC |
| } |
| .defaultSize(width: 1000, height: 760) |
| .commands { |
| + // First, so that Check for Updates (after About) survives the groups it |
| + // replaces. About, Hide, Quit and Help say "Calls", not the display name |
| + // "Oficina Calls" SwiftUI would use. Quit is NSApp.terminate, so it still |
| + // reaches applicationShouldTerminate below and a call is left first. The |
| + // name is passed, not read from CFBundleName, so `swift run` says Calls too. |
| + PlainAppNameCommands(name: "Calls") |
| CommandGroup(replacing: .newItem) {} |
| - PlainNameCommands() |
| NativeUpdateCommands(updater: updater) |
| CommandMenu("Call") { CallMenuItems(model: model) } |
| } |
| @@ -41,6 +47,9 @@ import LiveKitWebRTC |
| automaticUpdates: updater.canInstallUpdatesAutomatically |
| ? Binding(get: { updater.automaticallyInstallsUpdates }, set: { updater.automaticallyInstallsUpdates = $0 }) |
| : nil) |
| + // SwiftUI titles a Settings window without tabs from the display |
| + // name ("Oficina Calls Settings"); inside the app it is plain Calls. |
| + .navigationTitle("Calls") |
| } |
| } |
| } |
| @@ -109,36 +118,6 @@ final class CallsAppDelegate: NSObject, NSApplicationDelegate { |
| } |
| } |
| -/// The application menu's own items, under the name the app has inside its |
| -/// windows. Finder, the Dock and Spotlight say "Oficina Calls" (the bundle's |
| -/// file name and CFBundleDisplayName), but SwiftUI builds About, Hide, Quit |
| -/// and Help from CFBundleDisplayName too, which would put "Quit Oficina |
| -/// Calls" in a menu headed by the plain name. These are the same actions |
| -/// AppKit's own items take, with the same shortcuts: Quit still goes |
| -/// through applicationShouldTerminate, so a call is left first. |
| -struct PlainNameCommands: Commands { |
| - static let name = "Calls" |
| - |
| - var body: some Commands { |
| - CommandGroup(replacing: .appInfo) { |
| - // The standard panel names the app by CFBundleName, which is "Calls". |
| - Button("About \(Self.name)") { NSApp.orderFrontStandardAboutPanel(nil) } |
| - } |
| - CommandGroup(replacing: .appVisibility) { |
| - Button("Hide \(Self.name)") { NSApp.hide(nil) }.keyboardShortcut("h") |
| - Button("Hide Others") { NSApp.hideOtherApplications(nil) } |
| - .keyboardShortcut("h", modifiers: [.command, .option]) |
| - Button("Show All") { NSApp.unhideAllApplications(nil) } |
| - } |
| - CommandGroup(replacing: .appTermination) { |
| - Button("Quit \(Self.name)") { NSApp.terminate(nil) }.keyboardShortcut("q") |
| - } |
| - CommandGroup(replacing: .help) { |
| - Button("\(Self.name) Help") { NSApp.showHelp(nil) }.keyboardShortcut("?") |
| - } |
| - } |
| -} |
| - |
| /// The Call menu. Mute is here so that its shortcut can be found, and so |
| /// that there is one when Space belongs to a text field or a button. Copy |
| /// Invite Link puts the meeting's link on the clipboard without the share |
diff --git a/native/scripts/bundle-mac.py b/native/scripts/bundle-mac.py| index 4fe135d..6475ff8 100644 |
| --- a/native/scripts/bundle-mac.py |
| +++ b/native/scripts/bundle-mac.py |
| @@ -26,7 +26,8 @@ products = Path(subprocess.check_output(['swift', 'build', '--package-path', str |
| # CFBundleDisplayName), apart from every other calls app. Inside its own |
| # windows the app is plain "Calls": CFBundleName is the short name the menu bar |
| # and the About panel use. (SwiftUI titles About, Hide, Quit and Help with the |
| -# display name, so CallsMac.swift's PlainNameCommands names them itself.) Same |
| +# display name, so CallsMac.swift declares RastrilloApple's |
| +# PlainAppNameCommands to name them itself.) Same |
| # rule as rastrillo/native tools/bundle-mac.py. |
| display_name = 'Oficina Calls' |
| bundle = root / f'build/{display_name}.app/Contents' |
| @@ -99,6 +100,12 @@ info = { |
| 'CFBundleURLTypes': [{'CFBundleURLName': updates['bundle_id'], |
| 'CFBundleURLSchemes': updates['url_schemes']}], |
| 'CFBundleName': 'Calls', 'CFBundleDisplayName': display_name, |
| + # Sparkle names the app from SUBundleName, then CFBundleDisplayName |
| + # (SUHost.m), so without this its windows would say "Oficina Calls is now |
| + # updated" in an app whose menu is Calls. Its installer still finds the |
| + # update by file name or bundle ID first (SUInstaller.m), so the plain name |
| + # changes no lookup. As rastrillo/native tools/bundle-mac.py writes it. |
| + 'SUBundleName': 'Calls', |
| # Paul, 2026-11-14: every Oficina build, Sparkle and App Store, Mac and |
| # iPhone, is works.oficina.<app>: here works.oficina.calls, read from |
| # mac-updates.json so the two cannot disagree (mac_updates.py refuses a |