From efc7181aa0633705b03952ab9a7646ddff5f637a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 14 Dec 2025 03:38:47 +0000 Subject: [PATCH] fix(macos): hide session store path in remote mode --- .../Sources/Clawdis/SessionsSettings.swift | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/macos/Sources/Clawdis/SessionsSettings.swift b/apps/macos/Sources/Clawdis/SessionsSettings.swift index 65ee5bdd1..671dd1690 100644 --- a/apps/macos/Sources/Clawdis/SessionsSettings.swift +++ b/apps/macos/Sources/Clawdis/SessionsSettings.swift @@ -4,6 +4,7 @@ import SwiftUI @MainActor struct SessionsSettings: View { private let isPreview: Bool + @ObservedObject private var state = AppStateStore.shared @State private var rows: [SessionRow] @State private var storePath: String = SessionLoader.defaultStorePath @State private var lastLoaded: Date? @@ -62,10 +63,12 @@ struct SessionsSettings: View { } } Spacer() - Text(self.storePath) - .font(.caption.monospaced()) - .foregroundStyle(.secondary) - .multilineTextAlignment(.trailing) + if self.state.connectionMode == .local { + Text(self.storePath) + .font(.caption.monospaced()) + .foregroundStyle(.secondary) + .multilineTextAlignment(.trailing) + } } HStack(spacing: 10) { @@ -79,13 +82,15 @@ struct SessionsSettings: View { .buttonStyle(.bordered) .help("Refresh session store") - Button { - self.revealStore() - } label: { - Label("Reveal", systemImage: "folder") - .labelStyle(.titleAndIcon) + if self.state.connectionMode == .local { + Button { + self.revealStore() + } label: { + Label("Reveal", systemImage: "folder") + .labelStyle(.titleAndIcon) + } + .disabled(!FileManager.default.fileExists(atPath: self.storePath)) } - .disabled(!FileManager.default.fileExists(atPath: self.storePath)) if self.loading { ProgressView().controlSize(.small)