现象
用「远程输入」功能时,手机端永远看不到本次识别/润色的最终文字——状态会更新(识别中/润色中/完成),但结果文本区一直空着。
根因(已读源码确认)
remote_server/mod.rs 的 WS handler 订阅了 "remote:result" 并把 {type:"result", text} 转发给手机,H5(app.js 的 case "result" → showResult,#result-wrap)也准备好了显示。但全仓 grep 没有任何一处 emit("remote:result", ...)——这个事件从来没被发出过,所以手机端的结果区永远空。
修法(单一职责)
在听写 finalize(coordinator/dictation.rs,history.append_with_retention 之后)emit 最终文字 polished 到 "remote:result",与同函数里已有的 app.emit("vocab:updated", ...) 同模式:
if !polished.trim().is_empty() {
if let Some(app) = inner.app.lock().clone() {
let _ = app.emit("remote:result", polished.clone());
}
}
无手机连接时该事件无人转发 = 无害空操作。
验证
本地编译通过;需手机真机验证:远程输入一次,手机结果区出现最终文字。
来源:2026-06-16 全仓多 Agent 审计(remote_server 专项)。注:审计另发现「任意 WS 关闭无条件 cancel_remote_dictation(双手机/重连时会取消他人听写)」,属另一独立 bug,单独跟进。
现象
用「远程输入」功能时,手机端永远看不到本次识别/润色的最终文字——状态会更新(识别中/润色中/完成),但结果文本区一直空着。
根因(已读源码确认)
remote_server/mod.rs的 WS handler 订阅了"remote:result"并把{type:"result", text}转发给手机,H5(app.js的case "result"→showResult,#result-wrap)也准备好了显示。但全仓 grep 没有任何一处emit("remote:result", ...)——这个事件从来没被发出过,所以手机端的结果区永远空。修法(单一职责)
在听写 finalize(
coordinator/dictation.rs,history.append_with_retention之后)emit 最终文字polished到"remote:result",与同函数里已有的app.emit("vocab:updated", ...)同模式:无手机连接时该事件无人转发 = 无害空操作。
验证
本地编译通过;需手机真机验证:远程输入一次,手机结果区出现最终文字。