Skip to content

refactor(browser): share trace types and utils - #11604

Closed
hi-ogawa wants to merge 1 commit into
vitest-dev:mainfrom
hi-ogawa:refactor/trace-shared-utils
Closed

hi-ogawa wants to merge 1 commit into
vitest-dev:mainfrom
hi-ogawa:refactor/trace-shared-utils

Conversation

@hi-ogawa

@hi-ogawa hi-ogawa commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

WIP 🤖

The browser trace data shape is owned by the browser package, so the UI imports it from the browser package's source by relative path, and BrowserTraceArtifact.data is typed as unknown in vitest. #11594 also reads these artifacts from the reporter and would otherwise need its own copy of the shape and of the logic that merges entries by attempt.

This PR moves the trace data types next to BrowserTraceArtifact in vitest (marked experimental, like the artifact), so the browser package and the UI import them from vitest. The logic that merges trace artifacts by attempt and pairs range start/end entries moves to @vitest/utils/trace, because the UI client can't import runtime code from vitest. It's written against a minimal entry shape, so vitest's published types don't depend on @vitest/utils.

There's no behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hi-ogawa added a commit to hi-ogawa/vitest that referenced this pull request Oct 15, 2026
Moved to vitest-dev#11604

This reverts commit e4a8e37.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 15, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9a7ae9d
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6ad0b1149a2278dfa81041f3
😎 Deploy Preview https://deploy-preview-11604--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@hi-ogawa

Copy link
Copy Markdown
Collaborator Author

maybe someday. closing for now.

@hi-ogawa hi-ogawa closed this Oct 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant