Skip to content

chore(dashboard): enable Vite HMR in watch mode#40327

Merged
pavelfeldman merged 1 commit into
microsoft:mainfrom
pavelfeldman:hmr_dash
Apr 21, 2026
Merged

chore(dashboard): enable Vite HMR in watch mode#40327
pavelfeldman merged 1 commit into
microsoft:mainfrom
pavelfeldman:hmr_dash

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

Summary

  • Watch builds auto-serve the dashboard through an embedded Vite dev server in dashboardApp.ts, so edits to packages/dashboard/src/* reload live when running npx playwright show --port=0. Release builds always serve the pre-built lib/vite/dashboard/ static output — the dev-server branch is gated by a compile-time __PW_DASHBOARD_HMR__ flag (define) and DCE'd in release.
  • PW_DASHBOARD_STATIC=1 opts back into static serving during watch for verifying the bundled output.
  • HttpServer.createWebSocket now routes HTTP upgrades manually (noServer: true) so Vite's HMR websocket can coexist on the same http.Server — the previous { server, path } form had the ws library aborting non-matching upgrades with 400.
  • Extracted DashboardClientContext into its own module and made createRoot idempotent so index.tsx stays a Fast Refresh boundary.

@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

4 failed
❌ [firefox] › mcp/cli-devtools.spec.ts:141 › video-start-stop @mcp-windows-latest
❌ [firefox] › mcp/cli-devtools.spec.ts:155 › video-chapter @mcp-windows-latest
❌ [firefox] › mcp/cli-session.spec.ts:99 › delete-data @mcp-windows-latest
❌ [firefox] › mcp/cli-session.spec.ts:191 › list --all lists sessions from all workspaces @mcp-windows-latest

6430 passed, 976 skipped


Merge workflow run.

@pavelfeldman pavelfeldman merged commit 5419310 into microsoft:main Apr 21, 2026
35 of 37 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › ui-mode-test-network-tab.spec.ts:395 › should copy network request @windows-latest-node20

4 flaky ⚠️ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation `@chromium-ubuntu-22.04-node20`
⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1080 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-test-output.spec.ts:118 › should collapse repeated console messages for test `@ubuntu-latest-node22`

39246 passed, 847 skipped


Merge workflow run.

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.

2 participants