Skip to content

fix(macos): remove duplicate sidebar toggle buttons in the Mac app dashboard#104694

Merged
steipete merged 1 commit into
mainfrom
claude/macos-sidebar-button-dupe-17d502
Jul 11, 2026
Merged

fix(macos): remove duplicate sidebar toggle buttons in the Mac app dashboard#104694
steipete merged 1 commit into
mainfrom
claude/macos-sidebar-button-dupe-17d502

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the macOS app dashboard showed two sidebar toggle buttons in every navigation state: the native titlebar toggle (next to the traffic lights) plus the Control UI's own controls — the collapse button in the sidebar brand row, the floating expand button while collapsed, and the drawer hamburger at narrow widths. The floating expand button also popped visible after using the titlebar toggle because collapse focus restoration force-revealed the "retired" control through its focus-visible escape hatch.

Why This Change Was Made

The Mac app already stamps openclaw-native-nav on the document root to advertise its titlebar toggle (DashboardWindowController.installNativeChromeScript), but the Control UI only soft-hid the floating expand button (opacity 0, focusable), and never hid the brand-row collapse button or the narrow-width hamburger. In the Mac app the titlebar button should be the only sidebar toggle; plain browsers and older app builds (which only stamp openclaw-native-macos) keep the web controls.

User Impact

  • macOS app: exactly one sidebar toggle (the native titlebar button) in expanded, collapsed, and narrow drawer layouts; Cmd+B still works.
  • Keyboard/screen-reader users in the app: collapsing or closing the drawer anchors focus on the content column instead of stranding it on the body, on a hidden control, or inside the offscreen drawer (shared restoreFocusTo fallback, also used by the resize-dismiss path).
  • Web and older Mac apps: unchanged; the in-page toggles stay visible and keep the existing focus behavior.

Evidence

  • New Playwright e2e ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts (4 tests) covers plain-browser vs native-nav at desktop and narrow widths, including drawer toggling through the openclaw:native-toggle-sidebar event and focus anchoring after collapse/close.
  • Remote proof (Testbox through Crabbox): focused e2e green on tbx_01kx9csvwet4p9h7jbgpjfwnrt; final combined pnpm check:changed + focused e2e run green on tbx_01kx9dw3pfcx8nz14wnjq66815 (exit 0, patch-identical content pre-rebase).
  • Codex autoreview (gpt-5.6-sol, xhigh) iterated to clean: "no accepted/actionable findings"; earlier rounds surfaced the narrow-width hamburger duplicate and the three focus-restoration regressions, all fixed here.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Jul 11, 2026
@steipete
steipete merged commit da25766 into main Jul 11, 2026
104 of 106 checks passed
@steipete
steipete deleted the claude/macos-sidebar-button-dupe-17d502 branch July 11, 2026 20:46
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant