@unotest/viewer 0.10.0 → 0.12.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/CHANGELOG.md CHANGED
@@ -2,6 +2,124 @@
2
2
 
3
3
  All notable changes to `@unotest/viewer` are documented in this file.
4
4
 
5
+ ## [0.12.0] - 2026-08-14
6
+
7
+ ### Patch Changes
8
+
9
+ - 479aa25: Feedback batch from a real-world integration (bot-service): shell()
10
+ safety, run diagnostics, boolean-attribute probes, linter ergonomics.
11
+
12
+ **BREAKING — `shell()` fails the step on a non-zero exit code.**
13
+ Previously a non-zero exit resolved silently and a forgotten `res.code`
14
+ check produced false-green tests. Migration: calls where non-zero is
15
+ expected (probes, `grep -q`) pass `{allowNonZero: true}` as the last
16
+ argument and keep checking `res.code`; calls that asserted
17
+ `assertTrue(out.code == 0, ...)` can drop the assert. More shell()
18
+ hardening: a missing binary is a distinct "failed to start" error (was a
19
+ fake `code: 1`), output over 10 MiB fails loudly (was silent
20
+ truncation), and every call has a wall-clock budget
21
+ (`sandbox.shellTimeoutMs`, default 120 s, or per-call `{timeoutMs}`) —
22
+ a detached grandchild holding the stdio pipes no longer hangs the
23
+ scenario forever; the timeout error explains the detach recipe.
24
+
25
+ New capabilities:
26
+
27
+ - `waitForFile(path, pattern?, {timeoutMs})` — poll a file until it
28
+ exists / contains a substring or regex; the file-side `waitForText`
29
+ for background processes. Returns the content.
30
+ - `sandbox.exportSecrets: [names]` — explicit allowlist of `.secrets*`
31
+ variables exported into `shell()` subprocess env (still masked in
32
+ logs). Secrets stay out of `process.env` otherwise.
33
+ - `isDisabled(loc)` / `isEnabled(loc)` — honest disabled probe (native
34
+ `:disabled` incl. fieldset inheritance, or `aria-disabled`);
35
+ `hasAttribute(loc, name)` — presence probe for boolean attributes
36
+ (`getAttribute` reads `""` for present and absent alike).
37
+ - Generators: `randomWord(len)` (letters only — digit-free markers),
38
+ `nowMs()`, `today()`, `daysFromNow(n)` (previously documented in the
39
+ skills but not implemented).
40
+ - Failed runs report the enclosing step: `✗ test: … in step "…"` in the
41
+ console, `stepLabel` in the failure bundle and `inspect_runtime`.
42
+ - Every CLI run prints a one-line header: active environment, layer
43
+ files (missing ones flagged) and effective `baseUrl`; `run_test` /
44
+ `explore_start` replies echo `baseUrl` next to `environment`.
45
+ - `run_test` accepts per-call `env` — the spawned runner child gets
46
+ `UNOTEST_ENV=<env>` for that run only.
47
+ - Linter: `// lint-ok: <reason>` silences warning/info diagnostics on
48
+ its line (reason required; errors never suppressible); new
49
+ `lint:echo-assert` warns when `waitForText`/`assertText` overlaps a
50
+ value the scenario itself filled (chat echo trap);
51
+ `lint:goto-concat` / `lint:regex-invalid` are now configurable in
52
+ `linter.rules` (they were emitted but missing from the config schema).
53
+ - A `_helpers` file that fails to parse is reported as the root cause in
54
+ `unotest-web lint` (and explore replies list `unparsableHelperFiles`)
55
+ instead of silently cascading into "Unknown function" at every call
56
+ site. The viewer logs the same condition (patch).
57
+
58
+ - 5dd59af: The Steps tree renders on the editor (canvas) background, matching the
59
+ Code mode next to it — previously it sat on the panel chrome color. The
60
+ snapshot tab's read-only source view gets the same canvas background.
61
+ - 7069d24: Panels no longer blend together: the shell adopts a JetBrains-new-UI
62
+ "islands" layout. The sidebar tree, the main content area, the terminal
63
+ tool window and the run-view inspector dock are rounded cards floating
64
+ on a darker shell background; the gap channels between them are the
65
+ separators (with rounded corners at every seam), replacing the old
66
+ flat 1px borders. Works in both light and dark themes via a new
67
+ `shell` design token.
68
+ - Updated dependencies [40300d3]
69
+ - @unotest/dsl@0.12.0
70
+ - @unotest/protocol@0.12.0
71
+
72
+ ## [0.11.0] - 2026-08-13
73
+
74
+ ### Minor Changes
75
+
76
+ - a195713: Failure artifacts are always on, and steps can carry screenshots.
77
+
78
+ - On any scenario failure the runner writes `screenshot.png` +
79
+ `page.html` (runtime DOM, open shadow roots included, secrets
80
+ redacted) to `unotest/.runs/<runId>/failure/` — no `UNOTEST_DEBUG`
81
+ needed. The `.unotest/failures/` bundle gains the same `page.html`;
82
+ its screenshot keeps honouring `failureBundle.tier2`.
83
+ - New env flag `UNOTEST_STEP_SCREENSHOTS=1` captures a PNG after every
84
+ executed step into `unotest/.runs/<runId>/screenshot/`.
85
+ - Protocol: `screenshot` events may carry the step's `file`/`line`/`col`.
86
+ - Viewer: a step row with a captured screenshot shows a camera icon and
87
+ toggles an inline preview on click (both `screenshot()` DSL captures
88
+ and per-step ones).
89
+
90
+ - c01b72f: Step screenshots open full-screen instead of expanding inside the steps
91
+ tree. Clicking a row with a capture opens a viewer over the whole
92
+ window — dimmed, blurred backdrop, the frame scaled to fit — with
93
+ arrows on both sides (and `←`/`→`) walking every capture the run
94
+ produced, disabled at each end. Under the image sits the frame's
95
+ identity: the enclosing `step("…")` label and the statement itself with
96
+ its line number, plus a position counter. `Esc` or a click outside
97
+ closes; the row you were last looking at stays marked in the tree and
98
+ scrolled into view, so closing the viewer lands you where you left off.
99
+
100
+ The inline preview under the row is gone — it made the tree jump on
101
+ every capture and showed the screenshot at a size nothing could be read
102
+ at.
103
+
104
+ ### Patch Changes
105
+
106
+ - dea90e9: Straightens the scenarios tree indentation. A folder's children were
107
+ indented by less than the chevron column they nest under, so a
108
+ scenario's status dot landed to the LEFT of its parent folder's name and
109
+ sibling folders and scenarios sat on two different grids. One level now
110
+ costs exactly one chevron column: a nested folder's chevron sits under
111
+ its parent's folder icon, and a scenario's dot sits where its parent's
112
+ name starts — the alignment every file tree uses. Scenario rows reserve
113
+ the chevron column they don't have, and their dot occupies the same
114
+ box as a folder icon, so names line up across both row kinds.
115
+ - Updated dependencies [a195713]
116
+ - Updated dependencies [ce25926]
117
+ - Updated dependencies [5a8e92b]
118
+ - Updated dependencies [d0ae620]
119
+ - Updated dependencies [2a68997]
120
+ - @unotest/protocol@0.11.0
121
+ - @unotest/dsl@0.11.0
122
+
5
123
  ## [0.10.0] - 2026-08-06
6
124
 
7
125
  ### Patch Changes