Skip to content

feat: doctor panel — runtime + MCP health checks#89

Open
varkart wants to merge 3 commits into
mainfrom
feat/doctor-panel
Open

feat: doctor panel — runtime + MCP health checks#89
varkart wants to merge 3 commits into
mainfrom
feat/doctor-panel

Conversation

@varkart

@varkart varkart commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Root cause fix: get_shell_path() spawns a login shell ($SHELL -l -c 'echo $PATH') to get the full user PATH. macOS GUI apps inherit a minimal PATH (/usr/bin:/bin:...) so npx, node, brew etc. were falsely reported as missing. Background notification checks now use this too.
  • doctor::report() returns a structured Vec<DoctorSection> with DoctorItem (id, label, status, detail, fixHint) — serialized to the frontend via new run_doctor IPC command
  • Three sections checked:
    • Environment — shell PATH dir count vs app PATH dir count
    • Runtimesnode, npx, python3, uv, docker, bun, deno
    • Active MCPs — command reachability + npm package presence (for non -y/--yes npx MCPs)
  • DoctorView — idle → running (spinner) → done (issue count badge). Each failing item shows a "Fix" toggle revealing a plain-English fix hint
  • Settings → Developer → Doctor nav entry

Test plan

  • CI passes
  • Open Settings → tap Doctor → Run — should show green for installed runtimes, error for missing ones with fix hints
  • Active MCP with npx and -y flag should show OK (auto-download, not flagged as missing)
  • npx not found false positive should be gone on machines with nvm/homebrew node

varkart added 3 commits July 1, 2026 17:53
- get_shell_path() spawns login shell to resolve full PATH (fixes 'npx not
  found' false positives in GUI apps that inherit minimal PATH)
- doctor::report() returns structured DoctorSection/DoctorItem for UI
- Checks: shell PATH dirs, 7 runtime binaries (node/npx/python3/uv/docker/
  bun/deno), each active MCP command, npm packages (non -y/--yes)
- run_doctor IPC command (async, re-detects tools fresh)
- DoctorView: idle/running/done states, green/warn/error icons, expandable
  fix hints per item, issue count badge
- Settings: Doctor entry in Developer section navigates to DoctorView
- Background check() updated to use shell PATH too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant