feat(ui): host the macOS dashboard titlebar buttons in the web UI#105902
Merged
Conversation
steipete
force-pushed
the
claude/macos-web-ui-buttons-6dafc9
branch
from
July 13, 2026 03:21
060826f to
f91426d
Compare
Contributor
Author
|
Land-ready proof (landing over red CI on maintainer instruction —
Known gap: hosted CI |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 13, 2026
…enclaw#105902) * feat(ui): host the macOS dashboard titlebar buttons in the web UI * style(ui): oxfmt macos titlebar controls * fix(ui): bracket-access native web chrome globals for no-underscore-dangle * docs(macos): note intentional no-fallback contract for non-web-chrome pages * chore(ui): drop unused NativeHistoryStateEvent export * chore(i18n): resync native inventory line metadata * chore(i18n): translate nav.back/nav.forward across locales
This was referenced Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes #105898.
The Mac app dashboard hosted five native AppKit buttons (sidebar toggle, search, new session, back, forward) in a titlebar accessory floating over the Control UI WKWebView. Native and web chrome could never agree: hover/highlight styling didn't match the web buttons next to them, the accessory and its drag regions stacked over web overlays with no shared z-index, and the layout was mirrored across two codebases with magic offsets (
nav-statewidth bridge, 78/116/128pt accessory constants,padding-left: 90/204pxcompensation CSS) that kept needing follow-up fixes (#104380, #104572, #104694, #105175).Why This Change Was Made
Rendering the buttons in the web UI gives one owner for toolbar layout, highlight state, and stacking. The app keeps only what must stay native: traffic lights, thin top drag strips, and a small bridge.
window.__OPENCLAW_NATIVE_WEB_CHROME__ = trueat document start and stampsopenclaw-native-macos openclaw-native-web-chromeon<html>(no moreopenclaw-native-nav).openclaw-macos-titlebar-controlsweb component renders sidebar toggle + back/forward (plus search + new session when the nav is collapsed) in the 50px titlebar strip atleft: 78px, using the standardtopbar-icon-btntreatment and an explicit z-index slot.history.back()/forward()(same WKWebView session history); enable state flows from Swift KVO oncanGoBack/canGoForwardviaopenclaw:native-history-stateevents.DashboardNavAccessoryView, theopenclawNavnav-state message handler, the native sidebar drag region (the web toolbar and the sidebar/topbar inset now start native drags via the existingwindow-dragbridge).openclaw-native-navkeep working — the web retains that CSS path, theopenclaw:native-*event handlers, and thenav-statepost (a no-op against new apps). Older gateway bundles under a new app fall back to their own in-page toggles plus trackpad gestures and Cmd-[/] menu items.User Impact
Mac app users get toolbar buttons that match the web UI's look, hover/highlight, tooltips, and focus rings, sit correctly under overlays, and stop drifting out of alignment with the sidebar. Narrow windows regain the drawer hamburger (the web toolbar hides below 1101px). No behavior change for browsers or other platforms.
Evidence
node scripts/run-vitest.mjs ui/src/app/native-web-chrome.test.ts ui/src/app/app-host.test.ts: 19 passed).ui/src/e2e/native-nav-sidebar-toggle.e2e.test.tswith web-chrome scenarios: toolbar renders, toggle/search/new-session work, back/forward follow history-state events, hamburger survives narrow widths; legacyopenclaw-native-navscenarios unchanged.DashboardWindowSmokeTests): capability script injected at document start, no titlebar accessories remain.changed=falseafter sync.