Skip to content

fix(webext): bridge tools to the inspected page - #563

Draft
SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:fix/webext-inspected-page-bridge
Draft

fix(webext): bridge tools to the inspected page#563
SaKaNa-Y wants to merge 1 commit into
vitejs:mainfrom
SaKaNa-Y:fix/webext-inspected-page-bridge

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Description

Vue Tracer and A11y in the browser extension currently operate on the DevTools iframe instead of the inspected app. Bind the Vite panel to chrome.devtools.inspectedWindow.tabId and the injected main-frame documentId, then relay page actions and in-page channel messages through dedicated ports.

Validate the panel window, origin, and session before connecting. Tear down stale connections on navigation and report an unsupported page bridge instead of executing page tools in the panel document.

Linked Issues

Companion upstream PR: devframes/devframe#363. This follows the browser extension refactor in #530.

Additional context

Step 2 of 2: keep this PR in draft until the upstream release and dependency upgrade are complete.

Merge and release order:

The dependency bump is deliberately pending; a released version containing the upstream fix is not available yet. Local browser verification used the companion Devframe build. A fresh checkout with the current published dependency versions will report that the inspected-page bridge is unsupported.

Verification:

  • pnpm lint, pnpm typecheck, and pnpm build: passed.
  • pnpm test --run: 324 passed, 2 skipped; includes 13 panel tests covering tab/document binding, handshake validation, message forwarding, navigation cleanup, and unavailable bridges.
  • pnpm -C packages/webext exec vue-tsc --noEmit and pnpm -C packages/webext build: passed.
  • Chrome at http://localhost:5173/ with the companion Devframe build: A11y scans and highlights the app, Vue Tracer displays component bounds and source locations, Escape closes tracing, refresh reconnects, and a second same-origin tab remains unaffected.

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.
@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vitejs/devtools

npm i https://pkg.pr.new/@vitejs/devtools@563

@vitejs/devtools-kit

npm i https://pkg.pr.new/@vitejs/devtools-kit@563

@vitejs/devtools-oxc

npm i https://pkg.pr.new/@vitejs/devtools-oxc@563

@vitejs/devtools-rolldown

npm i https://pkg.pr.new/@vitejs/devtools-rolldown@563

@vitejs/devtools-vite

npm i https://pkg.pr.new/@vitejs/devtools-vite@563

@vitejs/devtools-vitest

npm i https://pkg.pr.new/@vitejs/devtools-vitest@563

commit: 70935a1

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.

1 participant