Repository navigation
Fix windows build failure - #8504
Conversation
- node-pty's Windows agent throws when kill() is called with a signal argument; route all pty.kill() calls through killPtyProcess(), which drops the signal on win32 and forwards it on POSIX
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughPTY termination is centralized through a platform-aware helper. Windows calls 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/relay/pty-handler.test.ts (1)
1021-1041: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for the remaining Windows cleanup paths.
This test validates graceful shutdown, but the change also affects immediate shutdown, stale-spawn cleanup, the SIGKILL fallback, and
dispose(). Add parameterized or focused cases for those paths so a future call-site regression cannot pass unnoticed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f2f34a46-8ba8-4534-9f0a-a5b686856ef9
📒 Files selected for processing (2)
src/relay/pty-handler.test.tssrc/relay/pty-handler.ts
Replace the single graceful-shutdown test with a suite covering every place killPtyProcess is invoked (graceful/immediate shutdown, stale-spawn cleanup, SIGKILL fallback timers, and dispose), so a future regression that reintroduces a signal argument on any Windows code path is caught.
* Fix PTY shutdown crash on Windows by dropping unsupported signals - node-pty's Windows agent throws when kill() is called with a signal argument; route all pty.kill() calls through killPtyProcess(), which drops the signal on win32 and forwards it on POSIX * Expand Windows PTY kill-signal-drop test coverage to all call sites Replace the single graceful-shutdown test with a suite covering every place killPtyProcess is invoked (graceful/immediate shutdown, stale-spawn cleanup, SIGKILL fallback timers, and dispose), so a future regression that reintroduces a signal argument on any Windows code path is caught.
Summary
Describe the user-visible change.
Screenshots
No visual change.Testing
pnpm lintpnpm typecheckpnpm testpnpm buildAI Review Report
Summarize the code review you ran with your AI coding agent. Include the main risks it checked, what it flagged, and what you changed or verified as a result.
Confirm that the review explicitly checked cross-platform compatibility for macOS, Linux, and Windows, including shortcuts, labels, paths, shell behavior, and any Electron-specific platform differences touched by this PR.
Security Audit
Provide a basic security audit summary from your AI coding agent. Call out any input handling, command execution, path handling, auth, secrets, dependency, or IPC risks that were reviewed, plus any follow-up needed.
Notes
Call out any platform-specific behavior, risks, or follow-up work.