From 1019872832b345d427d5b872937f2fb747c9ec3a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 7 Dec 2025 23:22:54 +0100 Subject: [PATCH] ui: move health/cli info to Debug; add single health row in General --- .../macos/Sources/Clawdis/DebugSettings.swift | 13 +++++++++++ .../Sources/Clawdis/GeneralSettings.swift | 22 +++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/apps/macos/Sources/Clawdis/DebugSettings.swift b/apps/macos/Sources/Clawdis/DebugSettings.swift index 90a4ae50c..50c44278e 100644 --- a/apps/macos/Sources/Clawdis/DebugSettings.swift +++ b/apps/macos/Sources/Clawdis/DebugSettings.swift @@ -9,6 +9,7 @@ struct DebugSettings: View { @State private var modelsLoading = false @State private var modelsError: String? @ObservedObject private var relayManager = RelayProcessManager.shared + @ObservedObject private var healthStore = HealthStore.shared @State private var relayRootInput: String = RelayProcessManager.shared.projectRootPath() @State private var sessionStorePath: String = SessionLoader.defaultStorePath @State private var sessionStoreSaveError: String? @@ -19,6 +20,18 @@ struct DebugSettings: View { var body: some View { ScrollView(.vertical) { VStack(alignment: .leading, spacing: 10) { + LabeledContent("Health") { + HStack(spacing: 8) { + Circle().fill(self.healthStore.state.tint).frame(width: 10, height: 10) + Text(self.healthStore.summaryLine) + } + } + LabeledContent("CLI helper") { + let loc = CLIInstaller.installedLocation() + Text(loc ?? "missing") + .font(.caption.monospaced()) + .foregroundStyle(loc == nil ? Color.red : Color.secondary) + } LabeledContent("PID") { Text("\(ProcessInfo.processInfo.processIdentifier)") } LabeledContent("Log file") { Button("Open pino log") { self.openLog() } diff --git a/apps/macos/Sources/Clawdis/GeneralSettings.swift b/apps/macos/Sources/Clawdis/GeneralSettings.swift index 24d1eb56e..d6f982293 100644 --- a/apps/macos/Sources/Clawdis/GeneralSettings.swift +++ b/apps/macos/Sources/Clawdis/GeneralSettings.swift @@ -61,17 +61,7 @@ var body: some View { } } - VStack(alignment: .leading, spacing: 8) { - Text("Health") - .font(.callout.weight(.semibold)) - self.healthCard - } - - VStack(alignment: .leading, spacing: 6) { - Text("CLI helper") - .font(.callout.weight(.semibold)) - self.cliInstaller - } + self.healthRow Spacer(minLength: 12) HStack { @@ -317,6 +307,16 @@ private enum RemoteStatus: Equatable { } extension GeneralSettings { + private var healthRow: some View { + HStack(spacing: 10) { + Circle() + .fill(self.healthStore.state.tint) + .frame(width: 10, height: 10) + Text(self.healthStore.summaryLine) + .font(.callout) + } + } + @MainActor fileprivate func testRemote() async { self.remoteStatus = .checking