fix(devtools-solid): mounting devtools removes the rendered content

Open
#376 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@monsterlag is already working on this.

Since Oct 21, 2026.

  • #385 by @xiehuanyi — closed without merging
  • #406 by @monsterlag — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
devtools, frontend

Research direction

Start by reproducing the documented sibling mount from packages/devtools-solid/README.md, then inspect ElementRendererContent in packages/solid/src/renderer.tsx and the devtools-solid adapter. Compare the DOM with and without devtools activation using the one-element spec. Done means the rendered text remains visible when JsonRenderDevtools is mounted, with the existing inspection behavior preserved.

Written by the indexing model from the issue text.

Description

Summary

Adding the documented drop-in JsonRenderDevtools sibling to a Solid renderer removes the visible content of a one-element spec. The renderer becomes an empty keyed span without a browser exception.

Steps to reproduce

  1. Create a Vite consumer with vite-plugin-solid and install @json-render/[email protected], @json-render/[email protected], @json-render/[email protected], [email protected], and [email protected].
  2. Mount this component in the browser.
import { render } from "solid-js/web";
import { JSONUIProvider, Renderer } from "@json-render/solid";
import { JsonRenderDevtools } from "@json-render/devtools-solid";

const registry = { Text: (ctx) => <p>{ctx.element.props.text}</p> };
const spec = {
  root: "text",
  elements: { text: { type: "Text", props: { text: "Visible renderer" } } },
};
render(() => (
  <JSONUIProvider registry={registry}>
    <Renderer spec={spec} registry={registry} />
    <JsonRenderDevtools spec={spec} />
  </JSONUIProvider>
), document.getElementById("app"));
  1. Inspect the application content after the devtools toggle mounts. Repeat after removing the JsonRenderDevtools sibling.

Expected behavior

Both runs show Visible renderer. Enabling devtools may add inspection attributes or wrappers, but it must preserve the renderer's content. That differential is the closure signal.

Actual behavior

Without devtools, the application contains <p>Visible renderer</p>. With the drop-in devtools component, it contains <span style="display:contents" data-jr-key="text"></span> and no text. Both runs have zero page errors. A third control that calls markDevtoolsActive() before mounting restores the text inside the keyed span.

Affected area

Solid renderer devtools activation and the @json-render/devtools-solid adapter.

Runtime or environment

Reproduced with all json-render packages at 0.21.0, Node v22.23.2, solid-js 1.9.15, vite-plugin-solid 2.11.10, Vite 6.4.3, Playwright 1.58.2, and Chromium 145.0.7632.6. The same differential was previously observed with Vite 7.3.1. Inspected source revision is fc2a696a50a30cb30c878ab1eb65e102487eea0f.

Evidence

The adapter README documents the sibling mount used above. ElementRendererContent places a cached rendered value in the fallback and active wrapper branches of Show. The browser differential isolates the behavior to devtools activation with one renderer component and one spec element.

Impact

The documented devtools integration makes an otherwise working Solid view disappear.

Dominant language
TypeScript
Stars
20k
Forks
1.1k
Avg merge
1d 18h
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vercel-labs/json-render

All issues in vercel-labs/json-render

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.