HD auto-grants every WebView2 permission

Hydrogen Desktop's webview (Windows / WebView2) registers a PermissionRequested handler that returns ALLOW for every permission kind — microphone, camera, clipboard-read, geolocation, notifications, sensors, etc. So inside HD the user never sees a "this site wants to use your microphone / camera / clipboard / location" dialog. Webview apps that call getUserMedia, read the clipboard, or ask for geolocation simply work, with no prompt.

Evidence: hd-app/src/lib.rs (~lines 326-349):

// PermissionRequested: auto-grant EVERY permission kind (clipboard
// read, mic, camera, geolocation, notifications, sensors, …) so the
// user never sees a WebView2 "site wants to" dialog.
…
args.SetState(COREWEBVIEW2_PERMISSION_STATE_ALLOW)?;
hd_log::hd_log!("[perm] auto-granted permission kind {:?}", kind);

Every request is unconditionally set to COREWEBVIEW2_PERMISSION_STATE_ALLOW. In the HD log you'll see lines like [perm] auto-granted permission kind … and, at startup, [perm] Registered PermissionRequested auto-grant handler.

Why HD does this

HD is the user's trusted desktop app — they've already chosen to run it. Intermediate per-site Web permission prompts (especially the clipboard-paste dialog) are pure friction with no added safety here, since there's no untrusted third-party browsing context: the surfaces are HD's own panels and the user's own webview apps. So HD grants them all up front.

What this means for you when building webview apps

  • Don't instruct the user to "click Allow." There is no prompt — telling them to look for one is wrong and confusing. getUserMedia({ audio: true }), clipboard reads, geolocation, notifications all resolve without a dialog.
  • If a webview app isn't getting mic/camera data, the cause is not a denied permission prompt (HD never denies). Look elsewhere: no device present, the page served over a non-secure context, a code bug, or the OS-level Windows privacy toggle for the camera/mic being off for the app entirely.
  • This is WebView2/Windows-specific behavior baked into HD's webview host — it's not something the web page or the user configures.

This auto-grant is only the low-level WebView2 browser-permission layer. It is separate from the screen-share / microphone consent the AI itself requests when it wants to capture the user's screen or mic for a session — that flow is explicitly user-approved (the user sees and accepts an in-app consent UI). Don't conflate them: WebView2 site permissions are silently allowed; the AI's capture/share request is a real, user-facing approval. See hd-capture-share.

  • hd-capture-share — the SEPARATE, user-approved screen-share / mic consent the AI requests
  • hd-open-url — opening URLs/webview apps inside HD (where these permissions apply)
  • hd-browser-picker — routing URLs to webviews vs native browsers vs Pup