Repository navigation
Handle desktop microphone permission without web prompts - #147
Merged
shaohaozhi286 merged 1 commit intoOct 19, 2026
Merged
Conversation
Grant microphone access only to the Desktop host's current loopback origin, preserve browser and OS privacy prompts, and cover the policy and production Windows WebHost with focused tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
首次点击录音时,原生 Desktop 现在直接处理 ACECode 自身页面的麦克风网页权限,不再额外弹 WebView 确认。普通浏览器仍由浏览器授权;操作系统隐私授权不变。
Windows 校验宿主设置的 loopback origin、当前页面和请求来源(包括端口),仅处理麦克风,并关闭授权持久化。macOS 扩展已有 WKUIDelegate,仅授权同来源主页面的麦克风;文件选择等原行为保留。其他网页、摄像头和其他权限不自动放行。
为保持 web_host.cpp 在已有行数限制内,将 Windows WebView 设置函数提取到 web_host_browser_win.hpp。保留主线刚合入的 Linux WebKit API 修复,更新 OpenSpec 第 9 节及使用说明。
验证:
原生验证输出(两次启动均相同):
{"ok":true,"states":[{"after":"granted","before":"prompt","live":true},{"after":"granted","before":"granted","live":true}]}总单测目标触发大量无关重编译后已主动停止,未宣称全量通过。macOS/Linux 真机授权及 macOS 编译未执行;正在运行的 Desktop 尚未替换。