Fix empty MenuBarExtra popover (device list was height 0) - #33
Open
makingmusic wants to merge 1 commit into
Open
Fix empty MenuBarExtra popover (device list was height 0)#33makingmusic wants to merge 1 commit into
makingmusic wants to merge 1 commit into
Conversation
ScrollView inside MenuBarExtra(.window) has no intrinsic height, so the popover collapsed to the header/footer and hid every device. Size the lists to their content instead. Keep the row ⋯ menu always visible: hover is unreliable in menu-bar windows, which made Move to Headphones / Ignore / Never Use hard to find.
This was referenced Sep 5, 2026
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.
What you see today
Clicking the menu bar icon opens a popover that looks finished — Speakers / Headphones / Custom, volume slider, Login / Edit / Quit — but no devices. No Speakers section, no Headphones section, no Microphones, not even “No devices”.
CoreAudio is fine. The volume slider still drives the default output. The rows are in the view tree; the window is just too short to show them.
Likely a macOS 26 regression
This does not look like an AudioPriorityBar logic bug. Device enumeration still works; the popover layout broke after a macOS update.
The
ScrollView { … }.frame(maxHeight: 420)layout was already in the app. What changed is howMenuBarExtra(.window)sizes itself on newer 26.x: aScrollViewnow gets an ideal height of ~0pt, so the window shrinks to the header + footer and clips every device row. Older macOS (and earlier 26.x) apparently still gave thatScrollViewenough height to show the lists.If you are still on an older macOS and have not seen this, that fits.
Cause
MenuBarViewwraps the device lists in:MenuBarExtra { … }.menuBarExtraStyle(.window)sizes the window to the content’s ideal height. AScrollViewhas no intrinsic height, so SwiftUI gives it ~0pt. The header and footer have intrinsic sizes, so they still render. The lists sit in the gap and get clipped.Same collapse is described in #22, #28, and #30 (all still open).
What this PR does
Two small view-only changes. No audio / priority / persistence logic.
1. Drop the
ScrollView(MenuBarView.swift)Let the device
VStacksize the popover. Typical setups have a handful of devices, so a growing window is the right default. This does not depend on whatever ideal-height quirk the current macOS build has..fixedSize(vertical: true)on theScrollView(#22)minHeight:on theScrollView(#30)GeometryReader+PreferenceKey(#28)If a 420pt cap + scrolling becomes necessary (Edit mode with dozens of remembered devices), wrap the
VStacklater with a measured height — not aScrollViewthat reports 0.2. Always show the row ⋯ menu (
DeviceListView.swift)Move to Speakers / Headphones, Ignore, Never Use were behind
if isHovering. Hover in aMenuBarExtrawindow is flaky, so those actions often never appeared. The ⋯ is always on the row now (dimmed while dragging). Menu contents are unchanged.This also matters because renamed Bluetooth devices (e.g. AirPods named “smile”) never match
HeadphoneDetectionand land in Speakers. Without a visible ⋯ there is no way to Move to Headphones.Tested
./build.sh(universal Release)Happy to split the ⋯ change into a follow-up if you’d rather take the layout fix alone.