feat(browser): support dom snapshot trace view#10102
Draft
hi-ogawa wants to merge 60 commits intovitest-dev:mainfrom
Draft
feat(browser): support dom snapshot trace view#10102hi-ogawa wants to merge 60 commits intovitest-dev:mainfrom
hi-ogawa wants to merge 60 commits intovitest-dev:mainfrom
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
…ip-builtin-trace-system
… safe)
- store { serialized, nodeId } as snapshot payload in BrowserTraceEntry
- takeSnapshot() passes explicit Mirror to snapshot(), resolves ivya selector → nodeId
- TraceView.vue uses mirror.getNode(nodeId) after rebuild() instead of querySelector
- removes CSS selector approach which breaks for shadow DOM elements
- drops __vitest_css_from_element__ global (no longer needed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- use getBoundingClientRect + position:fixed overlay div instead of inline styles - snapshot DOM is untouched; overlay is purely visual - use requestAnimationFrame to ensure layout before reading rect - credit Playwright's highlight.ts as reference for the technique - mirror.getNode(selectorId) for shadow DOM-safe element lookup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- add __vitest_recordBrowserTrace server command (mirrors annotateTraces pattern)
- resolves stack → location via parseStacktrace in one batch server-side
- calls _testRun.recordArtifact directly, no browser-side recordArtifact
- BrowserTraceEntry gains location?: { file, line, column }
- TraceView shows clickable source location per step via openLocation composable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move browser traces out of the report card into the top panel layout and allow the trace viewer to open without browser orchestrator state. Keep BrowserIframe visible during browser orchestration by splitting the top pane when a trace is active. Co-authored-by: Codex <noreply@openai.com>
Wrap the trace viewer in a dedicated pane with a header and close action, and rename the component to TraceViewPane for consistency with the split layout. Co-authored-by: Codex <noreply@openai.com>
This reverts commit 8cee41f.
Emit one browser trace artifact for each retry or repeat attempt and update the UI to treat each trace artifact as a separate viewer entry. The trace viewer now labels retry and repeat attempts directly from artifact metadata. Co-authored-by: Codex <noreply@openai.com>
Update the selected trace step before opening its source location from the trace viewer. Co-authored-by: Codex <noreply@openai.com>
Render selector text as a secondary line in the trace step list when available. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
…ip-builtin-trace-system
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Description
Quick demo
--browser.traceViewoption automatically enables watch UI or HTML reporter. This is to introduce new experience of browser mode as single opt-in flag as experimental feature. The goal is to make this mode as default and eventually retire "headed orchestrator UI" model (except "preview" provider?).Screenshot
pnpm -C examples/lit test --browser.traceViewTODO
test.browser.traceView: true--browser.headless --uion watch--browser.headless --reporter htmlon non watchPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.