Skip to content

fix(feedback): 修复录音音效恢复与处理动画时序 - #1074

Open
appergb wants to merge 1 commit into
betafrom
fix/feedback-lifecycle
Open

fix(feedback): 修复录音音效恢复与处理动画时序#1074
appergb wants to merge 1 commit into
betafrom
fix/feedback-lifecycle

Conversation

@appergb

@appergb appergb commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

摘要

修复长期使用后录音提示音无法恢复、长文字或翻译仍在输入时动画提前收尾,以及选区润色处理中缺少反馈的问题。思考状态覆盖转写、润色和原生输入阶段,结果完成或交给确认面板后再收起。

修复 / 新增 / 改进

  • Web Audio 恢复加入超时和冻结时钟检测,最多重建一次;新请求、停止和迟到判定贯穿重试,过期回调不会重复播放。
  • macOS 流式输入在支持 AX 的控件上等待原控件光标到达本批文字末尾,确认期间只读取选区范围。捕获后复核焦点,避免等待过程中改变输入目标。
  • 选区直接润色显示处理中提示,重复快捷键的 Busy 返回保留当前反馈;已有语音选区入口在松开后继续显示思考动画。
  • 回归测试分别阻塞流式前缀、最后一段和非流式写入,验证完成事件与隐藏通知不会提前出现;覆盖 Unicode/CRLF 光标位置、过期音效重试和重复轮询。

兼容

  • 公开 IPC、偏好格式及三种胶囊样式保持兼容。
  • macOS 控件无法提供 AX 光标、使用提交型 Return 或确认超过 10 秒时,沿用原有按键发送完成语义,并停止本会话的后续探测。
  • Windows 语音选区沿用已有功能入口;目标应用的实际输入和长期音频恢复需设备验收。

测试计划

  • npm test:前端构建及 85 个前端/合同测试入口通过。
  • cargo test --locked -p openless-core --lib feedback_waits:3 项通过。
  • cargo test --locked -p openless-core --lib native_:11 项通过。
  • cargo test --locked -p openless-core --lib final_insert_cancellation_survives_a_dropped_stop_caller:1 项通过。
  • cargo test --locked -p openless-core --test selection_contract --test selection_voice_contract:32 项通过。
  • cargo test --locked --manifest-path src-tauri/Cargo.toml --lib <filter>:macOS 原生编译通过;keyboard_delivery_tests 3 项、selection_feedback_tests 2 项、tauri_events::tests:: 10 项、core_capsule_tests 1 项均通过。
  • 本次修改文件的 rustfmt、Prettier 与 git diff --check 通过。
  • macOS/Windows 设备验收:睡眠唤醒后的提示音、长文/翻译的实际上屏时机,以及两种选区处理方式。

测试入口:scripts/audio-cue-runtime.test.mjs、Core api.rs 中的 *_feedback_waits_*、Host keyboard_delivery_tests / selection_feedback_tests / tauri_events::tests

全量 Tauri cargo fmt --check 仍报告 beta 已有的格式差异,位于 src-tauri/src/android/jni.rsandroid/updater_logic.rsremote_server/tls_identity.rs;这些文件未在本 PR 中修改。

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.

1 participant