chore(watch): extend Vite HMR to html-reporter and trace viewer#40402
Merged
pavelfeldman merged 2 commits intomicrosoft:mainfrom Apr 24, 2026
Merged
chore(watch): extend Vite HMR to html-reporter and trace viewer#40402pavelfeldman merged 2 commits intomicrosoft:mainfrom
pavelfeldman merged 2 commits intomicrosoft:mainfrom
Conversation
- Add HttpServer.notFoundFallback helper and drop the duplicated
404 closure in dashboard, trace viewer, and html-reporter.
- Trim createViteDevServer options to { root, base? } — no caller
uses configFile or hmrPath.
- Drop the TOCTOU fs.existsSync + fs.statSync pre-check in
serveHtmlReportWithHMR; serveFile already returns false on miss.
- Dedupe url.searchParams.get('path') in serveTraceDataRoute.
Contributor
Test results for "tests 1"4 flaky41453 passed, 847 skipped Merge workflow run. |
Contributor
Test results for "MCP"2 failed 6609 passed, 916 skipped Merge workflow run. |
yury-s
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HttpServer.createViteDevServerso html-reporter, trace viewer, and UI mode can reuse it.vite build --watchsteps). Release builds keep the static branch and DCE the dev-server arm.__PW_HMR__baked-in flag +PW_HMR_STATIC=1runtime override (replaces the dashboard-only__PW_DASHBOARD_HMR__/PW_DASHBOARD_STATIC).vite.sw.config.tsbuild and is served directly by the route handler.