Skip to content

fix(asr): 启动时保留已保存的渠道顺序 - #1123

Closed
leolulu wants to merge 2 commits into
Open-Less:betafrom
leolulu:fix/asr-startup-channel-priority
Closed

leolulu wants to merge 2 commits into
Open-Less:betafrom
leolulu:fix/asr-startup-channel-priority

Conversation

@leolulu

@leolulu leolulu commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

这个 PR 修什么

Fixes #1122

我在 Windows 上复现了一个问题:把某个 ASR 渠道拖到第一位,完全退出再打开,旧渠道又回到第一位。#918 说“排序即优先级,列表里第一个启用的就是当前生效的渠道”,所以重启后也应该保留刚才选好的顺序。

我查到的原因是:拖动时,新顺序和当前渠道已经保存到凭据库,但 preferences.json 里的 activeAsrProvider 还留着旧值。修复前,Tauri 启动时又按这个旧值选了一次渠道,于是把旧渠道移回了最前面。

改了什么

我只去掉了启动时按旧偏好重新选择 ASR 渠道的调用,并改了旁边一处已经不适用的注释。这样,有已保存渠道时,启动后继续用它原来的顺序。

我也核对了这几种原有情况:

  • 如果凭据库里没有当前渠道,Core 仍会用 activeAsrProvider 作为备用值。
  • 旧版本用户的渠道迁移、Windows 首次安装时预置 Foundry 卡片,都走原来的逻辑。
  • 在设置里明确更换 ASR 提供商时,原来的同步和失败回滚仍然保留。
  • 偏好字段、凭据格式、拖动排序、渠道 ID 与 providerType 的对应关系、ASR 路由都没有改动。

这段 Tauri 启动代码由 Windows、macOS 和 Android 共用;Linux egui 的启动代码没有改动。新增的 Core 测试检查了残留偏好为 foundry-local-whisper 或 volcengine、同厂商多张卡片,以及没有当前渠道时使用备用值这几种情况。

验证

  • Linux CI:cargo test --locked -p openless-core,包含新增测试。
  • Windows、macOS、Android 和 Linux 的相关检查全部通过:CI 运行记录。

@leolulu
leolulu marked this pull request as ready for review September 28, 2026 07:38
appergb added a commit that referenced this pull request Sep 30, 2026
Integrate ASR/Omni fixes, API Route, Android IME and confirmation-based vocabulary learning. Complete settings transitions and macOS single-item credential storage. Synchronize all application versions to 2.0.0-Beta.4+build.20260930.

Integrated PRs: #1116, #1120, #1121, #1123, #1124, #1067 and #1128. Linux #1117 remains independent and is excluded from automatic release.

Validated: full cross-platform CI, 18 UI motion cases, 112 frontend test files, 1245 Core tests (1 ignored) and 572 macOS native tests.

Co-authored-by: HKLHaoBin <we3q@qq.com>
@appergb appergb closed this Sep 30, 2026
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.

[asr][windows] 拖动渠道后重启恢复旧提供商,可能误启用 Foundry

2 participants