@vitest-agent/ui 6.0.6 → 6.0.8

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/counts.js CHANGED
@@ -1,5 +1,5 @@
1
- import { VitestAgentStatus } from "./theme.js";
2
1
  import { Doc, Render } from "@effected/cli-kit";
2
+ import { VitestAgentStatus } from "./theme.js";
3
3
 
4
4
  // src/counts.ts
5
5
  /** The test counters a totals line folds into its `n/total`. */
@@ -1,7 +1,7 @@
1
+ import { Fmt } from "@effected/cli-kit";
1
2
  import { buildFooter } from "../footer.js";
2
3
  import { formatDisplayDuration } from "../../format-duration.js";
3
4
  import { soleModulePath } from "../helpers.js";
4
- import { Fmt } from "@effected/cli-kit";
5
5
 
6
6
  // src/dispatcher/cells/single-file-pass.ts
7
7
  const renderAgent = (inputs) => {
@@ -1,7 +1,7 @@
1
+ import { Fmt } from "@effected/cli-kit";
1
2
  import { buildFooter } from "../footer.js";
2
3
  import { formatDisplayDuration } from "../../format-duration.js";
3
4
  import { formatCoverageSummaryLines, soleModulePath } from "../helpers.js";
4
- import { Fmt } from "@effected/cli-kit";
5
5
 
6
6
  // src/dispatcher/cells/single-file-threshold.ts
7
7
  const renderAgent = (inputs) => {
@@ -1,6 +1,6 @@
1
+ import { Fmt } from "@effected/cli-kit";
1
2
  import { buildFooter } from "../footer.js";
2
3
  import { formatTotals } from "../helpers.js";
3
- import { Fmt } from "@effected/cli-kit";
4
4
 
5
5
  // src/dispatcher/cells/single-project-pass.ts
6
6
  const renderAgent = (inputs) => {
@@ -1,3 +1,4 @@
1
+ import { formatConsoleLeaksNote, formatScopedCoverageNote, formatStrayOutputNote } from "@vitest-agent/sdk";
1
2
  import { renderSingleFileFail } from "./cells/single-file-fail.js";
2
3
  import { renderSingleFilePass } from "./cells/single-file-pass.js";
3
4
  import { renderSingleFileThreshold } from "./cells/single-file-threshold.js";
@@ -11,7 +12,6 @@ import { renderWorkspaceFail } from "./cells/workspace-fail.js";
11
12
  import { renderWorkspacePass } from "./cells/workspace-pass.js";
12
13
  import { renderWorkspaceThreshold } from "./cells/workspace-threshold.js";
13
14
  import { formatSuggestedActionLines } from "./helpers.js";
14
- import { formatConsoleLeaksNote, formatScopedCoverageNote, formatStrayOutputNote } from "@vitest-agent/sdk";
15
15
 
16
16
  // src/dispatcher/dispatch.ts
17
17
  /**
@@ -1,7 +1,7 @@
1
+ import { Doc, Fmt, Render } from "@effected/cli-kit";
1
2
  import { formatTotalsLine } from "../counts.js";
2
3
  import { formatDisplayDuration } from "../format-duration.js";
3
4
  import { statusGlyph } from "../theme.js";
4
- import { Doc, Fmt, Render } from "@effected/cli-kit";
5
5
 
6
6
  // src/dispatcher/helpers.ts
7
7
  /**
package/index.d.ts CHANGED
@@ -1132,6 +1132,14 @@ interface VitestTestDiagnostic {
1132
1132
  duration: number;
1133
1133
  flaky: boolean;
1134
1134
  slow: boolean;
1135
+ /**
1136
+ * Retries used by the test (Vitest 5.1+). A retry is counted only after a
1137
+ * failed attempt, but the count accumulates across repeats, so it can be
1138
+ * non-zero when the final repeat passed.
1139
+ */
1140
+ retryCount?: number;
1141
+ /** Repeats run by the test (Vitest 5.1+). */
1142
+ repeatCount?: number;
1135
1143
  }
1136
1144
  /**
1137
1145
  * Duck-typed Vitest TestCase from the Reporter v2 API.
@@ -1151,6 +1159,10 @@ interface VitestTestCase {
1151
1159
  /** Parent suite or module. Optional in the duck-type so unit-test fixtures don't have to fabricate a stub; always present in real Vitest TestCase instances. */
1152
1160
  parent?: VitestTestSuite | VitestTestModule;
1153
1161
  result(): VitestTestResult | undefined;
1162
+ /** Per-attempt results, one per retry and repeat (Vitest 5.1+). */
1163
+ attempts?(): ReadonlyArray<{
1164
+ errors?: ReadonlyArray<VitestTestError> | undefined;
1165
+ }>;
1154
1166
  diagnostic(): VitestTestDiagnostic | undefined;
1155
1167
  }
1156
1168
  /**
package/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SuggestedActionRecord, TestRecord, initialRenderState } from "@vitest-agent/sdk";
1
2
  import { classifyOutcome, classifyRunShape } from "./dispatcher/classify.js";
2
3
  import { dispatch, dispatcherTable } from "./dispatcher/dispatch.js";
3
4
  import { buildFooter, dominantClassification } from "./dispatcher/footer.js";
@@ -8,7 +9,6 @@ import { renderAgent } from "./render-agent.js";
8
9
  import { SPINNER_FRAMES, SPINNER_FRAME_MS, spinnerFrame } from "./spinner.js";
9
10
  import { SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, synthesizeFromAgentReport, synthesizeRunEvents } from "./synthesize.js";
10
11
  import { VitestAgentStatus, VitestAgentTokens, inkStyle, statusGlyph, statusInkStyle } from "./theme.js";
11
- import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SuggestedActionRecord, TestRecord, initialRenderState } from "@vitest-agent/sdk";
12
12
 
13
13
  // src/index.ts
14
14
  /**
@@ -18,6 +18,6 @@ import { ActionSeverity, CoverageFile, CoverageGap, CoverageMetric, CoverageRend
18
18
  *
19
19
  * @public
20
20
  */
21
- const CURRENT_UI_VERSION = "6.0.6";
21
+ const CURRENT_UI_VERSION = "6.0.8";
22
22
 
23
23
  export { ActionSeverity, CURRENT_UI_VERSION, CoverageFile, CoverageGap, CoverageMetric, CoverageRenderState, FailureRecord, ModuleRecord, RenderState, RenderTotals, RunEvent, SPINNER_FRAMES, SPINNER_FRAME_MS, SUITE_FAILURE_LABEL, SUITE_LOAD_FAILURE_LABEL, SuggestedActionRecord, TestRecord, VitestAgentStatus, VitestAgentTokens, buildFooter, classifyOutcome, classifyRunShape, dispatch, dispatcherTable, dominantClassification, formatDisplayDuration, formatSuggestedActionLines, initialRenderState, inkStyle, reduceRenderState, reduceRenderStateAll, renderAgent, spinnerFrame, statusGlyph, statusInkStyle, synthesizeFromAgentReport, synthesizeRunEvents };
@@ -1,7 +1,7 @@
1
- import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
2
1
  import { Fmt } from "@effected/cli-kit";
3
2
  import { Styled, useGlyphs } from "@effected/cli-kit/ui";
4
3
  import { Text } from "ink";
4
+ import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
5
5
  import { jsxs } from "react/jsx-runtime";
6
6
 
7
7
  // src/ink/CountColumns.tsx
@@ -1,7 +1,7 @@
1
- import { useFileLink } from "./FileLink.js";
2
1
  import { Fmt } from "@effected/cli-kit";
3
2
  import { useStyle } from "@effected/cli-kit/ui";
4
3
  import { Box, Text } from "ink";
4
+ import { useFileLink } from "./FileLink.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  // src/ink/CoverageBlock.tsx
@@ -1,7 +1,7 @@
1
- import { statusGlyph, statusToken } from "../theme.js";
2
- import { useFileLink } from "./FileLink.js";
3
1
  import { Styled, useGlyphs, useStyle } from "@effected/cli-kit/ui";
4
2
  import { Box, Text } from "ink";
3
+ import { statusGlyph, statusToken } from "../theme.js";
4
+ import { useFileLink } from "./FileLink.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  // src/ink/FailureSection.tsx
@@ -1,7 +1,7 @@
1
- import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
2
- import { useFileLink } from "./FileLink.js";
3
1
  import { Styled, useGlyphs } from "@effected/cli-kit/ui";
4
2
  import { Box, Text } from "ink";
3
+ import { VitestAgentTokens, statusGlyph, statusToken } from "../theme.js";
4
+ import { useFileLink } from "./FileLink.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  // src/ink/FailuresSection.tsx
package/ink/FileLink.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx } from "react/jsx-runtime";
2
1
  import { createContext, useContext } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
3
 
4
4
  // src/ink/FileLink.tsx
5
5
  const plain = (_target, label) => label;
@@ -1,6 +1,6 @@
1
+ import { Box, Text } from "ink";
1
2
  import { formatDisplayDuration } from "../format-duration.js";
2
3
  import { StatusIcon } from "./StatusIcon.js";
3
- import { Box, Text } from "ink";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  // src/ink/ModuleHeader.tsx
package/ink/ProjectRow.js CHANGED
@@ -1,11 +1,11 @@
1
+ import { Fmt } from "@effected/cli-kit";
2
+ import { Styled } from "@effected/cli-kit/ui";
3
+ import { Box, Text } from "ink";
1
4
  import { formatDisplayDuration } from "../format-duration.js";
2
5
  import { statusToken } from "../theme.js";
3
6
  import { CountColumns, DURATION_CELL_WIDTH } from "./CountColumns.js";
4
7
  import { StatusIcon } from "./StatusIcon.js";
5
8
  import { TagColumns } from "./TagColumns.js";
6
- import { Fmt } from "@effected/cli-kit";
7
- import { Styled } from "@effected/cli-kit/ui";
8
- import { Box, Text } from "ink";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
10
 
11
11
  // src/ink/ProjectRow.tsx
package/ink/StatusIcon.js CHANGED
@@ -1,5 +1,5 @@
1
- import { statusGlyph, statusToken } from "../theme.js";
2
1
  import { Styled, useGlyphs } from "@effected/cli-kit/ui";
2
+ import { statusGlyph, statusToken } from "../theme.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
 
5
5
  // src/ink/StatusIcon.tsx
package/ink/StreamApp.js CHANGED
@@ -1,3 +1,7 @@
1
+ import { Fmt } from "@effected/cli-kit";
2
+ import { Styled, useGlyphs, useStyle } from "@effected/cli-kit/ui";
3
+ import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
4
+ import { Box, Text } from "ink";
1
5
  import { classifyRunShape } from "../dispatcher/classify.js";
2
6
  import { formatDisplayDuration } from "../format-duration.js";
3
7
  import { spinnerFrame } from "../spinner.js";
@@ -9,10 +13,6 @@ import { StatusIcon } from "./StatusIcon.js";
9
13
  import { TagColumns, tagUnion } from "./TagColumns.js";
10
14
  import { TestRow } from "./TestRow.js";
11
15
  import { TrendLine } from "./TrendLine.js";
12
- import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
13
- import { Fmt } from "@effected/cli-kit";
14
- import { Styled, useGlyphs, useStyle } from "@effected/cli-kit/ui";
15
- import { Box, Text } from "ink";
16
16
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
17
 
18
18
  // src/ink/StreamApp.tsx
package/ink/TagColumns.js CHANGED
@@ -1,7 +1,7 @@
1
- import { VitestAgentTokens } from "../theme.js";
2
1
  import { Fmt } from "@effected/cli-kit";
3
2
  import { Styled } from "@effected/cli-kit/ui";
4
3
  import { Text } from "ink";
4
+ import { VitestAgentTokens } from "../theme.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  // src/ink/TagColumns.tsx
package/ink/TestRow.js CHANGED
@@ -1,6 +1,6 @@
1
+ import { Box, Text } from "ink";
1
2
  import { formatDisplayDuration } from "../format-duration.js";
2
3
  import { StatusIcon } from "./StatusIcon.js";
3
- import { Box, Text } from "ink";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  // src/ink/TestRow.tsx
package/ink/TrendLine.js CHANGED
@@ -1,7 +1,7 @@
1
- import { VitestAgentTokens } from "../theme.js";
2
1
  import { Fmt } from "@effected/cli-kit";
3
2
  import { Styled } from "@effected/cli-kit/ui";
4
3
  import { Text } from "ink";
4
+ import { VitestAgentTokens } from "../theme.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
7
7
  // src/ink/TrendLine.tsx
@@ -1,7 +1,7 @@
1
- import { consoleLeaksNoteFor, dispatcherTable, scopedCoverageNoteFor, strayOutputNoteFor, suggestedActionsNoteFor } from "../dispatcher/dispatch.js";
2
- import { renderAgentStringAsInk } from "./ink-helpers.js";
3
1
  import { Box, Text } from "ink";
4
2
  import { createElement } from "react";
3
+ import { consoleLeaksNoteFor, dispatcherTable, scopedCoverageNoteFor, strayOutputNoteFor, suggestedActionsNoteFor } from "../dispatcher/dispatch.js";
4
+ import { renderAgentStringAsInk } from "./ink-helpers.js";
5
5
 
6
6
  // src/ink/dispatch-ink.ts
7
7
  /** The Ink half of a cell whose live view is its agent string, painted. */
@@ -1,6 +1,6 @@
1
- import { statusGlyph, statusToken } from "../theme.js";
2
1
  import { Styled } from "@effected/cli-kit/ui";
3
2
  import { Box, Text } from "ink";
3
+ import { statusGlyph, statusToken } from "../theme.js";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  // src/ink/ink-helpers.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitest-agent/ui",
3
- "version": "6.0.6",
3
+ "version": "6.0.8",
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": [
@@ -44,14 +44,14 @@
44
44
  "./package.json": "./package.json"
45
45
  },
46
46
  "dependencies": {
47
- "@vitest-agent/sdk": "9.0.5",
48
- "effect": "4.1.4"
47
+ "@vitest-agent/sdk": "9.1.0",
48
+ "effect": "4.1.5"
49
49
  },
50
50
  "peerDependencies": {
51
- "@effected/cli-kit": "^0.29.0",
51
+ "@effected/cli-kit": "^0.30.0",
52
52
  "@effected/env": "^0.12.0",
53
- "@effected/glob": "^0.22.0",
54
- "@effected/walker": "^0.29.0",
53
+ "@effected/glob": "^0.23.0",
54
+ "@effected/walker": "^0.30.0",
55
55
  "ink": "^8.0.0",
56
56
  "react": "^19.3.0"
57
57
  },
package/render-agent.js CHANGED
@@ -1,7 +1,7 @@
1
+ import { Fmt } from "@effected/cli-kit";
2
+ import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
1
3
  import { formatTotalsLine } from "./counts.js";
2
4
  import { formatFailure as formatFailure$1, formatGlobShortfallLines, formatSuggestedActionLines } from "./dispatcher/helpers.js";
3
- import { formatConsoleLeaksNote, formatStrayOutputNote } from "@vitest-agent/sdk";
4
- import { Fmt } from "@effected/cli-kit";
5
5
 
6
6
  // src/render-agent.ts
7
7
  /**
package/synthesize.js CHANGED
@@ -1,4 +1,4 @@
1
- import { isTimeoutError } from "@vitest-agent/sdk";
1
+ import { finalAttemptErrors, isTimeoutError } from "@vitest-agent/sdk";
2
2
 
3
3
  // src/synthesize.ts
4
4
  /**
@@ -112,8 +112,9 @@ const synthesizeRunEvents = (modules, options = {}) => {
112
112
  testName: test.name,
113
113
  suitePath
114
114
  });
115
- const error = mapTestError(result?.errors);
116
- const firstErrorMsg = result?.errors?.[0]?.message;
115
+ const finalErrors = finalAttemptErrors(test);
116
+ const error = mapTestError(finalErrors);
117
+ const firstErrorMsg = finalErrors?.[0]?.message;
117
118
  const timedOut = status === "failed" && firstErrorMsg !== void 0 && isTimeoutError({ message: firstErrorMsg });
118
119
  if (timedOut) moduleTimeout++;
119
120
  events.push({