From 545f52d7d52b2d4b118fdb292b85be0c920dd31a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 5 Jan 2026 06:36:34 +0100 Subject: [PATCH] fix: hide settings toolbar row --- CHANGELOG.md | 1 + .../Sources/Clawdbot/SettingsRootView.swift | 3 +++ .../Clawdbot/SettingsWindowChrome.swift | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 apps/macos/Sources/Clawdbot/SettingsWindowChrome.swift diff --git a/CHANGELOG.md b/CHANGELOG.md index d881f298d..bef0f58e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - TUI: migrate key handling to the updated pi-tui Key matcher API. - macOS: local gateway now connects via tailnet IP when bind mode is `tailnet`/`auto`. - macOS: Settings now use a sidebar layout to avoid toolbar overflow in Connections. +- macOS: Settings window hides the preferences toolbar row to keep a clean sidebar layout. - macOS: drop deprecated `afterMs` from agent wait params to match gateway schema. - Auth: add OpenAI Codex OAuth support and migrate legacy oauth.json into auth.json. - Sandbox: copy inbound media into sandbox workspaces so agent tools can read attachments. diff --git a/apps/macos/Sources/Clawdbot/SettingsRootView.swift b/apps/macos/Sources/Clawdbot/SettingsRootView.swift index 291db410f..d6c12cd90 100644 --- a/apps/macos/Sources/Clawdbot/SettingsRootView.swift +++ b/apps/macos/Sources/Clawdbot/SettingsRootView.swift @@ -28,6 +28,7 @@ struct SettingsRootView: View { } } .listStyle(.sidebar) + .toolbar(removing: .sidebarToggle) .frame(minWidth: 200, idealWidth: 220, maxWidth: 260) } detail: { VStack(alignment: .leading, spacing: 12) { @@ -41,6 +42,8 @@ struct SettingsRootView: View { .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) } .navigationSplitViewStyle(.balanced) + .navigationTitle("Settings") + .background(SettingsWindowChrome(title: "Clawdbot Settings")) .frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight, alignment: .topLeading) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) .onReceive(NotificationCenter.default.publisher(for: .clawdbotSelectSettingsTab)) { note in diff --git a/apps/macos/Sources/Clawdbot/SettingsWindowChrome.swift b/apps/macos/Sources/Clawdbot/SettingsWindowChrome.swift new file mode 100644 index 000000000..885410a54 --- /dev/null +++ b/apps/macos/Sources/Clawdbot/SettingsWindowChrome.swift @@ -0,0 +1,20 @@ +import AppKit +import SwiftUI + +struct SettingsWindowChrome: NSViewRepresentable { + let title: String + + func makeNSView(context: Context) -> NSView { + NSView() + } + + func updateNSView(_ nsView: NSView, context: Context) { + DispatchQueue.main.async { + guard let window = nsView.window else { return } + window.title = title + window.titleVisibility = .visible + window.toolbar?.isVisible = false + window.toolbarStyle = .unified + } + } +}