fix(overview): ASR 状态在凭据保存后未刷新仍显示「未配置」#538
Merged
H-Chris233 merged 1 commit intoMay 27, 2026
Merged
Conversation
PR Reviewer Guide 🔍(Review updated until commit 93555d5)Here are some key observations to aid the review process:
|
在 Settings 中填写/更新 ASR 凭据(如 volcengine 的 APP ID、Access Token) 但不切换提供商时,Overview 页的 useEffect 因 prefs?.activeAsrProvider 不变 不会重跑 refreshCredentials(),导致状态卡在「未配置」。 修复:set_credential 后端命令保存凭据后 emit credentials:changed 事件, Overview 监听该事件刷新凭据状态。
5e0880a to
93555d5
Compare
|
Persistent review updated to latest commit 93555d5 |
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.
User description
修复 issue #532 — 概览页 ASR 语音状态在 Settings 中保存凭据后仍显示「未配置」。
根因: Overview 页的
refreshCredentials()只在prefs?.activeAsrProvider变化时触发。当用户在 Settings 中填写/更新 ASR 凭据(如 volcengine 的 APP ID、Access Token、Resource ID)但不切换提供商时,该依赖不变,凭据状态不会被重新拉取。修复:
set_credential命令保存凭据后 emitcredentials:changedTauri 事件useEffect监听该事件,收到后调用refreshCredentials()Test plan:
PR Type
Bug fix
Description
Refresh ASR status after credential saves
Emit
credentials:changedfrom backendListen for credential updates on Overview
Keep LLM status behavior unchanged
Diagram Walkthrough
File Walkthrough
commands.rs
Emit credential change event after saveopenless-all/app/src-tauri/src/commands.rs
Ok(())after credential writes complete.credentials:changedon every save or removal.Overview.tsx
Listen for credential updates in Overviewopenless-all/app/src/pages/Overview.tsx
credentials:changed.