@unotest/viewer 0.18.0 → 0.19.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
@@ -1,5 +1,87 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.19.0] - 2026-08-23
4
+
5
+ ### Minor Changes
6
+
7
+ - dfb3991: Per-collection parallelism via a `workers:` field in the collection YAML.
8
+
9
+ - `workers: N` (integer ≥ 1) in `unotest/e2e/_collections/*.yaml` sets how
10
+ many scenarios of that collection run concurrently; omitted = serial.
11
+ - Precedence: CLI `--workers=N` flag > manifest `workers:` > 1.
12
+ - Viewer: the collection header shows an editable `workers` value; the
13
+ setting is stored in the YAML, so CLI and CI runs pick it up too.
14
+ - `CollectionMeta` (protocol) gains a `workers: number | null` field.
15
+
16
+ - Run history scales: runs are filed under daily shards and the viewer stops
17
+ polling history it is not showing.
18
+
19
+ - New on-disk layout `unotest/.runs/<YYYY>/<MM>/<DD>/<runId>/` (UTC date the
20
+ run started). The shard is a pure function of the `runId`, which already
21
+ carries the timestamp — a direct link to a run keeps working even with the
22
+ index deleted. Existing flat `.runs/<runId>/` history is migrated
23
+ automatically (see the `runs migrate` entry).
24
+ - The viewer's watcher polls only LIVE runs; finished history never touches
25
+ it. Discovery watches the current day's directory with native `fs.watch`
26
+ and re-attaches at UTC midnight.
27
+ - A JSONL index per day and per scenario backs the history list. It is fully
28
+ rebuildable — rebuilt on start, non-blocking — so a corrupted or missing
29
+ index degrades the listing, never the runs themselves.
30
+ - `@unotest/protocol`: new `run-shard` and `run-index` modules (shard path
31
+ derivation, index record shapes) exported from the root entry.
32
+
33
+ - Upgrading moves existing run history to the new layout by itself, and
34
+ Playwright moves to 1.62.
35
+
36
+ - The flat `.runs/<runId>/` history is migrated on the first run of the new
37
+ version. Default is to remove old runs (nobody asked to keep them);
38
+ `UNOTEST_RUNS_LEGACY=keep` re-files them into date shards instead. The
39
+ completion marker is written last, so an interrupted or failed move is
40
+ retried on the next start rather than silently marked done.
41
+ - New command `unotest-web runs migrate [--dry-run]` — the same migration,
42
+ runnable FIRST, with a report-only mode. A migration nobody can look at
43
+ before it happens is one that runs unannounced on someone else's machine.
44
+ - `playwright` moves to `^1.62.0` in `@unotest/web` and `@unotest/viewer`.
45
+ Run `npx playwright install` once after upgrading if your browser cache
46
+ predates it.
47
+ - Frame capture is now format-parameterised internally, still PNG. WebP was
48
+ measured and rejected: Chromium's lossless `type: "webp"` is pixel-exact
49
+ but 1.5× LARGER than PNG on real frames (3.17 MB vs 2.04 MB on one suite).
50
+ - Fix: the viewer served step screenshots as 403 after the layout change —
51
+ its asset allow-list still expected the flat layout. The route now has
52
+ tests.
53
+
54
+ - The viewer's sidebar becomes a chronological history instead of a flat list.
55
+
56
+ - Runs are grouped by the reader's calendar day; a run with a `parentRunId`
57
+ collapses into its collection's row, and neighbouring identical outcomes
58
+ collapse run-length style, so a long history stays readable.
59
+ - Each test carries a chip with its recent trend, and a badge counts tests
60
+ whose LAST run failed. The badge reads `_latest.json`, so it is correct
61
+ regardless of how much history the sidebar has loaded; the "Failing now"
62
+ section matches it by construction.
63
+ - Fix: `/api/runs` returned a page while the client still expected an array,
64
+ and the sidebar history rendered empty. The response shape now lives in
65
+ one place (`shared/runs-page.ts`) and `RunsStore` has tests.
66
+
67
+ - Overview dashboard — the viewer opens on the health of the whole project
68
+ instead of "pick something from the sidebar".
69
+
70
+ - One tile per scenario, filled by the status of its last run. Tile size is
71
+ computed from the window, so the entire suite fits without scrolling.
72
+ - Hovering a tile shows a card with the scenario name, when it last ran, how
73
+ long it took, and a strip of its recent outcomes. Clicking opens the
74
+ scenario in a tab. The counters across the top double as filters.
75
+ - The card's data comes from the run index, not from a request per tile: a
76
+ field of 200 tests used to mean 200 requests during one sweep of the mouse.
77
+ - Fix: the status shown next to a scenario in the tree came from whatever
78
+ slice of history happened to be loaded, instead of the per-scenario index —
79
+ so it changed as you scrolled.
80
+
81
+ - Tree rows in the history sidebar share one grid: a collection, a test run and
82
+ the "open collection run" row now line up on the same vertical and have the
83
+ same height, and nesting is one indent step per level.
84
+
3
85
  ## [0.18.0] - 2026-08-23
4
86
 
5
87
  ### Minor Changes