* fix(windows): 修复 #466 #468 #469 IME 切回 / 静默启动 / QA 焦点 + #470 capsule 诊断 (#471)
集中修复 4 个 Windows-only bug:
- #469 IME 切不回 — restore_profile 对称补 legacy TSF ChangeCurrentLanguage + ActivateLanguageProfile,回归点是 c3b59329 升级激活路径时漏改恢复路径。现代 ActivateProfile 失败降为 warn(legacy 已完成视觉切回)。
- #468 Win11 静默启动失效 — single-instance 回调读 start_minimized,true 时跳过 show_main_window;托盘 / CLI intent 路径不受影响。
- #466 QA 弹窗 X/ESC 关不掉 — Win 上从 SW_SHOWNOACTIVATE 切到 Tauri window.show + set_focus,让 webview 拿键盘焦点。配套 focus-dance:begin_qa_session 抓选区前临时把焦点还给用户原 app,抓完再 refocus QA;多轮场景下用 GetWindowThreadProcessId 区分本进程窗口,刷新 qa_focus_target,避免 stale HWND。
- #470 录音胶囊不显示 — 加 per-process 一次性诊断 log(CapsuleState 用 capsule_state_log_name 显式短名,不走 Debug 防字段扩展时泄露),下次能直接定位 prefs / state / Win32 哪一环失败。
pr_agent 五轮迭代到 No major issues + No security concerns;Cloud 评审建议的 begin_qa_session 双锁 TOCTOU 已合并为单 scope。三平台 build + pr_agent CI 全绿。
#470 没标 closes,是 refs—需要真机日志才能定位真因,先 ship 诊断手段。
* chore(release): bump version to 1.3.4-3 (Beta) — Windows #466 #468 #469 修复
* fix(settings-ui): 权限页徽章不换行 + 本地 ASR 区块 Win 灰显
权限页 (Settings → 快捷键 → 权限):
- Pill 组件加 whiteSpace:nowrap + flexShrink:0 → "已安装"徽章在 Win
窄宽下不再被挤成 3 行(每个汉字一行)。
- 行内 message span 加 whiteSpace:nowrap + overflow:hidden +
textOverflow:ellipsis + minWidth:0 → 长文本("Windows 低层键盘 hook
已安装")超宽时省略号收尾,徽章保持完整。
- zh-CN 描述大段精简:descAcc / descNoAcc / micDesc / accDesc /
hotkeyDesc / networkDesc / windowsImeDesc / windowsIme.* 都改短,
减少 Win 上拥挤感(用户反馈 zh 文案过长)。
高级页 (Settings → 高级 → 本地 ASR):
- Windows 上把"本地 ASR 模型(实验性)"标题区 + 警告小字 + Qwen3 行
整组 opacity:0.45 灰显 —— Qwen3 在 Win 是 stub 不支持,那条"实验性"
主线在 Win 没意义;用户视觉关注点应落到下方独立的 Foundry 行(Foundry
保持正常颜色)。Toggle 的 disabled 行为已经在原 onToggle 条件里,本次
纯加视觉灰显。
* fix(windows): 前端 App.tsx 在 show 主窗口前读 startMinimized 兜底
#471 在 Rust 端 setup() / single-instance callback 都加了 start_minimized
suppression,本机日志确认 Rust 路径完全正确("[main] start_minimized=true
→ 跳过初始 show")。但用户在 Win11 1.3.4-3 上仍然「重启进桌面那一刻主
窗口就出来了」。
定位到最后一条遗漏路径在前端:App.tsx 里 mount 时一条 useEffect 无条件
通过 IPC 调 `getCurrentWindow().show()`,把 Rust 端已经 suppress 的窗口
又拉出来 —— 这条路径 Rust log 完全看不见(走的是 plugin-window 的
showWindow IPC,不经过我们的 show_main_window helper)。
那条 useEffect 当初是给 issue #163 引入的:Windows 权限探测可能死锁让
首屏卡灰,所以前端兜底 force show 一次。
修法:show 前先读 prefs.startMinimized,true 就 return。读 prefs 失败
(极少数情况)保持原 show 行为,不让 #163 的兜底语义丢失。
closes #468 (the actual one this time, Rust + JS 双端都收敛了)
---------
Co-authored-by: baiqing <lbx12309@icloud.com>
109 lines
3.1 KiB
TOML
109 lines
3.1 KiB
TOML
[package]
|
||
name = "openless"
|
||
version = "1.3.4-3"
|
||
description = "OpenLess — local voice input that types where your cursor is"
|
||
authors = ["OpenLess"]
|
||
edition = "2021"
|
||
rust-version = "1.77"
|
||
|
||
[lib]
|
||
name = "openless_lib"
|
||
crate-type = ["staticlib", "cdylib", "rlib"]
|
||
|
||
[build-dependencies]
|
||
tauri-build = { version = "2", features = [] }
|
||
# Compile vendored Open-Less/qwen-asr C sources for the local ASR engine on macOS.
|
||
cc = "1.1"
|
||
|
||
[dependencies]
|
||
# 锁 ~2.11 因为 npm @tauri-apps/api 与 plugin-dialog 都已升 2.11;
|
||
# tauri build 跨 minor 一致性检查会拒绝 npm 2.11 + Rust 2.10 的组合。
|
||
tauri = { version = "~2.11", features = ["macos-private-api", "tray-icon"] }
|
||
tauri-plugin-shell = "2"
|
||
tauri-plugin-updater = "2"
|
||
tauri-plugin-single-instance = "2"
|
||
tauri-plugin-autostart = "2"
|
||
tauri-plugin-dialog = "2"
|
||
serde = { version = "1", features = ["derive"] }
|
||
serde_json = "1"
|
||
tokio = { version = "1", features = ["full"] }
|
||
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-native-roots"] }
|
||
futures-util = "0.3"
|
||
reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls", "native-tls", "stream", "system-proxy"] }
|
||
zip = "2"
|
||
thiserror = "1"
|
||
anyhow = "1"
|
||
log = "0.4"
|
||
env_logger = "0.11"
|
||
simplelog = "0.12"
|
||
parking_lot = "0.12"
|
||
once_cell = "1"
|
||
uuid = { version = "1", features = ["v4", "serde"] }
|
||
chrono = { version = "0.4", features = ["serde"] }
|
||
bytes = "1"
|
||
url = "2"
|
||
raw-window-handle = "0.6"
|
||
ferrous-opencc = "0.4"
|
||
|
||
# Hotkey + audio + insertion
|
||
global-hotkey = "0.6"
|
||
cpal = "0.15"
|
||
enigo = "0.2"
|
||
arboard = "3"
|
||
|
||
[target.'cfg(target_os = "macos")'.dependencies.keyring]
|
||
version = "3.6.3"
|
||
default-features = false
|
||
features = ["apple-native"]
|
||
|
||
[target.'cfg(target_os = "windows")'.dependencies.keyring]
|
||
version = "3.6.3"
|
||
default-features = false
|
||
features = ["windows-native"]
|
||
|
||
[target.'cfg(target_os = "linux")'.dependencies]
|
||
dbus = "0.9"
|
||
[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies.keyring]
|
||
version = "3.6.3"
|
||
default-features = false
|
||
features = ["linux-native-sync-persistent", "crypto-rust"]
|
||
|
||
[target.'cfg(target_os = "macos")'.dependencies]
|
||
block2 = "0.5"
|
||
core-foundation = "0.10"
|
||
core-graphics = "0.24"
|
||
objc2 = "0.5"
|
||
objc2-foundation = "0.2"
|
||
objc2-app-kit = "0.2"
|
||
# qwen-asr 用 malloc 分配返回字符串,必须用 C `free()` 释放。
|
||
libc = "0.2"
|
||
|
||
[target.'cfg(target_os = "windows")'.dependencies]
|
||
foundry-local-sdk = { version = "1.1.0", features = ["winml"] }
|
||
raw-window-handle = "0.6"
|
||
windows = { version = "0.58", features = [
|
||
"Win32_Foundation",
|
||
"Win32_Globalization",
|
||
"Win32_Graphics_Dwm",
|
||
"Win32_Graphics_Gdi",
|
||
"Win32_Media_Audio",
|
||
"Win32_Media_Audio_Endpoints",
|
||
"Win32_System_Com",
|
||
"Win32_System_Ole",
|
||
"Win32_System_Registry",
|
||
"Win32_System_Threading",
|
||
"Win32_UI_Input_KeyboardAndMouse",
|
||
"Win32_UI_Shell",
|
||
"Win32_UI_TextServices",
|
||
"Win32_UI_WindowsAndMessaging",
|
||
] }
|
||
winreg = "0.52"
|
||
|
||
# 跨平台磨砂层(macOS NSVisualEffectView / Windows Mica)。
|
||
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
|
||
window-vibrancy = "0.7"
|
||
|
||
[features]
|
||
default = ["custom-protocol"]
|
||
custom-protocol = ["tauri/custom-protocol"]
|