Skip to content

fix(remote-input): 开关已开时启动也要拉起局域网服务 - #1002

Merged
H-Chris233 merged 8 commits into
Open-Less:betafrom
zhou-zhichao:fix/remote-input-start-on-launch
Aug 27, 2026
Merged

fix(remote-input): 开关已开时启动也要拉起局域网服务#1002
H-Chris233 merged 8 commits into
Open-Less:betafrom
zhou-zhichao:fix/remote-input-start-on-launch

Conversation

@zhou-zhichao

@zhou-zhichao zhou-zhichao commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 远程输入只在设置开关/端口变化时 refresh_remote_server。启动时即使 remoteInputEnabled 已是 true,8443 也不会监听。
  • 用户看到开关开着,但没有访问网址和配对码,手机打不开页面。
  • 启动时放到 RunEvent::Ready 再 refresh,避免 Windows 上 setup 阶段的异步任务还没跑起来就被丢掉。
  • Windows 上枚举网卡 / 调 Tauri path API 会卡住(NordVPN / QuickFox 等),PIN 和证书改到 spawn_blocking,局域网 IP 用 UDP 路由探测,不再走 list_afinet_netifas
  • 设置页一挂载就会同步调用 set_remote_locale;这里再 run_on_main_thread 刷托盘会和 WebView 互相等,窗口变成「未响应」。语言同步只改 locale,不再刷托盘。
  • 远程听写原先会打开电脑麦克风,也没把手机 PCM 接到 ASR,Safari 录音等于丢掉。开会话时挂上 deferred bridge,远程会话不再走本机采集设备。

Test plan

  • 打开远程输入,确认出现访问网址和配对码
  • 完全退出再打开 OpenLess,开关仍开时 8443 自动在听,网址还在
  • 关掉开关后重启,服务不再监听
  • Windows 进设置不再未响应(尤其装了 VPN 时)
  • 同一局域网手机能打开页面并配对录音
  • 手机录音时电脑用的是手机麦,不是本机阵列麦;识别结果来自手机音频

zhou-zhichao and others added 8 commits August 25, 2026 16:43
Toggling the setting only refreshed the server on a prefs change. After restart the switch stayed on but port 8443 never bound, so the phone page could not open.
On Windows, NIC enumeration and Tauri path APIs from the async runtime can stall the LAN server, and set_remote_locale's main-thread tray refresh deadlocks the settings page. Start the server on Ready and keep those calls off the UI thread.
Remote dictation still opened the computer microphone and never assigned
the phone sink, so Safari audio was dropped. Arm a deferred bridge on
start and skip the local capture device for remote sessions.
@H-Chris233
H-Chris233 merged commit fc9824e into Open-Less:beta Aug 27, 2026
4 checks passed
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.

2 participants