@vitest-agent/ui 2.0.13 → 2.0.15
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/index.js +1 -1
- package/package.json +3 -3
- package/render-ink/StreamApp.js +46 -43
package/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
|
|
|
33
33
|
*
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
|
-
const CURRENT_UI_VERSION = "2.0.
|
|
36
|
+
const CURRENT_UI_VERSION = "2.0.15";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
39
39
|
export { ActionSeverity, CURRENT_UI_VERSION, CountColumns, CoverageBlock, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, DURATION_CELL_WIDTH, FailureRecord, FailureSection, FailuresSection, ModuleHeader, ModuleRecord, ProjectRow, RenderState, RenderTotals, RunEvent, RunEventChannel, RunEventChannelLive, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_LOAD_FAILURE_LABEL, StatusIcon, StreamApp, SuggestedActionRecord, SuggestedActions, TagColumns, TestRecord, TestRow, TrendLine, accumulateUntilFinished, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatchInk, dispatcherTable, dominantClassification, forEachRenderState, formatDisplayDuration, initialRenderState, publish, publishAll, reduceRenderState, reduceRenderStateAll, renderAgent, renderStateStream, spinnerFrame, spinnerFrameForTime, subscribeRaw, synthesizeFromAgentReport, synthesizeRunEvents, tagUnion };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest-agent/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared event-sourced renderer for vitest-agent. React Ink view for humans, plain-string view for agents, both fed by the same reducer over a RunEvent stream.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"./package.json": "./package.json"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@vitest-agent/sdk": "2.0.
|
|
43
|
-
"effect": "4.0.0-beta.
|
|
42
|
+
"@vitest-agent/sdk": "2.0.15",
|
|
43
|
+
"effect": "4.0.0-beta.107"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"ink": "^7.1.0",
|
package/render-ink/StreamApp.js
CHANGED
|
@@ -94,14 +94,15 @@ const ModuleStreamRow = ({ module, nowMs, frame, nameWidth, timedOut, tagUnion:
|
|
|
94
94
|
const queued = module.status === "queued";
|
|
95
95
|
let glyph;
|
|
96
96
|
let notStartedSuffix = null;
|
|
97
|
-
if (timedOut && running)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
if (timedOut && running) {
|
|
98
|
+
if (queued) {
|
|
99
|
+
glyph = /* @__PURE__ */ jsx(StatusIcon, { status: "queued" });
|
|
100
|
+
notStartedSuffix = /* @__PURE__ */ jsx(Text, {
|
|
101
|
+
dimColor: true,
|
|
102
|
+
children: " not started — killed before reaching this module"
|
|
103
|
+
});
|
|
104
|
+
} else glyph = /* @__PURE__ */ jsx(StatusIcon, { status: "timed-out" });
|
|
105
|
+
} else if (running) glyph = /* @__PURE__ */ jsx(Text, {
|
|
105
106
|
color: "yellow",
|
|
106
107
|
children: frame
|
|
107
108
|
});
|
|
@@ -292,29 +293,30 @@ const liveRegion = (state, shape, nowMs, frame) => {
|
|
|
292
293
|
let runningVisible = 0;
|
|
293
294
|
let runningOverflow = 0;
|
|
294
295
|
const rows = [];
|
|
295
|
-
for (const g of groups) if (g.modules.some(moduleRunning))
|
|
296
|
-
runningVisible
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
296
|
+
for (const g of groups) if (g.modules.some(moduleRunning)) {
|
|
297
|
+
if (runningVisible < MAX_LIVE_RUNNING_ROWS) {
|
|
298
|
+
runningVisible++;
|
|
299
|
+
const counts = sumCounts(g.modules);
|
|
300
|
+
const summary = {
|
|
301
|
+
name: g.name,
|
|
302
|
+
passCount: counts.passCount,
|
|
303
|
+
failCount: counts.failCount,
|
|
304
|
+
skipCount: counts.skipCount,
|
|
305
|
+
durationMs: 0
|
|
306
|
+
};
|
|
307
|
+
rows.push(/* @__PURE__ */ jsx(ProjectRow, {
|
|
308
|
+
project: summary,
|
|
309
|
+
counts,
|
|
310
|
+
running: true,
|
|
311
|
+
timedOut,
|
|
312
|
+
elapsedMs: projectElapsedMs(g, nowMs),
|
|
313
|
+
frame,
|
|
314
|
+
nameWidth,
|
|
315
|
+
tagCounts: groupTagCounts.get(g.name),
|
|
316
|
+
tagUnion: workspaceTags
|
|
317
|
+
}, g.name));
|
|
318
|
+
} else runningOverflow++;
|
|
319
|
+
} else {
|
|
318
320
|
const counts = sumCounts(g.modules);
|
|
319
321
|
const summary = {
|
|
320
322
|
name: g.name,
|
|
@@ -365,18 +367,19 @@ const liveRegion = (state, shape, nowMs, frame) => {
|
|
|
365
367
|
let runningVisible = 0;
|
|
366
368
|
let runningOverflow = 0;
|
|
367
369
|
const rows = [];
|
|
368
|
-
for (const m of ordered) if (moduleRunning(m))
|
|
369
|
-
runningVisible
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
370
|
+
for (const m of ordered) if (moduleRunning(m)) {
|
|
371
|
+
if (runningVisible < MAX_LIVE_RUNNING_ROWS) {
|
|
372
|
+
runningVisible++;
|
|
373
|
+
rows.push(/* @__PURE__ */ jsx(ModuleStreamRow, {
|
|
374
|
+
module: m,
|
|
375
|
+
nowMs,
|
|
376
|
+
frame,
|
|
377
|
+
nameWidth,
|
|
378
|
+
timedOut,
|
|
379
|
+
tagUnion: moduleTags
|
|
380
|
+
}, m.modulePath));
|
|
381
|
+
} else runningOverflow++;
|
|
382
|
+
} else rows.push(/* @__PURE__ */ jsx(ModuleStreamRow, {
|
|
380
383
|
module: m,
|
|
381
384
|
nowMs,
|
|
382
385
|
frame,
|