Skip to content

Allow the microphone, camera and notifications for Discord's page - #3

Merged
3vcloud merged 6 commits into
mainfrom
media-notification-permissions
Nov 8, 2026
Merged

3vcloud merged 6 commits into
mainfrom
media-notification-permissions

Conversation

@3vcloud

@3vcloud 3vcloud commented Nov 8, 2026

Copy link
Copy Markdown
Member

The page's permission requests now go to `onPermissionRequest` in the window, which allows the microphone, camera and notifications for discord.com and its subdomains over https. Other sites and other permission kinds keep the platform's default. The decision lives in `PagePermissions`, with unit tests behind `DW_BUILD_TESTS`.

`docs/MISSING_FEATURES.md` lists the desktop bridge features this program still lacks, with status and plan.

Depends on gwdevhub/WebViewWindow#6, which adds `onPermissionRequest`. CI checks WebViewWindow out from `main`, so this won't build there until #6 merges. Merging #6 first.

🤖 Generated with Claude Code

Jon and others added 6 commits November 7, 2026 21:52
WebView2 has no window.webkit.messageHandlers, so the page's host messages were dropped on Windows and the page never reported
ready. The bridge now uses window.chrome.webview there, and keeps webkit on Linux.

The page script could also run before the document had a body, when the navigation completed, and then failed on
documentElement. It now waits for DOMContentLoaded in that case.

The window opens on a loading page, which reports ready at once and then moves on to Discord, so the window appears straight away.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
WebViewWindow now draws the resize strips along the edges when
resizeEdges is set, so the page no longer draws its own zones or
posts resizeDrag.
The window shows Discord's icon in the taskbar and the system tray. The
title bar has a button that opens a dialog with a tick box: ticked keeps
the window in the taskbar when minimised, unticked hides it to the tray.
The choice is saved in the settings folder.

The page no longer draws its own resize zones, since the library draws them.
The settings dialog has an Updates section, with Check for update and
Update now. The bar's Update available notice opens it. An update
downloads the release file for this platform, checks it against the
SHA-256 GitHub publishes, puts it in place of the running program, and
starts the new copy. A failed download or checksum leaves the installed
program unchanged.

Leftovers from an update are removed when the program next starts.
The settings dialog is now a separate window, opened from the title bar
or the update notice. Downloads and installs run behind a progress window
with a cancel button, which stops the download part way through.

Discord loads directly in its window, under a loading window that closes
once Discord has drawn its app, so the page no longer loads twice. The
page reports ready once its app is drawn, with a 30-second limit.

The program's windows and what they share are in Application.cpp.
The page's permission requests now go to onPermissionRequest in the window,
which allows the microphone, camera and notifications for discord.com and
its subdomains over https. Other sites and other kinds keep the platform's
default. The decision is in PagePermissions, which has unit tests behind
DW_BUILD_TESTS.

docs/MISSING_FEATURES.md lists the desktop bridge features this program
still lacks, with their status and the plan for them.

This needs the WebViewWindow change that adds onPermissionRequest. CI
checks WebViewWindow out from its main branch, so this doesn't build there
until that change is merged.
@3vcloud
3vcloud merged commit 8f14fd7 into main Nov 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant