Skip to content

Commit c05f80a

Browse files
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

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ Use `vizzly init --agent-skill` to install only the local skill, or
4040

4141
### Start Local TDD
4242

43-
Start the TDD server, run your tests, and open the dashboard at
44-
`http://localhost:47392`.
43+
Start the TDD server, run your tests, and open the dashboard at the URL the
44+
command prints. Add `--open` when you want Vizzly to open the dashboard for
45+
you. If the default port is busy, Vizzly picks the next available port; use the
46+
printed `--port` value with `vizzly tdd status` or `vizzly tdd stop`.
4547

4648
```bash
47-
vizzly tdd start
49+
vizzly tdd start --open
4850
pnpm test -- --watch
4951
```
5052

@@ -206,7 +208,10 @@ export default {
206208
| Command | What it does |
207209
| --- | --- |
208210
| `vizzly tdd start` | Start the local TDD server and dashboard. |
209-
| `vizzly tdd run "cmd"` | Run tests once and generate a static visual report. |
211+
| `vizzly tdd status` | Check the local TDD server for this project. |
212+
| `vizzly tdd list` | List running local TDD servers. |
213+
| `vizzly tdd stop` | Stop the local TDD server for this project. |
214+
| `vizzly tdd run "cmd"` | Run tests once, generate a static visual report, and open it by default. |
210215
| `vizzly run "cmd"` | Run tests with cloud build and review integration. |
211216
| `vizzly context ...` | Fetch visual context for builds, comparisons, screenshots, and review queues. |
212217
| `vizzly upload <dir>` | Upload an existing folder of screenshots. |

0 commit comments

Comments
 (0)