Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
src/cmd/htop.go
Outdated
| fmt.Printf("%sLaunching PowerShell process monitor (htop not found). Use Space/PageUp/PageDown to navigate and Ctrl+C to exit.%s\n", utils.Green, utils.Reset) | ||
|
|
||
| script := strings.Join([]string{ | ||
| "$ErrorActionPreference = 'Stop'", | ||
| "Write-Host 'Process list sorted by CPU usage. Press Ctrl+C to exit paging.'", | ||
| "Get-Process | Sort-Object -Property CPU -Descending | Select-Object -Property Id, ProcessName, CPU, PM, WS, StartTime -ErrorAction SilentlyContinue | Format-Table -AutoSize | Out-Host -Paging", |
There was a problem hiding this comment.
Avoid recommending Ctrl+C for PowerShell fallback
The PowerShell fallback prints instructions to exit with Ctrl+C, but the command handler does not install a signal handler or otherwise suppress SIGINT. On Windows, pressing Ctrl+C terminates the ServerCommander process itself, not just the PowerShell pager, so users who follow the prompt lose their entire session instead of returning to the console. The prompt (and docs) should suggest a non-destructive key such as q, or the implementation should trap SIGINT so the parent process survives.
Useful? React with 👍 / 👎.
Summary
htopcommand, including a PowerShell fallback when the binary is unavailablehtopinstalls still use the ServerCommander colorsTesting
https://chatgpt.com/codex/tasks/task_e_68f8fc09fd20832cada49dcc4efaeccc