feat(client): support isolated RPC connections - #401
Draft
dvcolomban wants to merge 4 commits into
Draft
dvcolomban wants to merge 4 commits into
dvcolomban wants to merge 4 commits into
Conversation
|
@dvcolomban is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Sep 24, 2026
dvcolomban
commented
Sep 25, 2026
This branch has not been deployed
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.
Background (Why)
An external viewer can own RPC connections to several independent Devframe endpoints in one browser document. A previously cached connection can override a later
baseURL, and shared window/localStorage credentials plus the authentication BroadcastChannel can overwrite another endpoint's remembered token. Explicit connection descriptors select the endpoint but still participate in that shared authentication state.This affects multi-project dashboards and applications that manage their own credential persistence. The downstream use case and reproduced behavior are recorded in dvcol/devkit-extension#7.
Changes (What)
Add
isolated?: booleantoDevframeConnection. An isolated connection bypasses shared connection discovery and credential storage, and does not create the shared authentication BroadcastChannel. Token and OTP updates retain the setting on that connection descriptor.Setup accepts a complete connection or an isolation-only input before fetching metadata:
Reusing the descriptor preserves isolation. Omitting
isolatedor usingfalsekeeps existing shared behavior. Discovery and credential finalization are separate; token/OTP updates share one helper. Authentication channel creation uses a ternary inside its existing try/catch. No separate storage interface or standalone isolation toggle is introduced.Verification (Testing)
The six affected connection/auth files pass all 39 tests, including fetched-descriptor reuse, independent authentication updates, reconnecting from a retained descriptor, shared defaults and transport disposal. Browser storage and transport I/O are mocked at their existing boundaries; these tests do not claim a new end-to-end browser run.
All 92 devframe API snapshot checks pass. Package build/typecheck and changed-file ESLint pass. The downstream installed backport also passes 19 server tests, four negative type fixtures and 18 real native-host tests. Full monorepo validation runs in PR CI.