Skip to content

feat: add doctor command#883

Open
thymikee wants to merge 7 commits into
mainfrom
codex/doctor-command
Open

feat: add doctor command#883
thymikee wants to merge 7 commits into
mainfrom
codex/doctor-command

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Add a read-only doctor command for RN/Expo/Metro preflight checks, with progressive human output and JSON evidence.

Closes #874

Validation

Verified with focused unit coverage for CLI parsing/output/progress, provider-backed doctor scenarios, Apple device ordering tests, static type/lint checks, build, and live CLI smoke for devices/doctor selection.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.3 MB 1.4 MB +12.4 kB
JS gzip 436.5 kB 440.7 kB +4.2 kB
npm tarball 574.4 kB 578.9 kB +4.5 kB
npm unpacked 1.9 MB 2.0 MB +12.6 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 26.0 ms 26.2 ms +0.2 ms
CLI --help 46.1 ms 45.8 ms -0.3 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/session.js +9.0 kB +3.0 kB
dist/src/2948.js +2.0 kB +683 B
dist/src/9919.js +327 B +84 B
dist/src/cli-help.js +168 B +46 B
dist/src/cli.js +51 B +21 B

@thymikee

thymikee commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

I do not see a routing blocker in the doctor command path: the command facet projects through the daemon registry, and the Android probes still run under the request-scoped provider path via the adb executor scope.

One thing I would address before merge: src/daemon/handlers/session-doctor.ts lands as a 571-line handler and mixes option parsing, session/device selection, app discovery, Android foreground/reverse/animation probes, RN overlay checks, Metro probing, output ordering, and progress emission. The repo agent guide asks us to extract focused submodules once implementation files grow past 500 LOC. Please split the probe families out before merge, for example keeping session-doctor.ts as the orchestrator and moving Android/Metro/RN checks into focused session-doctor-* modules or a small doctor-checks/ group. That will make follow-up doctor checks reviewable without growing the handler further.

@thymikee thymikee force-pushed the codex/doctor-command branch from 729bdfb to 484bad5 Compare June 25, 2026 20:14
@thymikee

Copy link
Copy Markdown
Member Author

Re-check after the latest push: this still needs the split before I would call it merge-ready. src/daemon/handlers/session-doctor.ts is now 599 LOC, and the Android/Metro/RN/session/device checks are still all in that handler. CI is green and the route/provider coverage looks fine, but the previous maintainability finding is unresolved.

@thymikee

Copy link
Copy Markdown
Member Author

GitHub now reports this branch as conflicted against main after #884 merged. Please rebase, resolve the conflicts, and reply with what changed plus any validation you reran. I am holding re-review until the branch is clean again.

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.

feat: add RN/Expo/Metro-aware doctor command

1 participant