Conversation
Bind the DevTools panel to its inspected tab and exact document, and relay page actions and in-page channels through dedicated ports. This lets Vue Tracer and A11y operate on the user app instead of the extension iframe. Dispose connections on navigation and surface unsupported page bridges. Requires the companion Devframe bridge release before the downstream dependency upgrade and merge.
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
Enable native structured-clone extension messaging and cover rich payload round trips through the inspected-page relay in Chromium. BREAKING CHANGE: the extension now requires Chrome 148 or later. Upgrade Chrome before installing this extension version.
SaKaNa-Y
marked this pull request as ready for review
September 11, 2026 12:21
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.
Important
Please take a moment to read this. Thank you!
I should include a brief explanation of the problem in my own words in every PR. If that explanation is missing, please @mention me and do not merge this PR until I have added it. You may also leave this PR unaddressed (because this means I have not fulfilled my responsibilities as the author).
If my explanation is unclear or difficult to follow, please ask me to clarify or provide reproduction steps or supporting evidence.
I welcome suggestions and counterarguments, especially questions about anything I may have overlooked. (Your feedback helps me learn and improve. 🙏)
I hold myself to this standard for every PR, regardless of its size.
Problem
Vue Tracer and A11y opened from the browser extension operate on the DevTools iframe instead of the inspected app. The extension boundary also defaults to JSON messaging, which changes typed-array and map values and rejects big integers and cyclic channel payloads.
Fix
Bind the Vite panel to
chrome.devtools.inspectedWindow.tabIdand the injected main-framedocumentId. Relay page actions and in-page channel messages through dedicated ports, validating the panel window, origin, and session. Dispose stale connections on navigation and report unsupported page bridges explicitly.Enable native structured-clone extension messaging to preserve channel payloads. The Chromium regression exercises the production isolated-world relay through real runtime ports and checks typed arrays, big integers, maps, sets, shared references, cyclic objects, dates, and blobs in a round trip. It fails with the previous manifest and passes with the updated configuration.
Breaking
The extension requires Chrome 148 or later, where native structured-clone messaging is supported. Upgrade Chrome before installing this extension version. The manifest enforces the minimum version, and the extension README documents it.
Merge and release order
devframe,@devframes/hub, and@devframes/hub-ui.The first two fixes are independently mergeable and may be reviewed in parallel. The recommended order above puts the Tracer lifecycle fix first; the extension integration remains the final step. Published-package validation should include repeated Tracer activation, cancellation, and A11y inspection against the inspected app.
The dependency upgrades and validation against the required published packages remain pending. This PR follows the browser extension refactor in #530.
Verification
pnpm lint,pnpm typecheck, andpnpm build: passed.pnpm test --run: 324 passed, 2 skipped, including 13 panel tests for binding, handshakes, forwarding, navigation cleanup, and unsupported bridges.pnpm -C packages/webext exec vue-tsc --noEmitandpnpm -C packages/webext build: passed.pnpm -C e2e exec vitest run tests/webext-inspected-page.test.ts: passed in Chromium using real extension messaging.