Skip to content

fix(reporter): pass project label colors to HTML reporter#10153

Closed
Jack-sh1 wants to merge 1 commit intovitest-dev:mainfrom
Jack-sh1:fix/html-reporter-project-label-color
Closed

fix(reporter): pass project label colors to HTML reporter#10153
Jack-sh1 wants to merge 1 commit intovitest-dev:mainfrom
Jack-sh1:fix/html-reporter-project-label-color

Conversation

@Jack-sh1
Copy link
Copy Markdown

The HTML reporter serialized only project names, discarding the color config. The static client then returned an empty array for getResolvedProjectLabels. Now both the metadata and the static client carry { name, color } objects, matching the live UI behavior.

Closes #10141

Description

Description

The HTML reporter only serialized project names as plain strings, discarding the color config. The static client also returned an empty array for getResolvedProjectLabels. This caused custom project label colors (defined in vitest config) to not render in the HTML report, even though the live UI displayed them correctly.

This PR changes projects in the HTML metadata from string[] to { name, color }[], and wires up the static client to return the actual label data.

Resolves #10141

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by GitHub organizations.

Tests

  • Run the tests with pnpm test:ci.

The HTML reporter serialized only project names, discarding the
color config. The static client then returned an empty array for
getResolvedProjectLabels. Now both the metadata and the static
client carry { name, color } objects, matching the live UI behavior.

Closes vitest-dev#10141
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 16, 2026

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3426c13
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/69e0919b4116240008ce9a5d
😎 Deploy Preview https://deploy-preview-10153--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va
Copy link
Copy Markdown
Member

#10142 fixes it

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.

HTML reporter doesn't load project label color config

2 participants