Repository navigation
AgentMenu 1.5.0
The popover is a real Liquid Glass surface on macOS 26 — the desktop refracts through it the way Control Center does.
NSPopover could never have done this
NSPopover draws its background and arrow in a private frame view that sits below the hosted content. Anything glassy layered on top therefore samples that frame's material rather than the desktop — glass over grey, which is exactly what earlier builds looked like.
Confirmed by dumping the live view hierarchy rather than assuming: _NSPopoverWindow is already opaque=false with a clear background colour, its contentView is the NSHostingView, and there is no NSVisualEffectView anywhere inside it. Nothing was in reach to neutralise.
So the container is now GlassPanel, a borderless NSPanel with a genuinely clear background, which lets the SwiftUI .glassEffect beneath the content sample what is actually behind the window. It is an NSPanel with canBecomeKey overridden rather than a plain non-activating panel, because Preferences lives in this window now and its burn-budget field has to accept typing.
Below macOS 26 it falls back to .ultraThinMaterial — still genuinely translucent, just without the refraction.
What the popover was doing for free, now done by hand
- Positioning under the status item, clamped to the visible frame so a 360pt panel cannot land half offscreen beside a right-edge status item.
- Click-outside dismissal, via a global monitor (clicks in other applications) and a local one (clicks in this app, which the global monitor never receives).
- Escape to close.
The local monitor deliberately ignores clicks on the status item itself. Left in, it would close the panel on the way past, so the button's own action would then read "not shown" and immediately reopen it — the icon would have become impossible to dismiss with, flickering shut and open on every click.
Two visual defects, both found by screenshotting against a real desktop
Legibility. Untinted .regular glass left the session rows genuinely unreadable over a busy wallpaper. The surface is now tinted — black 26% in dark mode, white 42% in light. Enough contrast to hold 10–11pt text, not so much that the refraction this change exists for is smothered back into a flat panel. Control Center tints its pills for the same reason.
Hard corners around the rounded glass, as reported. Two independent causes:
host.layeris nil untilwantsLayeris set, so settinglayer?.backgroundColor = .clearbeforehand silently did nothing and the backing layer stayed opaque and square.- AppKit derives a borderless window's shadow from its frame, so the shadow itself cast square corners until
invalidateShadow()ran after the mask was applied.
The corner radius is a single shared constant now. The layer mask and the SwiftUI glass shape must agree exactly — a mismatch of one point leaves either a hard edge outside the glass or a clipped highlight inside it.
Resources
Idle CPU with the panel closed measures 5.73%, against 4.8% before this change; RSS 75 MB. The panel's view tree is still destroyed on close, so StatusDot's repeat-forever pulse cannot run behind a hidden window — the regression fixed in 1.2.1 stays fixed.
The first reading taken was 15.44%. That was a cold-start re-parse after a pkill skipped the checkpoint save, and it was re-measured once settled rather than published as a regression.
Not covered by tests
None of this is. It is all AppKit window behaviour in AgentMenuUI, and the test target depends on AgentMenuCore only. 268 tests pass, and none of them touch a window.
Install: download AgentMenu-1.5.0.dmg, open it, drag to Applications. Ad-hoc signed and not notarised, so macOS blocks the first launch — the README covers three ways past that.