improve(ui): drop the redundant desktop top bar and add back/forward navigation to the macOS app#102808
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4755df1729
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| private resetShellEpochState() { | ||
| this.navDrawerOpen = false; | ||
| this.navDrawerTrigger = null; | ||
| this.lastWorkspaceLocation = null; |
There was a problem hiding this comment.
Update stale agentLabel lifecycle test
With the agentLabel state removed from the shell reset path, ui/src/app/app-host.test.ts still sets shell.agentLabel = "Old agent", calls disconnectedCallback(), and expects it to be reset to "". Because this method no longer clears that own property, that unit test fails whenever the app-host tests run for this changed file; update the test alongside the state removal.
Useful? React with 👍 / 👎.
|
Codex review: stale review; fresh review needed. Summary Next step |
bca0035 to
4fba889
Compare
The Control UI top bar only rendered the OpenClaw › agent › page breadcrumb on desktop, duplicating the sidebar. Desktop now renders no topbar row; the row returns solely as the chat split toolbar's backdrop. Narrow viewports keep the header (drawer toggle, brand, command-palette search) and now show the brand across the whole drawer range. Routing already uses pushState, so browser back/forward traverses navigation.
Native titlebar buttons next to the traffic lights drive WKWebView history, which carries the Control UI's pushState navigation; enabled state tracks canGoBack/canGoForward via KVO and trackpad swipe gestures are enabled too. Back/forward traversals to entries from a replaced gateway endpoint cancel silently instead of opening a dead URL in the system browser.
With the desktop topbar row removed, the 28px mid-window drag region sat on top of the content column (chat thread has no top padding) and swallowed clicks as window drags. Shrink it to a 12px edge strip; the sidebar region over the reserved native-chrome padding stays the primary drag surface.
4fba889 to
49c7cb3
Compare
|
Merged via squash.
|
…navigation to the macOS app (openclaw#102808) * feat(ui): drop the desktop top bar in favor of sidebar navigation The Control UI top bar only rendered the OpenClaw › agent › page breadcrumb on desktop, duplicating the sidebar. Desktop now renders no topbar row; the row returns solely as the chat split toolbar's backdrop. Narrow viewports keep the header (drawer toggle, brand, command-palette search) and now show the brand across the whole drawer range. Routing already uses pushState, so browser back/forward traverses navigation. * feat(macos): add back/forward controls to the dashboard window Native titlebar buttons next to the traffic lights drive WKWebView history, which carries the Control UI's pushState navigation; enabled state tracks canGoBack/canGoForward via KVO and trackpad swipe gestures are enabled too. Back/forward traversals to entries from a replaced gateway endpoint cancel silently instead of opening a dead URL in the system browser. * fix(macos): keep the dashboard drag strip off the web content column With the desktop topbar row removed, the 28px mid-window drag region sat on top of the content column (chat thread has no top padding) and swallowed clicks as window drags. Shrink it to a 12px edge strip; the sidebar region over the reserved native-chrome padding stays the primary drag surface.
Closes #102806
What Problem This Solves
The Control UI's desktop top bar renders only the
OpenClaw › agent › pagebreadcrumb — every destination it offers is already covered by the sidebar, and every page renders its own title header, so the bar spends a 44px row duplicating navigation chrome. The macOS app additionally hosts the Control UI in a WKWebView with no browser chrome: although routing uses pushState, there were no back/forward buttons and no swipe gestures, so in-app history was unreachable; the breadcrumb's single link also sat mostly under the native window-drag region there.Why This Change Was Made
Desktop now renders no topbar row; the sidebar owns navigation. The row returns in exactly one case: desktop chat split view, where the fixed split toolbar needs its reserved row and backdrop. Narrow viewports keep the header (drawer toggle, brand, command-palette search) and now show the brand across the whole drawer range instead of the breadcrumb. The
dashboard-headercomponent, its agent-label plumbing in the shell, and stale topbar CSS are deleted (net −260 lines). The macOS dashboard window gains native back/forward titlebar buttons next to the traffic lights (enabled state trackscanGoBack/canGoForwardvia KVO), back/forward swipe gestures, and a guard that silently cancels history traversals to entries from a replaced gateway endpoint instead of opening a dead URL in the system browser.User Impact
Desktop web and Mac app users get a full-height sidebar and more vertical space for content, with one navigation model instead of two. Mac app users can navigate back/forward through Control UI history with titlebar buttons or trackpad swipes; browser users keep using regular browser back/forward.
Evidence
pnpm check:changedgreen on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/29016607007sidebar-customization.e2e,chat-flow.e2e,chat-responsive.browser), including new assertions: desktop renders no topbar, the row returns as the chat split toolbar backdrop, and the narrow header centers the brand.swift buildplus all 10DashboardWindowSmokeTestspass, including a new test that the titlebar hosts Back/Forward controls (disabled on a fresh webview) and that swipe gestures are enabled.