From 75234da1350cbd4e6bf74b887ff01311ec6d7ae2 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 7 Dec 2025 14:41:45 +0000 Subject: [PATCH] Debug: surface detailed voice send errors --- apps/macos/Sources/Clawdis/DebugSettings.swift | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/macos/Sources/Clawdis/DebugSettings.swift b/apps/macos/Sources/Clawdis/DebugSettings.swift index a7f354987..9c35f76c4 100644 --- a/apps/macos/Sources/Clawdis/DebugSettings.swift +++ b/apps/macos/Sources/Clawdis/DebugSettings.swift @@ -260,8 +260,9 @@ struct DebugSettings: View { self.debugSendStatus = "Forwarded via \(trimmedTarget). Await reply." self.debugSendError = nil case let .failure(error): - self.debugSendStatus = "Target: \(config.target)" + (config.identityPath.isEmpty ? "" : " ยท identity: \(config.identityPath)") - self.debugSendError = error.localizedDescription + let detail = error.localizedDescription.trimmingCharacters(in: .whitespacesAndNewlines) + self.debugSendStatus = "Forward failed: \(detail)" + self.debugSendError = nil } } return @@ -286,15 +287,20 @@ struct DebugSettings: View { self.debugSendStatus = "Sent locally via voice wake path." self.debugSendError = nil } else { - self.debugSendStatus = "Local voice wake send failed" - self.debugSendError = rpcResult.error ?? "Unknown error" + let reason = rpcResult.error?.trimmingCharacters(in: .whitespacesAndNewlines) + let detail = (reason?.isEmpty == false) + ? reason! + : "No error returned. Check /tmp/clawdis.log or rpc output." + self.debugSendStatus = "Local send failed: \(detail)" + self.debugSendError = nil } } } catch { await MainActor.run { self.debugSendInFlight = false - self.debugSendStatus = "Local voice wake send failed" - self.debugSendError = error.localizedDescription + let detail = error.localizedDescription.trimmingCharacters(in: .whitespacesAndNewlines) + self.debugSendStatus = "Local send failed: \(detail)" + self.debugSendError = nil } } }