Simplify permission buttons and fix system audio native dialog#490
Merged
Conversation
Replace confusing dual-button pattern (Test/Test & Grant + gear icon) with a single "Grant Access" button that checks permission status, triggers the OS prompt, and opens System Settings if needed.
Replace NSAudioCaptureUsageDescription (non-standard key) with
NSScreenCaptureUsageDescription so ScreenCaptureKit can display the
native consent dialog.
Change request-system-audio-access IPC handler to probe the audio tap
binary first, which triggers the native ScreenCaptureKit consent prompt
instead of immediately opening System Settings. Falls back to System
Settings if the probe is denied or fails.
Also enhance check-system-audio-access to consult the cached probe
status alongside getMediaAccessStatus("screen"), since macOS 15+
separates system audio from screen recording in TCC.
NSAudioCaptureUsageDescription is the correct Info.plist key for Core Audio tap permission dialogs — revert the mistaken rename to NSScreenCaptureUsageDescription. Increase REQUEST_TIMEOUT_MS from 15s to 60s since the binary probe now serves as the permission request flow: AudioHardwareCreateProcessTap triggers the native macOS consent dialog, and the user needs time to respond.
charian47
pushed a commit
to charian47/openwhispr
that referenced
this pull request
Apr 25, 2026
…ermission-buttons Simplify permission buttons and fix system audio native dialog
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
AudioHardwareCreateProcessTaptriggers the TCC prompt whenNSAudioCaptureUsageDescriptionis present in Info.plist — the key was already there, but the IPC handler was short-circuiting before the binary ever rangetMediaAccessStatus("screen")(for users who granted via old Screen Recording toggle) and the cached audio tap probe result (for users who grant via the new native dialog), since these are separate TCC entries on macOS 14.4+Backward compatibility
Users who already granted Screen Recording permission through the old flow are unaffected — the handler checks
getMediaAccessStatus("screen")first and short-circuits before probing.Test plan