fix(html-reporter): round durations before choosing the unit

Merged
WA
15d ago
+22-5

What and why

  • The HTML report could show a duration as 1000ms, 60.0s, or 1m 60s, because it chose the unit before rounding.
  • It now rounds first, so those values show as 1.0s, 1m 0s, and 2m 0s. The terminal already does this for minutes, but those helpers live in the Node report package and aren't imported by the report page.

Issue

Fixes #1824

Verified

Ran it locally: yes

mainthis branch
999.6ms → 1000ms1.0s
59.96s → 60.0s1m 0s
119.6s → 1m 60s2m 0s
1.5s → 1.5s1.5s

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.