fix(macos): merge the WebChat window title band into the toolbar row#109318
Conversation
The standalone chat window stacked a visible title bar (traffic lights + "OpenClaw" title) above the SwiftUI toolbar row, wasting a full band of vertical space. Apply the Dashboard window's merged chrome: hidden title, transparent titlebar, no separator, movable-by-background — the unified toolbar (sidebar toggle, search, pickers, session actions) now shares its row with the traffic lights. A window subclass pins titleVisibility to hidden because SwiftUI's toolbar bridge can restore visible title chrome, and scene bridging is reset to toolbars-only after controller attachment (attaching an NSHostingController resets it to .all).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 570c1a234b
ℹ️ 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".
| (contentViewController as? NSHostingController<OpenClawChatWindowShell>)? | ||
| .sceneBridgingOptions = [.toolbars] |
There was a problem hiding this comment.
Restore title bridging for WebChat metadata
In the full chat window, OpenClawChatWindowShell is still the only place that renders the active session title and model/cost subtitle (apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatWindowShell.swift:34-35), and title scene bridging is what lets those navigationTitle/navigationSubtitle values reach the AppKit window. Resetting the attached host to only .toolbars keeps the buttons but drops the existing title/subtitle bridge, so users who open the standalone WebChat window—especially with the sidebar hidden or after switching sessions/models—lose the current-session metadata that was present before. Please keep .title bridged while pinning only the unwanted native chrome, or render an explicit toolbar title/subtitle item.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
…penclaw#109318) The standalone chat window stacked a visible title bar (traffic lights + "OpenClaw" title) above the SwiftUI toolbar row, wasting a full band of vertical space. Apply the Dashboard window's merged chrome: hidden title, transparent titlebar, no separator, movable-by-background — the unified toolbar (sidebar toggle, search, pickers, session actions) now shares its row with the traffic lights. A window subclass pins titleVisibility to hidden because SwiftUI's toolbar bridge can restore visible title chrome, and scene bridging is reset to toolbars-only after controller attachment (attaching an NSHostingController resets it to .all).
What Problem This Solves
The standalone WebChat window stacks a full native title band (traffic lights + "OpenClaw" title) above the SwiftUI toolbar row (sidebar toggle, search, session title, pickers), wasting a band of vertical space. User-reported with screenshot.
Why This Change Was Made
Apply the merged-chrome pattern the Dashboard window already ships (#105902): hidden title, transparent titlebar, no separator, movable-by-background — one header row with the traffic lights inline.
User Impact
The chat window's toolbar controls and traffic lights share a single row; the empty title band is gone. Close/miniaturize/resize/fullscreen and frame restoration unchanged. The quick-chat panel (borderless) is untouched.
Two subtle traps are handled and regression-tested:
titleVisibility = .hidden.NSHostingControllerresetssceneBridgingOptionsto.all→ re-set to[.toolbars]after attachment so the title never bridges back (toolbar controls investigated and kept: sidebar toggle, search, title/subtitle, context usage, Thinking/Model pickers, session actions, New Session).Evidence
swift build+swift test --filter WebChatSwiftUISmokeTests(3/3: hidden-title pinning, bridging options, style mask) +scripts/format-swift.sh+scripts/lint-swift.sh(zero violations).