Skip to content

webview2: Allow WebView2 to be discoverable by apps.#17938

Open
Aetopia wants to merge 2 commits into
ScoopInstaller:masterfrom
Aetopia:master
Open

webview2: Allow WebView2 to be discoverable by apps.#17938
Aetopia wants to merge 2 commits into
ScoopInstaller:masterfrom
Aetopia:master

Conversation

@Aetopia

@Aetopia Aetopia commented May 30, 2026

Copy link
Copy Markdown

Adds a registry entry that allows any WebView2 enabled app to discover the runtime installed by Scoop.

Reference: https://ntlite.com/community/threads/webview2-portable.5560/

The WEBVIEW2_BROWSER_EXECUTABLE_FOLDER variable isn't sufficient for apps to discover the runtime.
Since the WebView2 Loader will actually load into the registry if the app isn't specifically configured to read the variable.

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR modifies the WebView2 JSON manifest to add installer and uninstaller scripts for registry configuration. The installer script registers the WebView2 runtime location under the Windows EdgeUpdate ClientState registry path, setting the EBWebView value to the installation directory ($dir). The uninstaller script removes that registry entry via reg.exe with suppressed output. The file structure is adjusted to accommodate these new configuration sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • ScoopInstaller/Extras#17085: Also modifies bucket/webview2.json to control how a WebView2 installation is referenced/overridden (portable manifest and environment-directory mapping).
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description includes the required conventional PR title checkbox marked as completed, confirms reading the contributing guide, and provides clear context about the registry entry addition and why it's necessary for WebView2 discoverability.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main change: adding a registry entry to make WebView2 discoverable by applications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
bucket/webview2.json (1)

30-38: Please run manifest validation/install checks for this change set.

Recommended local checks for this PR:

  • scoop config debug true
  • scoop config gh_token <your-github-token> (optional, read-only)
  • .\bin\checkver.ps1 -App webview2 -f
  • .\bin\formatjson.ps1 -App webview2
  • scoop install bucket/webview2.json -a 32bit
  • scoop install bucket/webview2.json -a 64bit
  • scoop install bucket/webview2.json -a arm64

As per coding guidelines: “Provide clear instructions for testing the manifest locally before submission.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bucket/webview2.json` around lines 30 - 38, The PR added changes to
bucket/webview2.json (installer and uninstaller scripts) but lacks the required
local manifest validation and install checks; run the recommended checks against
bucket/webview2.json: enable debug with `scoop config debug true`, optionally
set `scoop config gh_token`, run `.\bin\checkver.ps1 -App webview2 -f` and
`.\bin\formatjson.ps1 -App webview2`, then attempt installs for all
architectures `scoop install bucket/webview2.json -a 32bit`, `-a 64bit`, and `-a
arm64` to verify the installer and uninstaller scripts ("installer" and
"uninstaller") behave correctly and produce a valid manifest before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bucket/webview2.json`:
- Around line 36-38: The uninstaller script currently deletes the entire
ClientState registry key; update the "uninstaller" -> "script" so it deletes
only the manifest-owned value instead of the key by using reg.exe with the /v
"EBWebView" option (targeting the same
HKCU\SOFTWARE\Microsoft\EdgeUpdate\ClientState\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}
path) and keep the /f and Out-Null behavior; locate the "uninstaller" object and
replace the reg.exe delete command accordingly.

---

Nitpick comments:
In `@bucket/webview2.json`:
- Around line 30-38: The PR added changes to bucket/webview2.json (installer and
uninstaller scripts) but lacks the required local manifest validation and
install checks; run the recommended checks against bucket/webview2.json: enable
debug with `scoop config debug true`, optionally set `scoop config gh_token`,
run `.\bin\checkver.ps1 -App webview2 -f` and `.\bin\formatjson.ps1 -App
webview2`, then attempt installs for all architectures `scoop install
bucket/webview2.json -a 32bit`, `-a 64bit`, and `-a arm64` to verify the
installer and uninstaller scripts ("installer" and "uninstaller") behave
correctly and produce a valid manifest before merging.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8fca53bd-7aa2-44fa-a62f-cb76e869eaa8

📥 Commits

Reviewing files that changed from the base of the PR and between 44fc930 and ec50cb2.

📒 Files selected for processing (1)
  • bucket/webview2.json

Comment thread bucket/webview2.json
@Aetopia Aetopia changed the title webview2; Allow WebView2 to be discoverable by apps. webview2: Allow WebView2 to be discoverable by apps. May 30, 2026
arvdk added a commit to arvdk/Extras that referenced this pull request Jun 9, 2026
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