Skip to content

feat(html-report): counts-first header + shared suite-sort comparator#135

Merged
maximn merged 1 commit into
mainfrom
feat/html-report-consistency
May 30, 2026
Merged

feat(html-report): counts-first header + shared suite-sort comparator#135
maximn merged 1 commit into
mainfrom
feat/html-report-consistency

Conversation

@maximn
Copy link
Copy Markdown
Contributor

@maximn maximn commented May 30, 2026

Summary

Consistency sweep for the HTML report artifact, bringing it in line with the patterns that landed for the CI summary (#125) and PR comment (#126).

  • Header H1 leads with the counts-first metrics strip then pass rate, matching ## ${renderMetricsStrip} — ${passRate}% in summary.ts. "TestGlance Results" comes out of the H1 — it's already in <title>. Duration and health score move to the metrics subline.
  • Suite breakdown now uses compareSuitesByHealth, picking up the failed → skipped → duration tiebreakers from feat(summary): tiebreak suite breakdown on failed/skipped/duration #129 / refactor(summary): share suite-health comparator across both renderers #130 that this surface was missing.
  • compareSuitesByHealth extracted from summary.ts into format.ts so all three surfaces (summary breakdown, summary all-tests, html-report breakdown) share one source of truth — no more drift between them.

Before / after — H1

- 🔴 TestGlance Results — 97.2% pass rate
+ 🔴 ✅ 138 passed · ❌ 3 failed · ⏭️ 1 skipped — 97.2%

Out of scope

Check Run output (check-run.ts) gets the same treatment in a follow-up PR.

Test plan

  • pnpm test — 701/701 passing (added 2 in html-report.test.ts: H1 ordering, suite tiebreaker)
  • pnpm typecheck clean
  • pnpm lint clean

…parator

Consistency sweep for the HTML report artifact, matching the patterns
that landed for the CI summary (#125) and PR comment (#126):

- Header H1 leads with counts-first metrics strip then pass rate,
  matching `## ${renderMetricsStrip} — ${passRate}%` in summary.ts.
  Drops "TestGlance Results" from H1 — already present in `<title>`.
  Duration + health score move to the metrics subline.
- Suite breakdown now uses `compareSuitesByHealth` shared via format.ts,
  picking up the failed/skipped/duration tiebreakers (#129/#130) that
  this surface was missing.
- `compareSuitesByHealth` extracted from summary.ts into format.ts so
  all three surfaces (summary breakdown, summary all-tests, html-report
  breakdown) share one source of truth.
@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

🔬 TestGlance

test · ✅ 701 passed — 100.0%

████████████████ 100.0%
⏱️ 1.4s · 🏥 95/100


Signal Details
🔵 2 new test(s) added
🔵 Duration -0.273% vs baseline (1.4s)
🔵 Health Score: 95 → 95

vs main

Metric main PR Delta
Pass rate 100.0% 100.0% +0.0%
Duration 2.0s 1.4s -32.3%

View Run → · 📄 HTML Report


Updated 2026-05-30T18:29:05.655Z

@maximn maximn merged commit ecde2d6 into main May 30, 2026
7 checks passed
@maximn maximn deleted the feat/html-report-consistency branch May 30, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant