Skip to content

Fix microphone context menu delegation - #144

Merged
shaohaozhi286 merged 1 commit into
masterfrom
codex/fix-microphone-context-menu-20261019
Oct 18, 2026
Merged

shaohaozhi286 merged 1 commit into
masterfrom
codex/fix-microphone-context-menu-20261019

Conversation

@shaohaozhi286

Copy link
Copy Markdown
Collaborator

右键输入框麦克风时,全局菜单在捕获阶段拦截事件,导致只显示“全选”。本次接入已有的菜单委托机制,按按钮实例打开麦克风设备列表与按住录音设置,并关闭已打开的通用菜单;编辑器内的复制、粘贴、全选保持正常。

浏览器回归补挂生产用 DesktopContextMenu,修复前准确复现失败,修复后覆盖图标、按钮空白区、明暗主题及菜单切换,原设备选择、快捷键、录音和布局检查均通过。

验证:

  • pnpm test
  • pnpm build(含旧 WebView 正则兼容检查)
  • node scripts/test-speech-recognition.mjs(Chromium 模拟音频设备,受控识别 API)
  • openspec validate add-speech-recognition --strict
  • git diff --check

浏览器验证输出:

[pass] real global context-menu delegation: icon, button padding, menu switching and editor actions
[pass] autosave, device selection, editable shortcuts, hold/release/blur, late permission, stable layout, real WAV, stop/send/cancel, session isolation and tags

更新 OpenSpec:openspec/changes/add-speech-recognition/。本次未重新构建或替换正在运行的 Desktop。

Route microphone right-click through the global context-menu delegate and cover the production menu capture path in speech browser tests. Validated Web tests, build, browser speech regression and strict OpenSpec checks.
@shaohaozhi286
shaohaozhi286 merged commit 96b9a5e into master Oct 18, 2026
2 of 3 checks 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.

2 participants