fix: 托盘与 session-host 同生共死,并修正安装文档 - #26
Conversation
Second launches were dying on leftover session-host locks, and testers who followed the README hit pnpm / dsh / custom-path errors. - Bind session-host to a kill-on-close job and watch the tray parent pid - Adopt a healthy leftover control plane, otherwise kill only session-host - Signal ShowPanel on a second shortcut click instead of exiting silently - Let in-process DSH sessions yield the lock; the tray host ignores its own claim - Document installer auto-wiring, npx, and the real install directory - Ship 集成说明.txt from the installer and bump the package to 1.0.1
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
背景
飞哥在 v1.0.0 上测到二次启动
session-host exited early (1)、托盘图标没了但node.exe还在,以及 README 的dsh plugin add依赖 pnpm、写死默认路径、假定dsh已全局安装。根因不是固定端口 50067。session-host 本来就是
listen(0)。真正的死循环是:托盘进程没了,孙子进程node还占着injector.lock,再点快捷方式就会抢锁失败。改动
KILL_ON_JOB_CLOSE)把 session-host 绑到托盘上,并加--parent-pid看守/health通就接管,不通且持有者是session-host.mjs才杀掉(不杀 DSH)exit 0npx写法、自定义目录看集成说明.txtbeautiCode-Setup-1.0.0-win-x64.exe本机快捷方式验证
按安装包同一条命令启动(Hidden +
start-beauticode.ps1):session-host ready,/health open=true,注入锁存在show-panel event received,PID 不变,没有新 session-hostexited early验证中还修了两个现场 bug:PowerShell 不能给只读自动变量
$PID赋值;托盘自己的 claim 不能让 session-host 自杀。测试
npm test通过。