webview2: Allow WebView2 to be discoverable by apps.#17938
Conversation
📝 WalkthroughWalkthroughThis 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 Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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 truescoop config gh_token <your-github-token>(optional, read-only).\bin\checkver.ps1 -App webview2 -f.\bin\formatjson.ps1 -App webview2scoop install bucket/webview2.json -a 32bitscoop install bucket/webview2.json -a 64bitscoop install bucket/webview2.json -a arm64As 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
📒 Files selected for processing (1)
bucket/webview2.json
Adds a registry entry that allows any WebView2 enabled app to discover the runtime installed by Scoop.
The
WEBVIEW2_BROWSER_EXECUTABLE_FOLDERvariable 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.
<manifest-name[@version]|chore>: <general summary of the pull request>