fix(webext)!: bridge tools to the inspected page - #563
Open
SaKaNa-Y wants to merge 2 commits into
Open
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.
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
Step 2 of 2: keep this PR in draft until the upstream release and dependency upgrade are complete.
The dependency upgrade remains pending. The current dependency versions do not contain the inspected-page endpoint required by this adapter.
Companion upstream PR: devframes/devframe#363. This 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.