Skip to content

Commit 201acd4

Browse files
authored
fix(macos): keep Settings below native titlebar controls (#102663)
* fix(macos): clear settings titlebar controls * chore: leave release notes to release automation
1 parent e635cdb commit 201acd4

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

apps/macos/Sources/OpenClaw/DashboardWindowController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ final class DashboardWindowController: NSWindowController, WKNavigationDelegate,
206206
--openclaw-native-titlebar-height: 50px;
207207
}
208208
@media (min-width: 700px) {
209-
html.openclaw-native-macos .sidebar-shell {
209+
/* Both desktop navigation surfaces must clear AppKit's window controls
210+
and drag regions or their first interactive row becomes unreachable. */
211+
html.openclaw-native-macos .sidebar-shell,
212+
html.openclaw-native-macos .settings-sidebar__header {
210213
padding-top: max(14px, var(--openclaw-native-titlebar-height)) !important;
211214
}
212215
}

apps/macos/Tests/OpenClawIPCTests/DashboardWindowSmokeTests.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ struct DashboardWindowSmokeTests {
4343
#expect(dashboardLogString(for: url) == "http://127.0.0.1:18789/control/")
4444
}
4545

46+
@Test func `dashboard native chrome clears both desktop sidebars`() throws {
47+
let url = try #require(URL(string: "http://127.0.0.1:18789/control/"))
48+
let controller = DashboardWindowController(
49+
url: url,
50+
auth: DashboardWindowAuth(gatewayUrl: nil, token: nil, password: nil))
51+
let chromeScript = try #require(controller._testUserScripts.first {
52+
$0.source.contains("openclaw-native-macos-chrome")
53+
})
54+
55+
#expect(chromeScript.source.contains(".sidebar-shell"))
56+
#expect(chromeScript.source.contains(".settings-sidebar__header"))
57+
#expect(chromeScript.source.contains("--openclaw-native-titlebar-height"))
58+
}
59+
4660
@Test func `dashboard failure state opens in dashboard window`() throws {
4761
let url = try #require(URL(string: "http://127.0.0.1:18789/control/"))
4862
let controller = DashboardWindowController(

0 commit comments

Comments
 (0)