fix(windows): improve Windows desktop experience (batch 1)#16
fix(windows): improve Windows desktop experience (batch 1)#16bingweisi wants to merge 1 commit intoqiuzhi2046:mainfrom
Conversation
1. Minimize to system tray on close (Windows)
- Previously Windows quit the app on window close while macOS hid to Dock.
- Now all platforms minimize to tray on close, consistent UX.
2. Broadcast WM_SETTINGCHANGE after PATH refresh (Windows)
- After reading PATH from registry, broadcast WM_SETTINGCHANGE so other
processes (explorer, new terminals) pick up PATH changes immediately
without requiring a reboot or re-login.
- Prefer pwsh (PowerShell 7+) over Windows PowerShell 5.1 for speed.
3. Add winget/chocolatey fallback for skill dependency install (Windows)
- Previously Windows only tried npx, with no package manager fallback.
- Now tries winget first, then chocolatey as fallback, matching the
macOS npx -> brew pipeline.
代码评审意见✅ 总体评价代码质量很高!这个 PR 填补了 Qclaw 在 Windows 平台的关键功能空白,特别是:
|
| 位置 | 建议 | 优先级 |
|---|---|---|
ipc-handlers.ts:1164 |
如果 winget 安装失败,可以考虑自动 fallback 到 choco,而不是直接提示无法安装 | 低 |
cli.ts:3650 |
shell: true 可能不必要,因为已经在 spawn 中指定了 powershell |
低 |
结论
LGTM 👍 建议合并!
评审人: @jiaweisibot (甲维斯)
|
Thanks for the review @jiaweisibot! 👋 Re the two suggestions:
Thanks again! 🙃 |
|
你好!感谢你在 Windows 体验改进上的出色工作!我在 PR #14 中也做了一些 Windows 平台适配:
我们的改动侧重底层 CLI 和路径发现,与你的 batch 1(tray minimize, PATH broadcast 等)互补。合并时注意 cli.ts 和 runtime-path-discovery.ts 可能有冲突。 详见 PR: #14 |
|
@jiaweisibot 感谢您如此详细的评审!🙏 ✅ 非常高兴评审通过您的评价让我很欣慰!特别是对 Windows 平台功能填补的认可,这正是我们做这些改进的初衷。 🛠️ 已处理的小建议您提到的两个问题我都已经处理并推送了更新:
🤝 关注交叉 PR关于 @sjkncs 的 PR #14,看起来我们的工作确实有重叠部分:
虽然可能在 \cli.ts\ 和 再次感谢您的 LGTM!🎉 |
|
@qiuzhi2046 您好!关于 PR #16 和 #24,两个 PR 都已获得 @jiaweisibot 的 LGTM 评审通过,建议可以合并了。这些改进对 Windows 用户体验很重要,盼复! 🙃 |
Summary
Three improvements to close the Windows UX gap with macOS:
1. Minimize to system tray on close (Windows)
Previously, closing the window on Windows would quit the entire app, while macOS hid to Dock. Now all platforms consistently minimize to the system tray on window close.
Files: electron/main/index.ts
2. Broadcast WM_SETTINGCHANGE after PATH refresh (Windows)
After reading PATH from the Windows registry, we now broadcast WM_SETTINGCHANGE via SendMessageTimeout(HWND_BROADCAST) so other processes (explorer, new terminal sessions, etc.) immediately pick up PATH changes without requiring a reboot or re-login.
Also prefers pwsh (PowerShell 7+) over Windows PowerShell 5.1 for faster registry reads.
Files: electron/main/cli.ts
3. Add winget/chocolatey fallback for skill dependency install (Windows)
Previously on Windows, skill dependencies could only be installed via
px. If that failed, there was no fallback. On macOS, the pipeline is
px → brew → prompt.
Now Windows follows the same pattern:
px → winget → chocolatey → prompt.
Files: electron/main/ipc-handlers.ts
Testing
Related Issues
Related to #15 (Windows core experience optimization)