fix(hub-ui): bridge tools to the inspected page - #363
Draft
SaKaNa-Y wants to merge 1 commit into
Draft
Conversation
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.
|
@SaKaNa-Y is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
3 tasks
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 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
createInPageChannelRelayand 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.
devframe,@devframes/hub, and@devframes/hub-ui.Companion browser extension adapter: vitejs/devtools#563. That draft PR depends on this release; this PR can merge first.
Verification
pnpm lintandpnpm knip: passed.pnpm test --run: full build passed; 1,492 tests passed, 9 skipped, with API snapshot checks included.pnpm typecheck: 39 tasks passed.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.