feat(json-render): expose native rendering for browser contexts - #411
Draft
dvcolomban wants to merge 1 commit into
Draft
dvcolomban wants to merge 1 commit into
dvcolomban wants to merge 1 commit 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 28, 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)
The reference JSON renderer uses RPC calls and shared state, but its type requires a full hub client context. A browser page with an existing native RPC connection cannot mount it through a public package import. Publishing a JSON view has the same full-context requirement even though it only uses native shared state.
Changes (What)
Expose the existing browser bundle as
@devframes/json-render-ui/rendererand view publication as@devframes/json-render/view. Accept their native RPC dependencies directly. Existing custom renderer types still default to the full client context, and the node entry point stays compatible.Generate the renderer declaration from its existing module. No declaration shim or implementation file moves are needed. Failed initial mounts release their observer and content root. Document that view publishers reuse one context object for discovery and duplicate detection.
This is the JSON-only part split from #410. It adds no transport, authentication or serialization implementation.
Verification (Testing)
Both affected packages build, including the reference renderer and standalone SPA. Focused view, hub renderer, action and renderer tests pass, along with type checks for json-render, json-render-ui and hub. Scoped lint and Knip pass. Thirty API snapshot checks pass against fresh artifacts.
The split RPC and renderer changes were also verified together in a real Chromium extension. All 12 scenarios pass, covering two native connections, rendering, actions, shared-state writes, rich values, failed mount cleanup, disconnect disposal and reconnect. The maintained integration passes in CI. Upstream lint, type checks, Knip, Bun and Deno checks pass; the unit jobs still hit the three baseline diagnostic snapshot mismatches addressed separately in #412.