You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add NoDevice status distinguishing missing device from denied
Show "No microphone detected" with Retry instead
Map recorder startup failures to clear user-facing messages
Add unit tests and translations across five languages
Diagram Walkthrough
flowchart LR
A["PermissionStatus::NoDevice"] --> B["Onboarding/Settings show 'No microphone detected'"]
A --> C["Startup gate does not block entry"]
D["RecorderError::NoInputDevice"] --> E["Recorder errors map to clear user messages"]
F["Unit tests for error classification"] --> A
Loading
File Walkthrough
Relevant files
Bug fix
8 files
asr_wiring.rs
Check microphone device before reporting permission ready
New user-facing error strings produced by RecorderError::user_message() (and the equivalent hardcoded string in asr_wiring.rs) are hardcoded Chinese. On a Windows machine without a microphone, a user with an English/Japanese/Korean UI will still see "未检测到麦克风,请连接麦克风后重试" in the dictation/QA error capsule instead of the localized text that was added to the frontend i18n files. The PR adds localized strings for the settings/onboarding UI but the backend error path bypasses i18n; the error should be surfaced as a status/error code and localized in the frontend.
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
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.
User description
摘要
Fixes#779。
无麦克风的 Windows 机器上,应用把“未检测到麦克风”误报成“没有麦克风权限”,并引导用户去系统设置授权,但系统设置里根本没有麦克风隐私开关,误导用户。本 PR 区分「无设备」与「权限被拒」,明确提示未检测到麦克风。
修复 / 新增 / 改进
PermissionStatus新增NoDevice状态:Windows / Linux 探测不到默认输入设备时返回noDevice,不再返回Deniedno default input device等原始英文错误映射为明确中文文案noDevice不阻塞进入应用,引导页显示提示与「重试」兼容
测试计划
命令:
cargo check(Windows 主 crate)结果:通过,无新增警告
证据路径:本机运行
命令:
cargo test --lib permissions::tests结果:2 通过
证据路径:本机运行
命令:
npm test(tsc + vite build + 前端 contract 测试)结果:全绿
证据路径:本机运行
命令:
cargo test(backend-tests harness)结果:139 通过;唯一失败为
pin_persistence符号链接测试(OS 错误 1314,需管理员 / 开发者模式特权,与本次改动无关)证据路径:本机运行
PR Type
Bug fix
Description
Add NoDevice status distinguishing missing device from denied
Show "No microphone detected" with Retry instead
Map recorder startup failures to clear user-facing messages
Add unit tests and translations across five languages
Diagram Walkthrough
File Walkthrough
8 files
Check microphone device before reporting permission readyUse user_message for recorder start failureUse user_message for QA recorder start failureAdd NoDevice status and no-device error classifierAdd NoInputDevice error and user-friendly messagesDo not gate startup on missing microphone deviceHandle noDevice state with retry in onboardingShow no-device pill and retry button in settings5 files
Add English no-device hint and labelAdd Japanese no-device hint and labelAdd Korean no-device hint and labelAdd Simplified Chinese no-device hint and labelAdd Traditional Chinese no-device hint and label1 files
Extend PermissionStatus type with noDevice