Skip to content

Commit d8127de

Browse files
committed
fix: resolve/install the bundled CLI as programa, not cmux (Phase 6f functional)
The CLI product is PRODUCT_NAME=programa and is bundled at Contents/Resources/bin/programa, but the app still looked for bin/cmux and installed /usr/local/bin/cmux — a pre-existing mismatch (main is mid-rebrand) that left the 'Install CLI' + CLI resolution broken. Point them at bin/programa and /usr/local/bin/programa. Also fix the remaining 'programa welcome' terminal command send, the menu-bar title/tooltip, and brand fallbacks (window title, app name for notifications) cmux → Programa. Socket contract already agrees (shared last-socket-path hint). Builds green.
1 parent 56d67ff commit d8127de

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

Sources/AppDelegate.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ struct ProgramaCLIPathInstaller {
13461346
case .destinationIsDirectory(let path):
13471347
return "\(path) is a directory. Remove or rename it and try again."
13481348
case .installVerificationFailed(let path):
1349-
return "Installed symlink at \(path) did not point to the bundled cmux CLI."
1349+
return "Installed symlink at \(path) did not point to the bundled programa CLI."
13501350
case .uninstallVerificationFailed(let path):
13511351
return "Failed to remove \(path)."
13521352
case .privilegedCommandFailed(let message):
@@ -1367,7 +1367,7 @@ struct ProgramaCLIPathInstaller {
13671367

13681368
init(
13691369
fileManager: FileManager = .default,
1370-
destinationURL: URL = URL(fileURLWithPath: "/usr/local/bin/cmux"),
1370+
destinationURL: URL = URL(fileURLWithPath: "/usr/local/bin/programa"),
13711371
bundledCLIURLProvider: @escaping () -> URL? = {
13721372
ProgramaCLIPathInstaller.defaultBundledCLIURL()
13731373
},
@@ -1543,12 +1543,12 @@ struct ProgramaCLIPathInstaller {
15431543
}
15441544

15451545
private static func defaultBundledCLIURL(bundle: Bundle = .main) -> URL? {
1546-
bundle.resourceURL?.appendingPathComponent("bin/cmux", isDirectory: false)
1546+
bundle.resourceURL?.appendingPathComponent("bin/programa", isDirectory: false)
15471547
}
15481548

15491549
private static func defaultBundledCLIExpectedPath(bundle: Bundle = .main) -> String {
15501550
bundle.bundleURL
1551-
.appendingPathComponent("Contents/Resources/bin/cmux", isDirectory: false)
1551+
.appendingPathComponent("Contents/Resources/bin/programa", isDirectory: false)
15521552
.path
15531553
}
15541554

@@ -7336,7 +7336,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
73367336
}
73377337

73387338
func sendWelcomeCommandWhenReady(to workspace: Workspace, markShownOnSend: Bool = false) {
7339-
sendTextWhenReady("cmux welcome\n", to: workspace) {
7339+
sendTextWhenReady("programa welcome\n", to: workspace) {
73407340
if markShownOnSend {
73417341
UserDefaults.standard.set(true, forKey: WelcomeSettings.shownKey)
73427342
}
@@ -12864,7 +12864,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
1286412864
private func observeDuplicateLaunches() {
1286512865
guard let bundleId = Bundle.main.bundleIdentifier else { return }
1286612866
let embeddedCLIURL = Bundle.main.bundleURL
12867-
.appendingPathComponent("Contents/Resources/bin/cmux", isDirectory: false)
12867+
.appendingPathComponent("Contents/Resources/bin/programa", isDirectory: false)
1286812868
.standardizedFileURL
1286912869
.resolvingSymlinksInPath()
1287012870
let currentPid = ProcessInfo.processInfo.processIdentifier
@@ -13491,7 +13491,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCent
1349113491
@MainActor
1349213492
final class MenuBarExtraController: NSObject, NSMenuDelegate {
1349313493
private let statusItem: NSStatusItem
13494-
private let menu = NSMenu(title: "cmux")
13494+
private let menu = NSMenu(title: "Programa")
1349513495
private let notificationStore: TerminalNotificationStore
1349613496
private let onShowNotifications: () -> Void
1349713497
private let onOpenNotification: (TerminalNotification) -> Void
@@ -13543,7 +13543,7 @@ final class MenuBarExtraController: NSObject, NSMenuDelegate {
1354313543
button.imagePosition = .imageOnly
1354413544
button.imageScaling = .scaleProportionallyDown
1354513545
button.image = MenuBarIconRenderer.makeImage(unreadCount: 0)
13546-
button.toolTip = "cmux"
13546+
button.toolTip = "Programa"
1354713547
}
1354813548

1354913549
notificationsCancellable = notificationStore.$notifications
@@ -13647,7 +13647,7 @@ final class MenuBarExtraController: NSObject, NSMenuDelegate {
1364713647
if let button = statusItem.button {
1364813648
button.image = MenuBarIconRenderer.makeImage(unreadCount: displayedUnreadCount)
1364913649
button.toolTip = displayedUnreadCount == 0
13650-
? "cmux"
13650+
? "Programa"
1365113651
: displayedUnreadCount == 1
1365213652
? "Programa: " + String(localized: "statusMenu.tooltip.unread.one", defaultValue: "1 unread notification")
1365313653
: "Programa: " + String(localized: "statusMenu.tooltip.unread.other", defaultValue: "\(displayedUnreadCount) unread notifications")

Sources/GhosttyTerminalView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4099,7 +4099,7 @@ final class TerminalSurface: Identifiable, ObservableObject {
40994099
setManagedEnvironmentValue("PROGRAMA_SOCKET_PATH", socketPath)
41004100
// Backward-compatible alias expected by older scripts and third-party integrations.
41014101
setManagedEnvironmentValue("PROGRAMA_SOCKET", socketPath)
4102-
if let bundledCLIURL = Bundle.main.resourceURL?.appendingPathComponent("bin/cmux"),
4102+
if let bundledCLIURL = Bundle.main.resourceURL?.appendingPathComponent("bin/programa"),
41034103
FileManager.default.isExecutableFile(atPath: bundledCLIURL.path) {
41044104
setManagedEnvironmentValue("PROGRAMA_BUNDLED_CLI_PATH", bundledCLIURL.path)
41054105
}

Sources/TabManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,13 +3642,13 @@ class TabManager: ObservableObject {
36423642
}
36433643

36443644
private func windowTitle(for tab: Workspace?) -> String {
3645-
guard let tab else { return "cmux" }
3645+
guard let tab else { return "Programa" }
36463646
let trimmedTitle = tab.title.trimmingCharacters(in: .whitespacesAndNewlines)
36473647
if !trimmedTitle.isEmpty {
36483648
return trimmedTitle
36493649
}
36503650
let trimmedDirectory = tab.currentDirectory.trimmingCharacters(in: .whitespacesAndNewlines)
3651-
return trimmedDirectory.isEmpty ? "cmux" : trimmedDirectory
3651+
return trimmedDirectory.isEmpty ? "Programa" : trimmedDirectory
36523652
}
36533653

36543654
func focusTab(_ tabId: UUID, surfaceId: UUID? = nil, suppressFlash: Bool = false) {

Sources/TerminalNotificationStore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ final class TerminalNotificationStore: ObservableObject {
11231123
private func resolvedNotificationTitle(for notification: TerminalNotification) -> String {
11241124
let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String
11251125
?? Bundle.main.object(forInfoDictionaryKey: "CFBundleName") as? String
1126-
?? "cmux"
1126+
?? "Programa"
11271127
return notification.title.isEmpty ? appName : notification.title
11281128
}
11291129

0 commit comments

Comments
 (0)