Your Enterprise license has expired. Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
a320350b Telemetry: simplify cssCheck to a boolean on TestRunAnalysis
Pure review-follow-up; reworks the shape of the signal added in the
previous two commits on this branch. No behavior change at the call
sites beyond what the new shape implies.
Why
---
Emitting `cssCheck: { storyId, status }` meant putting a user-authored
storyId (from a user-named component) into telemetry. Component names
are user code — they cannot go into analytics.
It also added a new `storyResults?: StoryTestResult[]` field to
`TestRunSummary`, a separate `findCssCheckStoryResult` helper, and a
tri-state (`'PASS' | 'FAIL' | 'PENDING'`) that the JSDoc itself said
consumers should treat as a boolean anyway.
What
----
- `TestRunAnalysis` gets an optional `cssCheck?: boolean`. Sits
alongside `passed`, `successRate`, etc. — where every other
derived-from-results signal lives.
- `analyzeTestResults` computes it inline from the story list:
PASS -> true, FAIL -> false, PENDING or no match -> absent
(conditional spread, so the key is missing, not `undefined`).
PENDING is genuinely unknown; collapsing it to false would
inflate CSS-failure rates in telemetry.
- `ai-setup-channel` emits `results: summary` as before; the boolean
rides along automatically, no helper import, no extra spread at
the call site.
Delete
------
- `TestRunSummary.storyResults` field + its JSDoc.
- The `storyResults: storyTestResults` line in `parseVitestResults`.
- `findCssCheckStoryResult` helper, `CssCheckStoryResult` interface,
and the `CSS_CHECK_STORY_ID_SUFFIX` constant in
`ai-setup-utils.ts`, plus the `StoryTestResult` import.
- The `findCssCheckStoryResult` describe block in
`ai-setup-utils.test.ts` (7 cases); equivalents live under
`analyze-test-results.test.ts` now.
Tests
-----
- 7 new cases under `describe('cssCheck', ...)` in
`analyze-test-results.test.ts` (true/false, absent on
no-match/PENDING/empty, first-match-wins on prompt violation,
case-insensitive defense).
- The `parse-vitest-report` test keeps its realistic fixture
(expected rgb(37, 99, 235) but got rgba(0, 0, 0, 0)) and now
asserts `summary.cssCheck === false` instead of checking the
removed `storyResults` array.
Net diff vs base
----------------
+132 / -0 across 4 files (was +179 / -1 across 6 files). No new
public surface on `TestRunSummary`.
Ghost-stories side-effect
-------------------------
`ghost-stories-channel.ts` emits `results: testRunResult.summary` too,
so a user whose suite happens to contain a story named `CssCheck`
would see a `cssCheck` boolean in ghost-stories telemetry as well.
Benign (boolean, no user data), very unlikely in practice; not gating
the computation behind a parameter.