You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐛 Fix CLI regressions across JSON, help, and TDD (#296)
## Why
The CLI had several rough edges at the boundaries users rely on most:
command errors could show misleading help, JSON mode could mix
machine-readable output with human text, TDD lifecycle commands were not
careful enough around explicit ports, and some commands hid local
validation failures behind auth or optional API state.
That makes the CLI feel unreliable in automation and confusing in local
workflows. This PR tightens those paths so exposed commands fail
clearly, preserve their output contracts, and avoid touching unrelated
local processes or config state.
It also removes the old global TDD `server.json` compatibility path.
Local TDD discovery is now project-local or explicit, which matches the
current daemon registry model and avoids carrying forward a second
server-discovery contract.
## What Changed
- Fixed command routing and help behavior so unknown root and nested
commands fail with the right recovery hints.
- Cleaned up root/TDD help output, including full nested command paths,
documented lifecycle `--port` flags, and hidden internal daemon-only
flags.
- Preserved JSON-mode contracts for validation errors, commander errors,
TDD commands, noisy child processes, `run --json --wait`, `upload --wait
--json`, review actions, and `status --json`.
- Made TDD daemon `start`, `status`, `stop`, and `list` safer around
explicit ports, isolated `VIZZLY_HOME`, stale files, registry entries,
and wrong-port no-ops.
- Removed the legacy global TDD `server.json` write/cleanup path so
daemon state is no longer mirrored into the user home directory.
- Validated preview/upload local paths before requiring auth so local
mistakes are reported immediately.
- Made `status` tolerate builds without preview metadata by returning
`preview: null` instead of failing.
- Updated in-repo docs, Swift SDK docs, Vizzly skill references, and the
JSON output reference so the documented workflows match the CLI
behavior.
- Added CLI-boundary regression tests that run the real command
entrypoint against local workspaces and local HTTP API servers.
## Impact
This should make the CLI more predictable for both local use and
automation. JSON stdout stays parseable, help/error output points users
to the right command, TDD lifecycle commands avoid unrelated processes,
local validation errors are surfaced before network/auth concerns, and
SDK server discovery no longer depends on a stale global file.
The `configure()` function replaces standard browser launchers (Chrome, Firefox, Safari) with Playwright-powered launchers that can capture screenshots. Browsers run in **headless mode by default**.
37
+
The `configure()` function maps standard Testem launchers (Chrome, Firefox,
38
+
Safari) to Playwright-powered Chromium, Firefox, and WebKit launchers that can
39
+
capture screenshots. Browsers run in **headless mode by default**.
35
40
36
41
> **Note for Ember + Vite projects**: The `cwd: 'dist'` option is required because Vite builds test files into the `dist/` directory. Without this, Testem won't find your test assets.
Open the dashboard at **http://localhost:47392/dashboard** to see visual comparisons, accept/reject changes, and review differences.
91
+
Open the dashboard URL printed by `vizzly tdd start` to see visual comparisons,
92
+
accept/reject changes, and review differences.
93
+
94
+
For a one-off local run, wrap your `xcodebuild` command:
95
+
96
+
```bash
97
+
vizzly tdd run \
98
+
"xcodebuild test -scheme MyApp -destination 'platform=iOS Simulator,name=iPhone 15'" \
99
+
--no-open
100
+
```
101
+
102
+
That writes local review data under `.vizzly/`. If screenshots were captured,
103
+
Vizzly also creates `.vizzly/report/index.html`; omit `--no-open` when you want
104
+
the report opened automatically.
90
105
91
106
## Usage Examples
92
107
@@ -288,10 +303,11 @@ The SDK automatically discovers a running Vizzly TDD server using this priority
288
303
289
304
1.**VIZZLY_SERVER_URL environment variable** - Explicitly set server URL
290
305
2.**Project server file** - `.vizzly/server.json` in the current directory
291
-
3.**Global server file** - `~/.vizzly/server.json` written by CLI
292
-
4.**Default port health check** - Tests `http://localhost:47392/health`
306
+
3.**Default port health check** - Tests `http://localhost:47392/health`
293
307
294
-
When you run `vizzly tdd start`, the CLI automatically writes server info to `~/.vizzly/server.json` in your home directory, enabling zero-config discovery from iOS tests.
308
+
When you run `vizzly tdd start`, the CLI writes server info to
309
+
`.vizzly/server.json` in your project. Run UI tests from the project checkout,
310
+
or set `VIZZLY_SERVER_URL` explicitly when your test process starts elsewhere.
0 commit comments