From 94ad808028d3c048cc3a3ffaac2f61714cf45480 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 13 Dec 2025 18:09:12 +0000 Subject: [PATCH] fix(mac): clarify attach-only gateway errors --- apps/macos/Sources/Clawdis/ControlChannel.swift | 6 ++++++ apps/macos/Sources/Clawdis/GatewayProcessManager.swift | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/macos/Sources/Clawdis/ControlChannel.swift b/apps/macos/Sources/Clawdis/ControlChannel.swift index f363bbc0f..2a52cd873 100644 --- a/apps/macos/Sources/Clawdis/ControlChannel.swift +++ b/apps/macos/Sources/Clawdis/ControlChannel.swift @@ -174,6 +174,12 @@ final class ControlChannel: ObservableObject { case .cancelled: return "Gateway connection was closed; start the gateway (localhost:\(port)) and retry." case .cannotFindHost, .cannotConnectToHost: + if AppStateStore.attachExistingGatewayOnly { + return """ + Cannot reach gateway at localhost:\(port) and “Attach existing gateway only” is enabled. + Disable it in Debug Settings or start a gateway on that port. + """ + } return "Cannot reach gateway at localhost:\(port); ensure the gateway is running." case .networkConnectionLost: return "Gateway connection dropped; gateway likely restarted—retry." diff --git a/apps/macos/Sources/Clawdis/GatewayProcessManager.swift b/apps/macos/Sources/Clawdis/GatewayProcessManager.swift index 040140fd1..07d14f5e3 100644 --- a/apps/macos/Sources/Clawdis/GatewayProcessManager.swift +++ b/apps/macos/Sources/Clawdis/GatewayProcessManager.swift @@ -115,7 +115,7 @@ final class GatewayProcessManager: ObservableObject { // Respect debug toggle: only attach, never spawn, when enabled. if AppStateStore.attachExistingGatewayOnly { await MainActor.run { - self.status = .stopped + self.status = .failed("Attach-only enabled; no gateway to attach") self.appendLog("[gateway] attach-only enabled; not spawning local gateway\n") } return