Skip to content

[Feature]: Mac app titlebar buttons should follow sidebar state (search + new session when collapsed) #105129

Description

@steipete

Summary

Make the macOS dashboard window's titlebar buttons follow the web sidebar state: keep back/forward while the sidebar is expanded, and swap in search (command palette) + new session while it is collapsed.

Problem to solve

The Mac app titlebar always shows sidebar-toggle + back + forward next to the traffic lights. With the sidebar collapsed there is no quick way to search sessions (command palette) or start a new session without first reopening the sidebar; with the sidebar expanded, the back/forward arrows sit bunched against the toggle instead of at the sidebar edge where sibling macOS apps place them.

Proposed solution

Three titlebar buttons in each state, driven by a sidebar-state report from the Control UI:

  • Sidebar expanded: [toggle] left, [back][forward] right-aligned to the sidebar's right edge.
  • Sidebar collapsed (or mobile drawer layout): [toggle][search][+] clustered left; search opens the command palette, + starts a new session.
  • Older gateway web bundles that never report state keep today's fixed [toggle][back][forward] layout.

The web UI posts {collapsed, width} over a new openclawNav WKScriptMessage; the native buttons dispatch openclaw:native-open-search / openclaw:native-new-session events into the page, mirroring the existing openclaw:native-toggle-sidebar contract.

Alternatives considered

Rendering back/forward inside the web sidebar header: rejected because the native drag regions overlay that row and WKWebView owns the back/forward list (enabled-state via KVO is already native).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestimpact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions