proposal: modern single-file HTML coverage reporter (React + Monaco) - #9
proposal: modern single-file HTML coverage reporter (React + Monaco)#9travzhang wants to merge 7 commits into
Conversation
AriPerkkio
left a comment
There was a problem hiding this comment.
Hey @travzhang - awesome to have you here! 🙌
I didn't yet take a look at canyonjs-dev-report - rushing a bit to get this initial fork up and running at the moment. But I've been thinking that now that we have full control over istanbul-reports, we should definitely modernize and improve the existing reporters. I was thinking about adding dark mode to the original html reporter and style everything with Vitest's color palette. At first it would probably be a new html-modern reporter which later gets renamed html, while the old one becomes html-legacy.
|
Builtin single-file coverage html will likely unblock the following issue with simpler integration on ui reporter side: |
Thanks @AriPerkkio! Happy to follow the html-modern → later html / html-legacy path. I’ll keep iterating on this as a non-breaking html-modern spike. |
|
Hi @AriPerkkio @hi-ogawa — pushed an update based on your feedback. Summary of what changed: Aligned with the
Vendored into this monorepo
Behavior
This is still a spike / proposal PR — happy to iterate on naming, bundle size, theming (Vitest palette / dark mode), or whether Would appreciate a look when you have time. Also happy to update the PR description to reflect the current shape if that's helpful. |




Status: Proposal / Discussion (Draft)
Hi maintainers 👋
This PR is not meant as a hard replacement of the existing
htmlreporter.I’d love to discuss whether a modern HTML coverage report would be a good fit for
@vitest/istanbul-lib-report, and how you’d prefer to integrate it if so.I’ve been building a modern Istanbul HTML reporter here:
canyonjs-dev-report+ optionalcanyonjs-dev-report-htmlThe current branch is only a spike to make the idea easy to try locally.
Motivation
The classic
html/html-spareporters are solid, but a few UX/maintenance gaps remain for modern tooling:index.html(no asset tree to host/copy).What this spike currently does
"html"name (temporary, for local demo only)pnpm testcan generate the HTML report locallycanyonjs-dev-reportvia pnpm catalogProposed integration options (open to guidance)
I’d be happy to adjust in whichever direction you prefer:
"html-modern"alongside existing"html"/"html-spa"@vitest/*if that’s the long-term preference"html"should eventually default to the modern implementation (with migration notes)Design sketch
Key properties:
ReportBase/createContextflowjson/lcovpay no extra costOpen questions for maintainers
"html"?Demo / references
Happy to reshape this PR however you prefer — including converting it into a pure design discussion and removing the temporary
"html"override.Thanks for your time!