fix(mac): clarify attach-only gateway errors

This commit is contained in:
Peter Steinberger
2025-12-13 18:09:12 +00:00
parent 0c8b5ed59a
commit 94ad808028
2 changed files with 7 additions and 1 deletions

View File

@@ -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."