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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队

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: use native mac settings sidebar · openclaw/openclaw@...
steipete · 2026-05-23 · via Recent Commits to openclaw:main

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

88

@State private var monitoringPermissions = false

99

@State private var selectedTab: SettingsTab = .general

1010

@State private var cachedTabs: Set<SettingsTab>

11+

@State private var columnVisibility: NavigationSplitViewVisibility = .all

1112

@State private var snapshotPaths: (configPath: String?, stateDir: String?) = (nil, nil)

1213

let updater: UpdaterProviding?

1314

private let isPreview = ProcessInfo.processInfo.isPreview

@@ -22,17 +23,25 @@ struct SettingsRootView: View {

2223

}

23242425

var body: some View {

25-

HStack(spacing: 0) {

26-

SettingsSidebar(

27-

groups: self.visibleGroups,

28-

selectedTab: self.$selectedTab)

29-

.frame(width: SettingsLayout.sidebarWidth)

30-26+

NavigationSplitView(columnVisibility: self.animatedColumnVisibility) {

27+

List(selection: self.sidebarSelection) {

28+

ForEach(self.visibleGroups) { group in

29+

Section(group.title) {

30+

ForEach(group.tabs) { tab in

31+

Label(tab.title, systemImage: tab.systemImage)

32+

.tag(tab as SettingsTab?)

33+

}

34+

}

35+

}

36+

}

37+

.listStyle(.sidebar)

38+

.navigationSplitViewColumnWidth(SettingsLayout.sidebarWidth)

39+

} detail: {

3140

self.detailContainer

3241

}

42+

.navigationSplitViewStyle(.balanced)

3343

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

3444

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

35-

.background(SettingsWindowChromeConfigurator())

3645

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

3746

if let tab = note.object as? SettingsTab {

3847

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

@@ -75,6 +84,25 @@ struct SettingsRootView: View {

7584

SettingsTabGroup.defaultGroups(showDebug: self.state.debugPaneEnabled)

7685

}

778687+

private var sidebarSelection: Binding<SettingsTab?> {

88+

Binding(

89+

get: { self.selectedTab },

90+

set: { tab in

91+

guard let tab else { return }

92+

self.selectedTab = self.validTab(for: tab)

93+

})

94+

}

95+96+

private var animatedColumnVisibility: Binding<NavigationSplitViewVisibility> {

97+

Binding(

98+

get: { self.columnVisibility },

99+

set: { visibility in

100+

withAnimation(.easeInOut(duration: 0.22)) {

101+

self.columnVisibility = visibility

102+

}

103+

})

104+

}

105+78106

private var detailContainer: some View {

79107

VStack(alignment: .leading, spacing: 14) {

80108

if self.isNixMode {

@@ -201,77 +229,6 @@ struct SettingsRootView: View {

201229

}

202230

}

203231204-

private struct SettingsSidebar: View {

205-

let groups: [SettingsTabGroup]

206-

@Binding var selectedTab: SettingsTab

207-208-

var body: some View {

209-

ZStack(alignment: .topLeading) {

210-

VisualEffectView(material: .sidebar)

211-

.clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))

212-

.overlay {

213-

RoundedRectangle(cornerRadius: 16, style: .continuous)

214-

.strokeBorder(.white.opacity(0.09), lineWidth: 1)

215-

}

216-

.shadow(color: .black.opacity(0.16), radius: 18, x: 0, y: 12)

217-218-

ScrollView(.vertical) {

219-

VStack(alignment: .leading, spacing: 18) {

220-

ForEach(self.groups) { group in

221-

VStack(alignment: .leading, spacing: 6) {

222-

Text(group.title)

223-

.font(.caption.weight(.semibold))

224-

.foregroundStyle(.secondary)

225-

.padding(.horizontal, 8)

226-227-

ForEach(group.tabs) { tab in

228-

SettingsSidebarRow(

229-

tab: tab,

230-

selected: self.selectedTab == tab)

231-

{

232-

self.selectedTab = tab

233-

}

234-

}

235-

}

236-

.frame(maxWidth: .infinity, alignment: .leading)

237-

}

238-

}

239-

.frame(maxWidth: .infinity, alignment: .leading)

240-

.padding(.horizontal, 10)

241-

.padding(.vertical, 10)

242-

}

243-

}

244-

.padding(.leading, 12)

245-

.padding(.vertical, 10)

246-

}

247-

}

248-249-

private struct SettingsSidebarRow: View {

250-

let tab: SettingsTab

251-

let selected: Bool

252-

let select: () -> Void

253-254-

var body: some View {

255-

Label(self.tab.title, systemImage: self.tab.systemImage)

256-

.font(.body.weight(.medium))

257-

.labelStyle(.titleAndIcon)

258-

.frame(maxWidth: .infinity, alignment: .leading)

259-

.padding(.horizontal, 10)

260-

.padding(.vertical, 8)

261-

.frame(maxWidth: .infinity, alignment: .leading)

262-

.background {

263-

RoundedRectangle(cornerRadius: 10, style: .continuous)

264-

.fill(self.selected ? Color.white.opacity(0.13) : Color.clear)

265-

}

266-

.contentShape(RoundedRectangle(cornerRadius: 10, style: .continuous))

267-

.onTapGesture(perform: self.select)

268-

.accessibilityElement(children: .combine)

269-

.accessibilityLabel(self.tab.title)

270-

.accessibilityAddTraits(self.selected ? [.isButton, .isSelected] : .isButton)

271-

.accessibilityAction { self.select() }

272-

}

273-

}

274-275232

private struct SettingsTabGroup: Identifiable {

276233

let title: String

277234

let tabs: [SettingsTab]

@@ -344,28 +301,6 @@ enum SettingsTab: CaseIterable, Identifiable, Hashable {

344301

}

345302

}

346303347-

private struct SettingsWindowChromeConfigurator: NSViewRepresentable {

348-

func makeNSView(context: Context) -> NSView {

349-

let view = NSView(frame: .zero)

350-

self.configureWindow(for: view)

351-

return view

352-

}

353-354-

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

355-

self.configureWindow(for: nsView)

356-

}

357-358-

private func configureWindow(for view: NSView) {

359-

DispatchQueue.main.async {

360-

guard let window = view.window else { return }

361-

window.styleMask.remove(.fullSizeContentView)

362-

window.titleVisibility = .visible

363-

window.titlebarAppearsTransparent = true

364-

window.toolbarStyle = .unifiedCompact

365-

}

366-

}

367-

}

368-369304

@MainActor

370305

enum SettingsTabRouter {

371306

private static var pending: SettingsTab?