惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
Martin Fowler
Martin Fowler
N
Netflix TechBlog - Medium
WordPress大学
WordPress大学
罗磊的独立博客
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
Docker
云风的 BLOG
云风的 BLOG
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
J
Java Code Geeks
博客园 - 聂微东
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
美团技术团队
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(mac): polish settings window chrome · openclaw/opencl...
steipete · 2026-05-17 · via Recent Commits to openclaw:main

@@ -49,6 +49,7 @@ struct SettingsRootView: View {

4949

.frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight, alignment: .topLeading)

5050

.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)

5151

.background(SettingsWindowChromeConfigurator())

52+

.toolbar(removing: .sidebarToggle)

5253

.onReceive(NotificationCenter.default.publisher(for: .openclawSelectSettingsTab)) { note in

5354

if let tab = note.object as? SettingsTab {

5455

withAnimation(.spring(response: 0.32, dampingFraction: 0.85)) {

@@ -279,22 +280,72 @@ enum SettingsTab: CaseIterable, Identifiable, Hashable {

279280

}

280281281282

private struct SettingsWindowChromeConfigurator: NSViewRepresentable {

283+

func makeCoordinator() -> Coordinator {

284+

Coordinator()

285+

}

286+282287

func makeNSView(context: Context) -> NSView {

283288

let view = NSView(frame: .zero)

284-

self.configureWindow(for: view)

289+

self.configureWindow(for: view, coordinator: context.coordinator)

285290

return view

286291

}

287292288293

func updateNSView(_ nsView: NSView, context: Context) {

289-

self.configureWindow(for: nsView)

294+

self.configureWindow(for: nsView, coordinator: context.coordinator)

290295

}

291296292-

private func configureWindow(for view: NSView) {

297+

private func configureWindow(for view: NSView, coordinator: Coordinator) {

293298

DispatchQueue.main.async {

294299

guard let window = view.window else { return }

295300

window.styleMask.remove(.fullSizeContentView)

296301

window.titleVisibility = .visible

297302

window.titlebarAppearsTransparent = true

303+

window.toolbarStyle = .unifiedCompact

304+

coordinator.installToolbar(on: window)

305+

}

306+

}

307+308+

@MainActor

309+

final class Coordinator: NSObject, NSToolbarDelegate {

310+

private static let toolbarIdentifier = NSToolbar.Identifier("OpenClawSettingsToolbar")

311+

private let items: [NSToolbarItem.Identifier] = [

312+

.toggleSidebar,

313+

.flexibleSpace,

314+

]

315+316+

func installToolbar(on window: NSWindow) {

317+

if window.toolbar?.identifier == Self.toolbarIdentifier {

318+

return

319+

}

320+321+

let toolbar = NSToolbar(identifier: Self.toolbarIdentifier)

322+

toolbar.delegate = self

323+

toolbar.displayMode = .iconOnly

324+

window.toolbar = toolbar

325+

}

326+327+

func toolbarAllowedItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {

328+

self.items

329+

}

330+331+

func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] {

332+

self.items

333+

}

334+335+

func toolbar(

336+

_ toolbar: NSToolbar,

337+

itemForItemIdentifier itemIdentifier: NSToolbarItem.Identifier,

338+

willBeInsertedIntoToolbar flag: Bool) -> NSToolbarItem?

339+

{

340+

guard itemIdentifier == .toggleSidebar else { return nil }

341+

let item = NSToolbarItem(itemIdentifier: .toggleSidebar)

342+

item.label = "Toggle Sidebar"

343+

item.paletteLabel = "Toggle Sidebar"

344+

item.toolTip = "Toggle Sidebar"

345+

item.image = NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: "Toggle Sidebar")

346+

item.action = #selector(NSSplitViewController.toggleSidebar(_:))

347+

item.target = nil

348+

return item

298349

}

299350

}

300351

}