Skip to content

fix(report): sync HTML reports with console theme - #1646

Merged
Yunnglin merged 2 commits into
mainfrom
fix/html-report-theme
Aug 27, 2026
Merged

fix(report): sync HTML reports with console theme#1646
Yunnglin merged 2 commits into
mainfrom
fix/html-report-theme

Conversation

@Yunnglin

Copy link
Copy Markdown
Collaborator

Summary

  • make standalone evaluation and performance HTML reports inherit the Web console's evalscope-theme preference before first paint
  • add light-theme report tokens and restyle embedded Plotly layouts to match the active theme
  • keep dark as the fallback and preserve the self-contained report format

Fixes #1639

Root cause

The React console persisted its theme in local storage, while generated HTML reports shipped a separate dark-only stylesheet and plotly_dark layouts. Since reports render as independent documents, the console theme did not cross that boundary.

Design

The report reuses the existing evalscope-theme key with the same preference order as the console: saved preference, OS preference, then dark. No new API parameter, report-generation option, URL state, or cross-window messaging is introduced.

Verification

  • 14 focused report tests passed
  • CI smoke test passed
  • make lint passed
  • browser E2E verified evaluation (3 Plotly charts) and perf (18 Plotly charts) reports in light and dark modes, with matching computed colors and no console errors

Compatibility

Existing generated HTML files contain inlined templates and must be regenerated to pick up the new theme support.

Copilot AI lite review requested due to automatic review settings August 27, 2026 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Yunnglin
Yunnglin merged commit deffad1 into main Aug 27, 2026
3 checks passed
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.

UI颜色怎么设置正常白色(light)?

2 participants