feat(desktop): wire macOS WKWebView getUserMedia permission hook (LC-134) #453

Merged
vas2000-work merged 2 commits from feat/LC-134-macos-getusermedia-hooks into main 2026-06-28 02:21:00 +02:00
Member

Adds the macOS slice of the cross-platform getUserMedia permission work (sibling of the existing Linux WebKit2GTK and Windows WebView2 handlers).

The WebKit-layer consent is already auto-granted on macOS: wry's WryWebViewUIDelegate implements requestMediaCapturePermissionForOrigin and calls the decision handler with WKPermissionDecision::Grant, so installing our own WKUIDelegate would only clobber wry's (file-upload panels, new-window handling). The macOS arm of install_media_permission_handler is therefore an explicit, documented no-op rather than the previous silent catch-all.

The actual macOS-specific requirement is the OS-level (TCC) prompt. WKWebView reaches the camera/mic through AVFoundation in the host app process, which macOS silently denies (or terminates the app) unless the bundle declares usage strings. desktop/Info.plist adds NSCameraUsageDescription and NSMicrophoneUsageDescription (auto-merged by tauri-bundler), and desktop/lets-chat.entitlements adds com.apple.security.device.camera / audio-input for the default hardened runtime, wired via bundle.macOS.entitlements. Together these yield exactly one OS prompt on the first call, remembered across launches.

These artifacts only take effect once the macOS build/sign/notarize path lands under LC-126 (currently parked); on Linux/Windows builds they are ignored and the new macOS cfg arm is compiled out, so just check / just test-desktop stay green.

#LC-134

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Adds the macOS slice of the cross-platform getUserMedia permission work (sibling of the existing Linux WebKit2GTK and Windows WebView2 handlers). The WebKit-layer consent is already auto-granted on macOS: wry's WryWebViewUIDelegate implements requestMediaCapturePermissionForOrigin and calls the decision handler with WKPermissionDecision::Grant, so installing our own WKUIDelegate would only clobber wry's (file-upload panels, new-window handling). The macOS arm of install_media_permission_handler is therefore an explicit, documented no-op rather than the previous silent catch-all. The actual macOS-specific requirement is the OS-level (TCC) prompt. WKWebView reaches the camera/mic through AVFoundation in the host app process, which macOS silently denies (or terminates the app) unless the bundle declares usage strings. desktop/Info.plist adds NSCameraUsageDescription and NSMicrophoneUsageDescription (auto-merged by tauri-bundler), and desktop/lets-chat.entitlements adds com.apple.security.device.camera / audio-input for the default hardened runtime, wired via bundle.macOS.entitlements. Together these yield exactly one OS prompt on the first call, remembered across launches. These artifacts only take effect once the macOS build/sign/notarize path lands under LC-126 (currently parked); on Linux/Windows builds they are ignored and the new macOS cfg arm is compiled out, so just check / just test-desktop stay green. #LC-134 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(desktop): wire macOS WKWebView getUserMedia permission hook (LC-134)
Some checks failed
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 4s
check-secrets / TruffleHog (pull_request) Successful in 4s
check-secrets / Kingfisher (pull_request) Failing after 5s
Check / clippy + fmt + tests (pull_request) Failing after 1m4s
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / Kingfisher (push) Failing after 5s
249e1a5259
Adds the macOS slice of the cross-platform getUserMedia permission work (sibling of the existing Linux WebKit2GTK and Windows WebView2 handlers).

The WebKit-layer consent is already auto-granted on macOS: wry's WryWebViewUIDelegate implements requestMediaCapturePermissionForOrigin and calls the decision handler with WKPermissionDecision::Grant, so installing our own WKUIDelegate would only clobber wry's (file-upload panels, new-window handling). The macOS arm of install_media_permission_handler is therefore an explicit, documented no-op rather than the previous silent catch-all.

The actual macOS-specific requirement is the OS-level (TCC) prompt. WKWebView reaches the camera/mic through AVFoundation in the host app process, which macOS silently denies (or terminates the app) unless the bundle declares usage strings. desktop/Info.plist adds NSCameraUsageDescription and NSMicrophoneUsageDescription (auto-merged by tauri-bundler), and desktop/lets-chat.entitlements adds com.apple.security.device.camera / audio-input for the default hardened runtime, wired via bundle.macOS.entitlements. Together these yield exactly one OS prompt on the first call, remembered across launches.

These artifacts only take effect once the macOS build/sign/notarize path lands under LC-126 (currently parked); on Linux/Windows builds they are ignored and the new macOS cfg arm is compiled out, so just check / just test-desktop stay green.

#LC-134

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/LC-134-macos-getusermedia-hooks
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
check-secrets / Kingfisher (push) Successful in 8s
check-secrets / Nosey parker (pull_request) Successful in 7s
check-secrets / TruffleHog (push) Successful in 10s
check-secrets / TruffleHog (pull_request) Successful in 11s
check-secrets / Nosey parker (push) Successful in 1m24s
check-secrets / Kingfisher (pull_request) Successful in 10s
Check / clippy + fmt + tests (pull_request) Successful in 6m1s
4abdc52a1b
# Conflicts:
#	desktop/lets-chat.entitlements
#	desktop/src/main.rs
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!453
No description provided.