[Experimental] Probe: what macOS 27 exposes for hiding menu-bar icons (#360/#366)#371
Draft
talkstream wants to merge 1 commit into
Draft
[Experimental] Probe: what macOS 27 exposes for hiding menu-bar icons (#360/#366)#371talkstream wants to merge 1 commit into
talkstream wants to merge 1 commit into
Conversation
…ons (dwarvesf#360) Read-only Accessibility/CoreGraphics probe + findings, to scope a real macOS 27 hide mechanism for the managed-overflow epic (dwarvesf#366). It does NOT hide anything. Findings on build 26A5368g: - MenuBarAgent owns the status bar; per-item CGWindows are gone (the public window list shows one full-width menu-bar window). - Accessibility (MenuBarAgent.AXExtrasMenuBar) still enumerates items and their positions, but the modern items are SwiftUI AXHostingView groups with no settable position and no actions -> no public hide/move/reorder primitive. - Legacy SystemUIServer extras still expose AXPress but are not repositionable. Conclusion: no public-API hide exists on macOS 27; real hiding needs a private path (a la stonerl/Thaw), incompatible with the sandboxed/MAS build. This is a standalone, non-target experiment kept out of the app build.
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.
Why
#370 establishes that the length-inflation trick is dead on macOS 27 and degrades
gracefully. The obvious next question — can Hidden Bar actually hide icons on macOS 27,
and at what cost? — is exactly what Option D / #366 ("managed-overflow, likely via
Accessibility") needs answered before any design. This PR is that recon, run on real
macOS 27 hardware (build
26A5368g).experiments/macos27-menubar-probe.swiftis a standalone, non-target tool (kept outof the app build on purpose, so the sandboxed/MAS posture and #370 stay untouched). It
only reads state — it never moves, presses, hides, or modifies anything.
swiftc experiments/macos27-menubar-probe.swift -o /tmp/mbprobe && /tmp/mbprobeFindings (macOS 27.0, 26A5368g)
MenuBarAgentowns the bar; per-item windows are gone. The publicCGWindowListCopyWindowInfolist shows a single full-widthWindow Servermenu-barwindow — none of the per-item status
CGWindows the old trick (and window-capturetools) depended on.
Accessibility still enumerates items + positions.
AXUIElementCreateApplication(MenuBarAgent).AXExtrasMenuBarreturns the 5 foreignstatus items with readable positions — but only with Accessibility permission
(
AXIsProcessTrusted), which the App Sandbox forbids....but there is no public lever to hide/move/reorder them.
AXPositionsettableAXGroup/AXHostingViewAXMenuBarItem/AXMenuExtraAXPress,AXCancelThe modern items are read-only SwiftUI hosting views: no settable position, no actions.
Conclusion
On macOS 27 public APIs let you read the menu bar but not rearrange it — there is no
public-API hide mechanism. Real hiding requires a private path (SkyLight/
CGS*or theMenuBarAgentinterfaces that the maintained tools reverse-engineered), which needsAccessibility (non-sandbox, not MAS-shippable as-is) and is explicitly at risk of Apple
changing/blocking it during the beta.
Suggested path (for #366)
stonerl/Thaw(MIT, maintained Ice fork; see its #687) — new menu-bar API + Accessibility, non-sandboxed.
EXPERIMENTAL_MENUBAR_27)and a separate non-sandboxed target so the default build / macOS 27: detect hide-mechanism failure and degrade gracefully (#360) #370's posture stay clean.
Full write-up:
docs/experiments/macos27-menubar.md. Re #360, #366.