Fix blank popover on macOS 26 Tahoe#23
Closed
coherent-cache wants to merge 1 commit into
Closed
Conversation
- MenuBarView: drop the ScrollView. Under MenuBarExtra(.window) on Tahoe, ScrollView content fails to render (child bodies run but nothing draws). .frame(maxHeight:) does not work around it. A plain VStack lets the popover auto-size correctly. - DeviceListView / HiddenDevicesToggleView: key ForEach by the AudioDevice itself, not by AudioObjectID. Devices with both input and output streams share one AudioObjectID, and disconnected placeholders share id=0, which triggered SwiftUI duplicate-id warnings and undefined rendering. - PriorityManager.unhideDevice: for outputs, clear both hiddenSpeakers and hiddenHeadphones. The old code only cleared the list matching the device's current category, so "unhide" from the ignored popover could drop a device into a section that wasn't on screen, making the action look like a no-op.
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
On macOS 26 (Tahoe) the menu-bar popover renders blank in the middle — the mode toggle, volume slider and footer draw, but the device-section area is empty. Child view bodies still execute with the right data (verified via
os_loginsidebody); nothing paints.Changes
Views/MenuBarView.swift— drop theScrollViewaround the device sections. UnderMenuBarExtra(.window)on macOS 26, ScrollView content fails to render, and.frame(maxHeight:)doesn't work around it (see Apple Developer Forums thread 741601;.fixedSize(horizontal: false, vertical: true)helps in some layouts but not this one). Since the popover has bounded content, a plainVStackletsMenuBarExtraauto-size correctly.Views/DeviceListView.swift+HiddenDevicesToggleView— keyForEachby theAudioDevicevalue instead of\.id(AudioObjectID). A CoreAudio device with both input and output streams (virtual loopback drivers, aggregates) produces twoAudioDevicevalues sharing oneAudioObjectID, and disconnected placeholders all useid = 0. This triggered SwiftUI's "ID occurs multiple times" warning and collapsed the hidden-devices list into undefined rendering.Services/PriorityManager.swift—unhideDevice(_:)now clears the UID from bothhiddenSpeakersandhiddenHeadphonesfor outputs. Previously it only cleared whichever list matchedgetCategory(for:), so unhiding from the ignored popover could silently land the device in a section that wasn't currently visible, making the action look like a no-op.Test plan
No tests added — the upstream project has no test target, and two of the three fixes are SwiftUI rendering regressions that aren't cleanly unit-testable (a snapshot-based approach via
ImageRenderer+ Vision OCR is feasible if a test target is added later).Verified manually on macOS 26.2 / Xcode 17:
./build.shImageRenderersnapshot)ForEach<…> ID occurs multiple timeswarnings in the log when virtual loopback devices are present