From 1854eba21686ae4ad7e90140b9e9e3360ed6c02c Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 6 Jan 2026 13:38:45 +0100 Subject: [PATCH 1/4] revert panel issue --- packages/devtools-utils/src/react/panel.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/devtools-utils/src/react/panel.tsx b/packages/devtools-utils/src/react/panel.tsx index cfc82f79..274ff8b3 100644 --- a/packages/devtools-utils/src/react/panel.tsx +++ b/packages/devtools-utils/src/react/panel.tsx @@ -32,16 +32,18 @@ export function createReactPanel< const devToolRef = useRef(null) const devtools = useRef(null) useEffect(() => { - const instance = new CoreClass() - devtools.current = instance + if (devtools.current) return + + devtools.current = new CoreClass() if (devToolRef.current) { - instance.mount(devToolRef.current, props?.theme ?? 'dark') + devtools.current.mount(devToolRef.current, props?.theme ?? 'dark') } return () => { - instance.unmount() - devtools.current = null + if (devToolRef.current) { + devtools.current?.unmount() + } } }, [props?.theme]) From c1e6cc84f59abb3e51e147d56a7b706ef9ff7145 Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 6 Jan 2026 13:39:17 +0100 Subject: [PATCH 2/4] changeset --- .changeset/thin-pianos-rhyme.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/thin-pianos-rhyme.md diff --git a/.changeset/thin-pianos-rhyme.md b/.changeset/thin-pianos-rhyme.md new file mode 100644 index 00000000..2e9e0d70 --- /dev/null +++ b/.changeset/thin-pianos-rhyme.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools-utils': patch +--- + +revert panel generation From 4c00a11556b7a4350ecc2c27cad9c5239ae117aa Mon Sep 17 00:00:00 2001 From: Alem Tuzlak Date: Tue, 6 Jan 2026 14:33:31 +0100 Subject: [PATCH 3/4] fixup for the panel classes --- .changeset/neat-peaches-matter.md | 5 +++++ packages/devtools-utils/src/preact/panel.tsx | 5 ++--- packages/devtools-utils/src/react/panel.tsx | 5 ++--- 3 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 .changeset/neat-peaches-matter.md diff --git a/.changeset/neat-peaches-matter.md b/.changeset/neat-peaches-matter.md new file mode 100644 index 00000000..9288b229 --- /dev/null +++ b/.changeset/neat-peaches-matter.md @@ -0,0 +1,5 @@ +--- +'@tanstack/devtools-utils': patch +--- + +fix: panel issue fix diff --git a/packages/devtools-utils/src/preact/panel.tsx b/packages/devtools-utils/src/preact/panel.tsx index fddf6379..f5ef3558 100644 --- a/packages/devtools-utils/src/preact/panel.tsx +++ b/packages/devtools-utils/src/preact/panel.tsx @@ -34,8 +34,6 @@ export function createPreactPanel< const devToolRef = useRef(null) const devtools = useRef(null) useEffect(() => { - if (devtools.current) return - devtools.current = new CoreClass() if (devToolRef.current) { @@ -44,7 +42,8 @@ export function createPreactPanel< return () => { if (devToolRef.current) { - devtools.current?.unmount() + devtools.current?.unmount(); + devtools.current = null; } } }, [props?.theme]) diff --git a/packages/devtools-utils/src/react/panel.tsx b/packages/devtools-utils/src/react/panel.tsx index 274ff8b3..260e3737 100644 --- a/packages/devtools-utils/src/react/panel.tsx +++ b/packages/devtools-utils/src/react/panel.tsx @@ -32,8 +32,6 @@ export function createReactPanel< const devToolRef = useRef(null) const devtools = useRef(null) useEffect(() => { - if (devtools.current) return - devtools.current = new CoreClass() if (devToolRef.current) { @@ -42,7 +40,8 @@ export function createReactPanel< return () => { if (devToolRef.current) { - devtools.current?.unmount() + devtools.current?.unmount(); + devtools.current = null; } } }, [props?.theme]) From 85c21f9eecf35ac39ed37699878cf1a9bd3ce737 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:34:29 +0000 Subject: [PATCH 4/4] ci: apply automated fixes --- packages/devtools-utils/src/preact/panel.tsx | 4 ++-- packages/devtools-utils/src/react/panel.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/devtools-utils/src/preact/panel.tsx b/packages/devtools-utils/src/preact/panel.tsx index f5ef3558..35deeb0f 100644 --- a/packages/devtools-utils/src/preact/panel.tsx +++ b/packages/devtools-utils/src/preact/panel.tsx @@ -42,8 +42,8 @@ export function createPreactPanel< return () => { if (devToolRef.current) { - devtools.current?.unmount(); - devtools.current = null; + devtools.current?.unmount() + devtools.current = null } } }, [props?.theme]) diff --git a/packages/devtools-utils/src/react/panel.tsx b/packages/devtools-utils/src/react/panel.tsx index 260e3737..3d3e580a 100644 --- a/packages/devtools-utils/src/react/panel.tsx +++ b/packages/devtools-utils/src/react/panel.tsx @@ -40,8 +40,8 @@ export function createReactPanel< return () => { if (devToolRef.current) { - devtools.current?.unmount(); - devtools.current = null; + devtools.current?.unmount() + devtools.current = null } } }, [props?.theme])