fix(ui): enumerate codebase-memory-mcp processes on Windows#955
Open
EightDoor wants to merge 1 commit into
Open
fix(ui): enumerate codebase-memory-mcp processes on Windows#955EightDoor wants to merge 1 commit into
EightDoor wants to merge 1 commit into
Conversation
Windows handle_processes previously returned an empty processes array
because it only queried the current process via GetProcessMemoryInfo/
GetProcessTimes. POSIX uses popen("ps") to enumerate all instances.
Add process enumeration via CreateToolhelp32Snapshot + Process32First/
Process32Next to find all codebase-memory-mcp.exe processes, query per-
process CPU/memory/elapsed time via OpenProcess + GetProcessTimes +
GetProcessMemoryInfo, and return them in the JSON response.
Closes DeusData#50
2 tasks
Owner
|
Thanks for taking the Windows UI process-list gap. Triage: Windows local-UI bug for #950, normal priority. Review focus is access-denied handling, stable JSON shape, and avoiding exposure of more process detail than the UI needs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Windows, the Control Panel's Active Processes tab always shows empty because
handle_processesinsrc/ui/http_server.conly queries the current process viaGetProcessMemoryInfo/GetProcessTimesand returns"processes":[]. The POSIX path usespopen("ps")to enumerate allcodebase-memory-mcpinstances.Closes #50
Solution
Added Windows process enumeration via
CreateToolhelp32Snapshot+Process32First/Process32Nextto find allcodebase-memory-mcp.exeinstances. For each matching process:OpenProcesswithPROCESS_QUERY_INFORMATION | PROCESS_VM_READGetProcessTimes(user + system)GetProcessMemoryInfo(WorkingSetSize)is_selfflagChanges
src/ui/http_server.c: Added#include <tlhelp32.h>and ~70 lines of process enumeration logicEdge Cases Handled
OpenProcessfailure (skips process)GetProcessMemoryInfo/GetProcessTimesfailure (zeros fallback)CreateToolhelp32Snapshotfailure (returns empty array)Test Plan
build-windows/build-windows-arm64jobs compile successfullycodebase-memory-mcpinstances, verify Active Processes tab shows all instances with CPU/memory/elapsed values