@vizzly-testing/cli 0.35.2 → 0.35.3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api/endpoints.js +24 -3
- package/dist/api/index.js +1 -1
- package/dist/cli.js +16 -16
- package/dist/commands/comparisons.js +52 -45
- package/dist/commands/context.js +399 -135
- package/dist/commands/run.js +84 -29
- package/dist/commands/status.js +276 -59
- package/dist/commands/tdd.js +19 -3
- package/dist/context/local-workspace-provider.js +17 -7
- package/dist/reporter/reporter-bundle.css +1 -1
- package/dist/reporter/reporter-bundle.iife.js +5 -5
- package/dist/test-runner/operations.js +70 -28
- package/dist/types/index.d.ts +4 -2
- package/dist/uploader/core.js +6 -6
- package/dist/uploader/operations.js +4 -1
- package/dist/utils/visual-context-normalizers.js +446 -0
- package/package.json +3 -4
- package/skills/vizzly/SKILL.md +68 -101
- package/skills/vizzly/agents/openai.yaml +2 -2
- package/skills/vizzly/references/cli-context.md +75 -27
- package/skills/vizzly/references/dynamic-content.md +28 -33
- package/skills/vizzly/references/sdks.md +26 -39
- package/skills/vizzly/references/setup-ci.md +44 -20
- package/skills/vizzly/references/public-screenshots.md +0 -44
package/skills/vizzly/SKILL.md
CHANGED
|
@@ -1,107 +1,74 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vizzly
|
|
3
|
-
description: "
|
|
3
|
+
description: "Inspect, explain, and debug Vizzly visual regression evidence; use an existing Vizzly workflow before and after UI changes; add or adjust screenshot capture; troubleshoot local TDD or cloud builds; or configure Vizzly CI. Use when a task mentions Vizzly, screenshot baselines, comparisons, Honeydiff, visual review, dynamic regions, or a repository's Vizzly setup."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Vizzly
|
|
7
7
|
|
|
8
|
-
Vizzly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
vizzly
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
vizzly context build current --source local --agent --json
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
- Prefer existing E2E or user journeys over narrow screenshot-only specs.
|
|
76
|
-
- For dynamic content, inspect screenshot context before changing thresholds.
|
|
77
|
-
- Prefer deterministic test data, per-screenshot `threshold`, per-screenshot `minClusterSize`, hotspots, or confirmed regions over global tolerance changes.
|
|
78
|
-
- Report visual findings with screenshot names, build/comparison links when available, and the command you ran.
|
|
79
|
-
|
|
80
|
-
## Capturing Screenshots
|
|
81
|
-
|
|
82
|
-
Use the existing integration when one is present. For direct JavaScript capture:
|
|
83
|
-
|
|
84
|
-
```javascript
|
|
85
|
-
import { vizzlyScreenshot } from '@vizzly-testing/cli/client';
|
|
86
|
-
|
|
87
|
-
let screenshot = await page.screenshot();
|
|
88
|
-
await vizzlyScreenshot('checkout-form', screenshot, {
|
|
89
|
-
properties: {
|
|
90
|
-
browser: 'chromium',
|
|
91
|
-
viewport: 'desktop',
|
|
92
|
-
state: 'valid-card'
|
|
93
|
-
},
|
|
94
|
-
threshold: 2,
|
|
95
|
-
minClusterSize: 4
|
|
96
|
-
});
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Use `properties` to separate variants such as theme, locale, viewport, role, state, component, page, or docs/manual grouping.
|
|
100
|
-
|
|
101
|
-
## When You Need More Detail
|
|
102
|
-
|
|
103
|
-
- For SDK examples and capture patterns, read `references/sdks.md`.
|
|
104
|
-
- For CLI/context commands and JSON output, read `references/cli-context.md`.
|
|
105
|
-
- For dynamic content, thresholds, and hotspots, read `references/dynamic-content.md`.
|
|
106
|
-
- For public screenshot URLs and docs/manual images, read `references/public-screenshots.md`.
|
|
107
|
-
- For project setup and CI, read `references/setup-ci.md`.
|
|
8
|
+
Use Vizzly as visual evidence for user-facing changes. Keep the repository's
|
|
9
|
+
existing test workflow in charge of how the UI is exercised.
|
|
10
|
+
|
|
11
|
+
## Start From The Repository
|
|
12
|
+
|
|
13
|
+
1. Confirm that the repository uses Vizzly by checking its configuration,
|
|
14
|
+
dependencies, scripts, or existing `.vizzly` data.
|
|
15
|
+
2. Use the repository's established CLI invocation. The examples in this skill
|
|
16
|
+
use `vizzly`; substitute its package script, `pnpm exec vizzly`, or
|
|
17
|
+
`npx vizzly` when that is how the repository runs local binaries.
|
|
18
|
+
3. Do not install, initialize, log in, or change credentials unless the task
|
|
19
|
+
explicitly includes setup. Never print or persist a token.
|
|
20
|
+
|
|
21
|
+
## Follow The Evidence Loop
|
|
22
|
+
|
|
23
|
+
1. Choose the most relevant source:
|
|
24
|
+
- Use a supplied cloud build or comparison ID when the task names one.
|
|
25
|
+
- Use existing local context when `.vizzly` contains the run under review.
|
|
26
|
+
- Generate fresh evidence through the repository's existing visual test
|
|
27
|
+
workflow when stored evidence may be stale or absent.
|
|
28
|
+
2. Request the bounded, machine-readable build context:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
vizzly context build current --source local --agent --json
|
|
32
|
+
vizzly context build <build-id> --source cloud --agent --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
3. Check the build identity, source, branch, timestamps, baseline selection,
|
|
36
|
+
review state, and truncation fields before interpreting the evidence. Treat
|
|
37
|
+
omitted fields as unknown.
|
|
38
|
+
4. Inspect the current, baseline, and diff images together using whatever
|
|
39
|
+
image, browser, URL, or local-file capability is available. If an image is
|
|
40
|
+
inaccessible, say so and do not infer its visual contents from metadata.
|
|
41
|
+
5. Read viewport, browser, screenshot metadata, review state, and Honeydiff
|
|
42
|
+
facts alongside the images. Follow the returned `suggested_commands` for
|
|
43
|
+
exact comparison or screenshot drill-downs. Request raw diff regions only
|
|
44
|
+
when the compact summary is insufficient.
|
|
45
|
+
6. Separate observations from explanations. State what the evidence shows,
|
|
46
|
+
then label any proposed cause with appropriate confidence.
|
|
47
|
+
7. Make the smallest justified UI or test change, rerun the owning user
|
|
48
|
+
workflow, and inspect the resulting evidence again.
|
|
49
|
+
|
|
50
|
+
## Guardrails
|
|
51
|
+
|
|
52
|
+
- Treat an approved baseline as the accepted reference for that comparison,
|
|
53
|
+
not infallible truth. Check its identity and selection reason.
|
|
54
|
+
- Do not invent progress, counts, review state, visual causes, or missing API
|
|
55
|
+
values.
|
|
56
|
+
- Do not approve, reject, comment on, publish, or replace visual evidence
|
|
57
|
+
unless the user explicitly asks for that mutation.
|
|
58
|
+
- Preserve existing thresholds, cluster sizes, signature properties, and
|
|
59
|
+
dynamic-region behavior unless the task and evidence justify changing them.
|
|
60
|
+
- Prefer deterministic fixtures and existing end-to-end journeys over hiding a
|
|
61
|
+
diff with broader tolerances or a new screenshot-only test.
|
|
62
|
+
- Report the screenshot or comparison identity, the relevant build or link,
|
|
63
|
+
the observed evidence, any access limitations, and the command used.
|
|
64
|
+
|
|
65
|
+
## Load References Only When Needed
|
|
66
|
+
|
|
67
|
+
- Read [references/cli-context.md](references/cli-context.md) for local and
|
|
68
|
+
cloud inspection commands, TDD lifecycle, and evidence drill-downs.
|
|
69
|
+
- Read [references/sdks.md](references/sdks.md) only when adding or changing
|
|
70
|
+
screenshot capture code.
|
|
71
|
+
- Read [references/dynamic-content.md](references/dynamic-content.md) when a
|
|
72
|
+
diff may involve unstable content, hotspots, or confirmed regions.
|
|
73
|
+
- Read [references/setup-ci.md](references/setup-ci.md) only when the task asks
|
|
74
|
+
to initialize Vizzly, change CI, or troubleshoot configuration.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Vizzly"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use
|
|
3
|
+
short_description: "Inspect and debug visual changes with Vizzly"
|
|
4
|
+
default_prompt: "Use $vizzly to inspect the visual evidence for this UI change and explain what changed."
|
|
@@ -1,48 +1,96 @@
|
|
|
1
1
|
# CLI And Context
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use the repository's existing CLI invocation. The examples use `vizzly` for
|
|
4
|
+
brevity; substitute the repository's package script or package-manager command
|
|
5
|
+
when needed.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Use existing authentication and project configuration. If cloud authentication
|
|
8
|
+
is missing, report the blocker. Do not start an interactive login or change
|
|
9
|
+
credentials unless the task includes setup.
|
|
10
|
+
|
|
11
|
+
## Inspect Existing Local Evidence
|
|
12
|
+
|
|
13
|
+
Request structured local evidence with both `--agent` and `--json`:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
vizzly context build current --source local --agent --json
|
|
17
|
+
vizzly context screenshot "<screenshot-name>" --source local --json
|
|
18
|
+
vizzly context review-queue --source local --json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Pin hand-written local drill-downs with `--source local`. Without it, automatic
|
|
22
|
+
source resolution may fall back to cloud data when a local item is unavailable.
|
|
23
|
+
|
|
24
|
+
Local context reads persisted `.vizzly` artifacts. Confirm that their build,
|
|
25
|
+
branch, timestamp, and baseline match the task before treating them as current.
|
|
26
|
+
|
|
27
|
+
## Generate Fresh Local Evidence
|
|
28
|
+
|
|
29
|
+
For a one-off run, let Vizzly own the complete local session:
|
|
6
30
|
|
|
7
31
|
```bash
|
|
8
|
-
vizzly tdd
|
|
9
|
-
vizzly tdd status
|
|
10
|
-
vizzly tdd stop
|
|
11
|
-
vizzly tdd run "<test command>" --no-open
|
|
12
|
-
vizzly context build current --source local --agent
|
|
32
|
+
vizzly tdd run "<existing visual test command>" --no-open
|
|
13
33
|
vizzly context build current --source local --agent --json
|
|
14
34
|
```
|
|
15
35
|
|
|
16
|
-
|
|
17
|
-
`tdd status --port <port>` and `tdd stop --port <port>`.
|
|
36
|
+
For repeated test runs, start the detached daemon once:
|
|
18
37
|
|
|
19
|
-
|
|
20
|
-
|
|
38
|
+
```bash
|
|
39
|
+
vizzly tdd start --json
|
|
40
|
+
vizzly tdd status --json
|
|
41
|
+
<existing visual test command>
|
|
42
|
+
vizzly context build current --source local --agent --json
|
|
43
|
+
vizzly tdd stop --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Treat `tdd run` and `tdd start` as alternatives. Do not shell-background
|
|
47
|
+
`tdd start`; it already launches a detached daemon. Stop only a server started
|
|
48
|
+
for the current task, and reuse the printed port for status or stop commands
|
|
49
|
+
when Vizzly selects a non-default port.
|
|
50
|
+
|
|
51
|
+
## Inspect Cloud Evidence
|
|
21
52
|
|
|
22
|
-
|
|
53
|
+
When the task already has a build ID:
|
|
23
54
|
|
|
24
55
|
```bash
|
|
25
|
-
|
|
26
|
-
vizzly
|
|
27
|
-
vizzly context build <build-id> --agent --json --include diffs,comments
|
|
56
|
+
vizzly status <build-id> --json
|
|
57
|
+
vizzly context build <build-id> --source cloud --agent --json
|
|
28
58
|
```
|
|
29
59
|
|
|
30
|
-
|
|
60
|
+
Use status for server-owned lifecycle, processing, comparison, and review
|
|
61
|
+
facts. Use build context for visual debugging.
|
|
31
62
|
|
|
32
|
-
|
|
63
|
+
When creating a cloud build is in scope, wrap the repository's existing test
|
|
64
|
+
command:
|
|
33
65
|
|
|
34
66
|
```bash
|
|
35
|
-
vizzly
|
|
36
|
-
vizzly context
|
|
37
|
-
vizzly context similar <fingerprint-hash> --json
|
|
38
|
-
vizzly context review-queue --json
|
|
67
|
+
vizzly run "<existing visual test command>" --wait --json
|
|
68
|
+
vizzly context build <build-id> --source cloud --agent --json
|
|
39
69
|
```
|
|
40
70
|
|
|
41
|
-
|
|
71
|
+
## Read And Drill Into Evidence
|
|
42
72
|
|
|
43
|
-
|
|
73
|
+
For each evidence record:
|
|
74
|
+
|
|
75
|
+
1. Inspect the current, baseline, and diff images with an available harness
|
|
76
|
+
capability. State the limitation if an image cannot be accessed.
|
|
77
|
+
2. Read render metadata, review state, and compact Honeydiff diagnostics next
|
|
78
|
+
to the images.
|
|
79
|
+
3. Run the returned `suggested_commands` instead of reconstructing identifiers
|
|
80
|
+
or URLs.
|
|
81
|
+
4. Add `--include diffs` only when raw Honeydiff region geometry is needed.
|
|
82
|
+
Request comments only when human review context matters.
|
|
83
|
+
|
|
84
|
+
Useful manual drill-downs are:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
vizzly context comparison <comparison-id> --source <local-or-cloud> --json
|
|
88
|
+
vizzly context screenshot "<screenshot-name>" --source <local-or-cloud> --json
|
|
89
|
+
vizzly context similar <fingerprint-hash> --source cloud --json
|
|
90
|
+
vizzly context review-queue --source <local-or-cloud> --json
|
|
91
|
+
```
|
|
44
92
|
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
93
|
+
Use the source from the evidence you are inspecting in place of
|
|
94
|
+
`<local-or-cloud>`. `context similar` is cloud-only. Keep missing values
|
|
95
|
+
unknown, and do not turn metadata into a visual conclusion when the underlying
|
|
96
|
+
images are unavailable.
|
|
@@ -1,44 +1,39 @@
|
|
|
1
1
|
# Dynamic Content
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Treat dates, timers, randomized data, API-backed content, generated images, and
|
|
4
|
+
responsive text as possible causes of change, not automatic explanations.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Diagnose Before Tuning
|
|
6
7
|
|
|
7
|
-
1.
|
|
8
|
-
2. Inspect screenshot context before changing code:
|
|
8
|
+
1. Inspect screenshot history and the actual image evidence:
|
|
9
9
|
|
|
10
|
-
```bash
|
|
11
|
-
vizzly context screenshot "<screenshot-name>" --json
|
|
12
|
-
```
|
|
10
|
+
```bash
|
|
11
|
+
vizzly context screenshot "<screenshot-name>" --source <local-or-cloud> --json
|
|
12
|
+
```
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
4. Use hotspots or confirmed regions for recurring valid dynamic regions.
|
|
14
|
+
2. Replace `<local-or-cloud>` with the source of the evidence being diagnosed.
|
|
15
|
+
Record the observed region, recurrence, render metadata, and whether the
|
|
16
|
+
same change appears across builds or variants.
|
|
17
|
+
3. Check whether deterministic fixtures can remove irrelevant variation.
|
|
18
|
+
4. Treat hotspots and confirmed regions as server- or user-owned evidence.
|
|
19
|
+
They can affect comparison results, but this CLI exposes them for inspection
|
|
20
|
+
rather than authoring.
|
|
21
|
+
5. Preserve existing per-screenshot `threshold` and `minClusterSize` values
|
|
22
|
+
unless the task and repeated evidence justify a change. Do not invent new
|
|
23
|
+
tolerance values from one diff.
|
|
25
24
|
|
|
26
25
|
## Avoid
|
|
27
26
|
|
|
28
|
-
- Raising global
|
|
29
|
-
- Masking a whole page when a small region changes.
|
|
30
|
-
-
|
|
31
|
-
- Ignoring structural
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Say whether the diff looks like:
|
|
27
|
+
- Raising a global threshold for one unstable area.
|
|
28
|
+
- Masking a whole page when only a small region changes.
|
|
29
|
+
- Assuming a recurring change is harmless without inspecting it.
|
|
30
|
+
- Ignoring structural movement because a region contains dynamic content.
|
|
31
|
+
- Claiming a cause when only metadata, rather than images or history, is
|
|
32
|
+
available.
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
- deterministic fixture drift
|
|
39
|
-
- real content disappearance
|
|
40
|
-
- layout shift
|
|
41
|
-
- screenshot timing/capture instability
|
|
42
|
-
- baseline mismatch
|
|
34
|
+
## Report Findings
|
|
43
35
|
|
|
44
|
-
|
|
36
|
+
State the observed change first. Then distinguish a likely explanation—such as
|
|
37
|
+
fixture drift, content disappearance, layout shift, capture timing, or baseline
|
|
38
|
+
mismatch—from unresolved alternatives. Include the screenshot identity and the
|
|
39
|
+
context command or link used.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SDK Capture Patterns
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Prefer the repository's existing Vizzly integration and user journey. Add a new
|
|
4
|
+
capture path only when the task requires it.
|
|
4
5
|
|
|
5
6
|
## JavaScript Client
|
|
6
7
|
|
|
@@ -8,55 +9,41 @@ Vizzly works best when screenshots are attached to real user journeys and stable
|
|
|
8
9
|
import { vizzlyScreenshot } from '@vizzly-testing/cli/client';
|
|
9
10
|
|
|
10
11
|
let screenshot = await page.screenshot();
|
|
11
|
-
await vizzlyScreenshot('settings-profile-edit-mode', screenshot
|
|
12
|
-
properties: {
|
|
13
|
-
browser: 'chromium',
|
|
14
|
-
viewport: 'desktop',
|
|
15
|
-
state: 'edit'
|
|
16
|
-
},
|
|
17
|
-
threshold: 2,
|
|
18
|
-
minClusterSize: 4
|
|
19
|
-
});
|
|
12
|
+
await vizzlyScreenshot('settings-profile-edit-mode', screenshot);
|
|
20
13
|
```
|
|
21
14
|
|
|
22
|
-
`vizzlyScreenshot(name, image, options)` accepts
|
|
15
|
+
`vizzlyScreenshot(name, image, options)` accepts PNG bytes or a file path.
|
|
16
|
+
Available options include:
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- `properties`: metadata used for baseline identity and filtering.
|
|
18
|
+
- `properties`: metadata attached to the screenshot.
|
|
27
19
|
- `threshold`: per-screenshot CIEDE2000 Delta E tolerance.
|
|
28
20
|
- `minClusterSize`: minimum changed-pixel cluster size.
|
|
29
|
-
- `fullPage`:
|
|
30
|
-
|
|
31
|
-
## Vitest
|
|
32
|
-
|
|
33
|
-
Use the Vizzly Vitest plugin when present. It keeps the native `toMatchScreenshot` style:
|
|
21
|
+
- `fullPage`: whether the screenshot represents a full-page capture.
|
|
34
22
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
properties: {
|
|
38
|
-
theme: 'dark',
|
|
39
|
-
viewport: 'desktop'
|
|
40
|
-
},
|
|
41
|
-
threshold: 2,
|
|
42
|
-
fullPage: true
|
|
43
|
-
});
|
|
44
|
-
```
|
|
23
|
+
Do not add arbitrary tuning values. Preserve the repository's existing values
|
|
24
|
+
unless visual evidence justifies changing them.
|
|
45
25
|
|
|
46
|
-
##
|
|
26
|
+
## Screenshot Identity
|
|
47
27
|
|
|
48
|
-
|
|
28
|
+
Use a stable, descriptive name. Vizzly's signature always includes the name,
|
|
29
|
+
viewport width, and browser. Only properties named in the project's
|
|
30
|
+
`signatureProperties` configuration participate in baseline identity.
|
|
49
31
|
|
|
50
|
-
|
|
32
|
+
Treat other `properties` as metadata. Do not assume values such as theme,
|
|
33
|
+
locale, or state create separate baselines unless the configuration says so.
|
|
51
34
|
|
|
52
|
-
|
|
35
|
+
## Existing Integrations
|
|
53
36
|
|
|
54
|
-
|
|
37
|
+
- Use the Vizzly Vitest matcher when the project already configures the plugin:
|
|
55
38
|
|
|
56
|
-
|
|
39
|
+
```javascript
|
|
40
|
+
await expect(page).toMatchScreenshot('hero-section.png');
|
|
41
|
+
```
|
|
57
42
|
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
-
|
|
43
|
+
- Prefer existing Storybook, static-site, or Ember capture flows over adding a
|
|
44
|
+
parallel Playwright path.
|
|
45
|
+
- For Swift/XCTest, inspect the repository's Vizzly Swift package documentation
|
|
46
|
+
and existing `VizzlyXCTest` usage before changing capture code.
|
|
61
47
|
|
|
62
|
-
Use properties for
|
|
48
|
+
Use properties for searchable metadata and configured variants. Avoid generic
|
|
49
|
+
names such as `screenshot1` or `test`, and avoid names with slashes.
|
|
@@ -1,44 +1,68 @@
|
|
|
1
1
|
# Setup And CI
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use this reference only when the user asks to initialize Vizzly, change CI, or
|
|
4
|
+
troubleshoot configuration. These workflows mutate project files or external
|
|
5
|
+
build state.
|
|
4
6
|
|
|
5
7
|
## Local Setup
|
|
6
8
|
|
|
9
|
+
Initialize only with authorization:
|
|
10
|
+
|
|
7
11
|
```bash
|
|
8
12
|
vizzly init
|
|
9
|
-
vizzly tdd start --open
|
|
10
|
-
vizzly tdd run "<test command>" --no-open
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
After setup, choose one local execution mode:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
vizzly tdd run "<existing visual test command>" --no-open
|
|
19
|
+
```
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
or:
|
|
18
22
|
|
|
19
23
|
```bash
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
vizzly tdd start --json
|
|
25
|
+
<existing visual test command>
|
|
26
|
+
vizzly tdd stop --json
|
|
22
27
|
```
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
Do not run `tdd start` before `tdd run`; both own a local TDD server lifecycle.
|
|
25
30
|
|
|
26
|
-
##
|
|
31
|
+
## Cloud CI
|
|
32
|
+
|
|
33
|
+
Use a project-scoped token supplied by the user's existing secret-management
|
|
34
|
+
system. Never print it, write it into the repository, or replace working
|
|
35
|
+
credentials while debugging.
|
|
27
36
|
|
|
28
|
-
|
|
37
|
+
Wrap the CI job's existing visual test command:
|
|
29
38
|
|
|
30
39
|
```bash
|
|
31
|
-
vizzly run "
|
|
40
|
+
vizzly run "<existing visual test command>" --wait --json
|
|
32
41
|
```
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
## Parallel CI
|
|
44
|
+
|
|
45
|
+
Give every shard in one build the same parallel ID, unique to that workflow
|
|
46
|
+
attempt. Run all shards without `--wait`, then finalize that shared ID once
|
|
47
|
+
after every shard finishes:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
vizzly run "<shard test command>" --parallel-id "<shared-ci-run-id>" --json
|
|
51
|
+
vizzly finalize "<shared-ci-run-id>" --json
|
|
52
|
+
```
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
|
|
54
|
+
Do not create a different parallel ID per shard, and do not wait for a parallel
|
|
55
|
+
build to complete before it has been finalized. Use one finalizer rather than
|
|
56
|
+
having every shard race to finalize the build.
|
|
38
57
|
|
|
39
|
-
##
|
|
58
|
+
## Troubleshoot
|
|
40
59
|
|
|
41
60
|
- Run `vizzly doctor` for local configuration checks.
|
|
42
|
-
- Run `vizzly status
|
|
43
|
-
- Run `vizzly
|
|
44
|
-
-
|
|
61
|
+
- Run `vizzly tdd status --json` for a local daemon started by the task.
|
|
62
|
+
- Run `vizzly status <build-id> --json` for cloud lifecycle facts.
|
|
63
|
+
- Run `vizzly context build <build-id> --source cloud --agent --json` for visual
|
|
64
|
+
evidence.
|
|
65
|
+
- If screenshots are absent, verify the existing SDK or integration, the test
|
|
66
|
+
path that should capture them, and the active local or cloud session.
|
|
67
|
+
- If authentication is absent, report it rather than initiating login unless
|
|
68
|
+
setup is explicitly in scope.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Public Screenshots
|
|
2
|
-
|
|
3
|
-
Public screenshots are Vizzly's path for stable image URLs in docs and manuals.
|
|
4
|
-
|
|
5
|
-
Use this when a user asks for hotlinked UI screenshots, generated manual images, docs that stay current with UI, or CDN-like screenshot URLs.
|
|
6
|
-
|
|
7
|
-
## Mental Model
|
|
8
|
-
|
|
9
|
-
Do not use arbitrary build screenshot URLs as stable docs assets. Use Public Properties.
|
|
10
|
-
|
|
11
|
-
The flow:
|
|
12
|
-
|
|
13
|
-
1. Capture screenshots with stable metadata.
|
|
14
|
-
2. Configure project Public Properties in Vizzly.
|
|
15
|
-
3. Approve/publish the baseline build.
|
|
16
|
-
4. Use the Public URLs tab to copy the stable URL.
|
|
17
|
-
|
|
18
|
-
Example capture:
|
|
19
|
-
|
|
20
|
-
```javascript
|
|
21
|
-
await vizzlyScreenshot('watering-widget', screenshot, {
|
|
22
|
-
properties: {
|
|
23
|
-
manual: 'plant-care',
|
|
24
|
-
component: 'watering-widget',
|
|
25
|
-
viewport: 'desktop'
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Configure a Public Property like `manual=plant-care`. Vizzly publishes matching approved baseline screenshots and keeps stable URLs for each screenshot/property identity.
|
|
31
|
-
|
|
32
|
-
## Good Uses
|
|
33
|
-
|
|
34
|
-
- Product manuals
|
|
35
|
-
- User docs
|
|
36
|
-
- Component catalogs
|
|
37
|
-
- In-app UI examples
|
|
38
|
-
- Screenshots that should update when approved UI changes
|
|
39
|
-
|
|
40
|
-
## Cautions
|
|
41
|
-
|
|
42
|
-
- Public screenshots are public. Do not publish private user data, secrets, or internal-only UI.
|
|
43
|
-
- A new unapproved build does not automatically become the public docs image.
|
|
44
|
-
- Use stable names and properties so URLs do not churn.
|