Commit c05f80a
committed
🐛 Fix CLI regressions across JSON, help, and TDD
Running the real CLI exposed failures at the boundaries users actually consume: command routing showed misleading help, JSON mode could leak human text to stdout, TDD lifecycle commands were unsafe around explicit ports, preview/upload errors were hidden behind auth, and status could fail on optional preview metadata from the API.
Covered and fixed:
- Command routing and help: unknown root/nested commands now fail with the right recovery hints, root help categorizes built-ins correctly, TDD help shows full command paths, documents lifecycle --port flags, and hides internal --daemon-child.
- JSON contracts: command validation, commander errors, TDD commands, noisy child processes, run --json --wait, and status --json now keep stdout machine-readable and move child/user noise to stderr.
- TDD daemon lifecycle: start/status/stop/list now respect explicit ports, isolated VIZZLY_HOME state, stale daemon files, registry-backed daemons, and wrong-port no-ops without killing or cleaning unrelated processes.
- TDD/run UX: one-shot runs suppress human summaries in JSON mode, avoid pointing build-backed static runs at a live dashboard, and preserve the static report path users need after local review.
- Preview/upload/config/review/status CLI paths: preview and upload validate local paths before auth, config and review have real CLI coverage, upload rejects missing or non-directory inputs clearly, and status returns preview: null when the API has no preview metadata.
- Test coverage: added CLI-boundary tests that run the actual command entrypoint against local workspaces and local HTTP API servers instead of mocking internal modules.1 parent 36a2b2c commit c05f80a
26 files changed
Lines changed: 1878 additions & 295 deletions
File tree
- src
- commands
- tdd
- test-runner
- utils
- tests
- cli
- commands
- test-runner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
209 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
0 commit comments