feat(macos): menubar UI consistency overhaul — sections, hover, icons, toggles#23135
Closed
apethree wants to merge 4 commits intoopenclaw:mainfrom
Closed
feat(macos): menubar UI consistency overhaul — sections, hover, icons, toggles#23135apethree wants to merge 4 commits intoopenclaw:mainfrom
apethree wants to merge 4 commits intoopenclaw:mainfrom
Conversation
- Unified selection highlight: all custom rows now use soft grey (unemphasizedSelectedContentBackgroundColor) instead of blue - Toggle rows (OpenClaw header, Quick Settings) show no hover/selection background via showsHighlight = false on ClickableMenuItemHostView - Exec Approvals submenu items wrapped in HighlightedMenuItemHostView with MenuPickerRow (checkmark + grey hover, no blue) - Moved active header, Quick Settings toggles, Status section (Gateway + Connected Devices), Activity section, and section labels out of SwiftUI MenuContent into MenuSessionsInjector custom NSMenuItem.views so they align and highlight consistently - Native Actions/App section items wrapped via injectNativeItemViews() to receive the same grey hover and leading indent as injected rows - Context/Usage section headers gain icons and primary text colour - Added "Actions" and "App" section labels; Voice Wake moved above Exec Approvals in Quick Settings - Separator between Context and Usage sections removed - Cost usage submenu fixed (single NSHostingView, no double view tree) - .gitignore: exclude .vscode/ and .claude/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
266adc1 to
2bba12d
Compare
Author
|
@steipete MacOS app menu items fix. It needs a lot of fixing but this is a good start. |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
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.
Summary
Complete redesign of the macOS menubar menu for visual consistency and stability. Every row across every section now uses the same custom
NSMenuItem.viewrendering pipeline, eliminating the mix of native AppKit rendering and custom SwiftUI views that caused misaligned indents, inconsistent row heights, and blue selection highlights in some sections but not others.What changed
Selection / hover colour
unemphasizedSelectedContentBackgroundColor), matching macOS system menus (Spotlight, Control Centre, etc.)Sections & labels
Row layout & padding
Icons
laptopcomputer.and.iphonewhich rendered very largenetworkSection headers (Context / Usage)
list.bullet/bolt) + primary-colour label + secondary count subtitle; wrapped inHighlightedMenuItemHostViewso they get the same grey hover as other rowsExec Approvals dropdown
HighlightedMenuItemHostView+MenuPickerRow(leading checkmark, grey hover, consistent indent)Active header (OpenClaw toggle)
Togglewith AppKit checkmark renderingMenuActiveHeaderViewwith a proper capsule toggle switch (macOS-style);ClickableMenuItemHostViewinterceptsmouseDownto fire the action sinceNSMenuItem.target/actionis ignored for custom viewsCost usage submenu
NSHostingController+ separateNSHostingViewfor the same view (two independent render trees causing blank/wrong chart)NSHostingViewsized viafittingSizeNew Swift files
MenuActiveHeaderView.swift—MenuActiveHeaderView(capsule toggle header) +ClickableMenuItemHostViewsubclassMenuToggleViews.swift—CapsuleToggle,QuickSettingsRow,MenuSubMenuRow,MenuNativeItemRow,MenuPickerRow,MenuSectionLabelViewgitignore
.vscode/and.claude/to.gitignoreAfter
Before
AI-assisted:
Greptile Summary
Confidence Score: 5/5
This PR is safe to merge with minimal risk only UI changes.
Replaces the mixed native-AppKit/SwiftUI rendering pipeline in the macOS menubar with a unified NSMenuItem.view-based system across all sections.
Core infrastructure (MenuHighlightedHostView.swift, MenuActiveHeaderView.swift):
showsHighlight = false for toggle rows
New views (MenuToggleViews.swift):
Injection pipeline (MenuSessionsInjector.swift):
9_415_564)
NSApp.sendAction forwarding
View cleanup (MenuContentView.swift, session/usage label views):
text now uses static .primary/.secondary