Skip to content

fix(hub-ui): bridge tools to the inspected page - #363

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

fix(hub-ui): bridge tools to the inspected page#363
SaKaNa-Y wants to merge 1 commit into
devframes:mainfrom
SaKaNa-Y:fix/inspected-page-bridge

Conversation

@SaKaNa-Y

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

Copy link
Copy Markdown
Contributor

Problem

Vue Tracer and A11y opened from the Vite DevTools browser extension run against the hub UI provider's iframe instead of the inspected app. The existing parent/opener connection does not cross the extension boundary. Action setup can also finish after its first activation event, leaving Tracer inactive on the first click.

Fix

Add a transport-neutral createInPageChannelRelay and a dedicated inspected-page endpoint in @devframes/hub-ui. Browser adapters bind the transport to a document; page scripts and actions run there while custom renderers stay in the hub UI provider document. Existing panel channel APIs remain unchanged.

Finish action setup before activation, serialize stale activation cleanup, and dispose relayed ports and active actions on disconnect. Include protocol documentation, API snapshots, and regression coverage for first activation, rapid navigation, reconnection, and session isolation.

Merge and release order

This is step 1 of 2 in the Devframe / Vite DevTools fix. Keep this PR in draft for review.

  1. Merge this PR and publish the affected Devframe packages, including devframe, @devframes/hub, and @devframes/hub-ui.
  2. Upgrade the Devframe dependencies in the companion Vite DevTools PR to that release, validate with the published packages, then merge and release the extension changes.

Companion browser extension adapter: vitejs/devtools#563. That draft PR depends on this release; this PR can merge first.

Verification

  • pnpm lint and pnpm knip: passed.
  • pnpm test --run: full build passed; 1,492 tests passed, 9 skipped, with API snapshot checks included.
  • pnpm typecheck: 39 tasks passed.
  • Chrome at http://localhost:5173/, using the local Devframe build and companion extension: A11y scans and highlights the app; Vue Tracer shows component bounds and source locations; Escape closes tracing; refresh reconnects; a second same-origin tab remains unaffected.
  • The rapid Tracer → Settings → Tracer regression failed before the fix and passes afterward.

Add a transport-neutral in-page channel relay and a dedicated inspected-page endpoint for browser adapters. Route page scripts and action activation to the inspected document while keeping custom renderers in the hub UI provider document.

Run action setup before activation and serialize stale activation cleanup so rapid navigation cannot disable a newer action. Cover port routing, lifecycle cleanup, isolation, activation races, and the public API with regression tests and snapshots.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

@SaKaNa-Y is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

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