Skip to content

feat: refactor props passing to plugins for improved flexibility#319

Merged
AlemTuzlak merged 8 commits intomainfrom
feat/improve-props-passing-to-plugins
Mar 13, 2026
Merged

feat: refactor props passing to plugins for improved flexibility#319
AlemTuzlak merged 8 commits intomainfrom
feat/improve-props-passing-to-plugins

Conversation

@AlemTuzlak
Copy link
Collaborator

@AlemTuzlak AlemTuzlak commented Jan 14, 2026

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • New Features

    • Plugin props now include devtoolsOpen alongside theme; UI panels and tabs pass visibility state.
  • Breaking Changes

    • Plugin render/name callbacks and panel mountters now receive a single props object instead of a theme string.
  • Tests

    • Tests updated to use the new props-shaped mount API.
  • Chores

    • Minor version bumps for several packages and housekeeping (.gitignore update).

@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

🦋 Changeset detected

Latest commit: 4392d1b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@tanstack/preact-devtools Minor
@tanstack/devtools-utils Minor
@tanstack/react-devtools Minor
@tanstack/solid-devtools Minor
@tanstack/devtools Minor
@tanstack/vue-devtools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Jan 14, 2026

View your CI Pipeline Execution ↗ for commit 4392d1b

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 2m 42s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 35s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-13 11:51:05 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 14, 2026

More templates

@tanstack/devtools

npm i https://pkg.pr.new/@tanstack/devtools@319

@tanstack/devtools-client

npm i https://pkg.pr.new/@tanstack/devtools-client@319

@tanstack/devtools-ui

npm i https://pkg.pr.new/@tanstack/devtools-ui@319

@tanstack/devtools-utils

npm i https://pkg.pr.new/@tanstack/devtools-utils@319

@tanstack/devtools-vite

npm i https://pkg.pr.new/@tanstack/devtools-vite@319

@tanstack/devtools-event-bus

npm i https://pkg.pr.new/@tanstack/devtools-event-bus@319

@tanstack/devtools-event-client

npm i https://pkg.pr.new/@tanstack/devtools-event-client@319

@tanstack/preact-devtools

npm i https://pkg.pr.new/@tanstack/preact-devtools@319

@tanstack/react-devtools

npm i https://pkg.pr.new/@tanstack/react-devtools@319

@tanstack/solid-devtools

npm i https://pkg.pr.new/@tanstack/solid-devtools@319

@tanstack/vue-devtools

npm i https://pkg.pr.new/@tanstack/vue-devtools@319

commit: 87629da

AlemTuzlak and others added 4 commits January 14, 2026 11:13
…ssing-to-plugins

# Conflicts:
#	packages/devtools-utils/package.json
#	packages/devtools-utils/src/solid/class.test.tsx
#	packages/devtools-utils/src/solid/class.ts
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e82eed4-83aa-48ac-99e8-ca682d1e902a

📥 Commits

Reviewing files that changed from the base of the PR and between 15e0903 and 4392d1b.

📒 Files selected for processing (3)
  • .gitignore
  • packages/devtools-utils/src/solid/class-mount-impl.tsx
  • packages/devtools-utils/src/solid/class.ts

📝 Walkthrough

Walkthrough

Refactors plugin APIs to pass a unified TanStackDevtoolsPluginProps object (with theme and devtoolsOpen) across devtools and framework integrations, replacing prior single theme arguments and updating related mounts, renders, types, and tests.

Changes

Cohort / File(s) Summary
Core types & export
packages/devtools/src/context/devtools-context.tsx, packages/devtools/src/index.ts
Added TanStackDevtoolsPluginProps and updated plugin name/render signatures to accept props; re-exported the type.
Changeset
.changeset/thirty-spies-fetch.md
Bumped minor versions for multiple packages and added changelog note: "Change the way props are passed to the plugins."
Package manifest
packages/devtools-utils/package.json
Consolidated duplicate devDependencies into a single top-level section.
Devtools-utils — Preact & React
packages/devtools-utils/src/preact/panel.tsx, packages/devtools-utils/src/preact/plugin.tsx, packages/devtools-utils/src/react/panel.tsx, packages/devtools-utils/src/react/plugin.tsx
Made DevtoolsPanelProps extend plugin props; changed mount signatures to accept full props; plugin render now spreads props into component.
Devtools-utils — Solid
packages/devtools-utils/src/solid/class.ts, .../class-mount-impl.tsx, .../panel.tsx, .../plugin.tsx, .../class.test.tsx
Changed mounting helpers and core classes to accept TanStackDevtoolsPluginProps; updated __mountComponent and lazy components to accept props; adjusted tests to pass { theme, devtoolsOpen }.
Devtools-utils — Vue
packages/devtools-utils/src/vue/panel.ts
Panel props now extend TanStackDevtoolsPluginProps; Core mount accepts props instead of theme.
Devtools UI components
packages/devtools/src/components/tab-content.tsx, packages/devtools/src/tabs/plugins-tab.tsx, packages/devtools/src/tabs/index.tsx, packages/devtools/src/devtools.tsx
TabContent and PluginsTab now accept { isOpen: boolean }; plugin name/render calls pass both theme and devtoolsOpen; invocations updated to forward isOpen.
Framework-specific devtools
packages/preact-devtools/src/devtools.tsx, packages/react-devtools/src/devtools.tsx, packages/solid-devtools/src/core.tsx
Updated PluginRender and convertRender signatures and all call sites to accept and forward TanStackDevtoolsPluginProps instead of a theme string.
Gitignore
.gitignore
Broadened *settings.local.json ignore and added .claude/worktrees ignore.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐰 A tiny rabbit hops with glee,
Bundling props for all to see,
Theme and open state tucked in tight,
From React to Vue, the plugins light,
Hooray—one prop to rule the night! 🥕✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description uses the correct template but the 'Changes' section is empty, providing no implementation details about the refactoring. The checklist items are all unchecked despite the PR being submitted. Complete the 'Changes' section with detailed explanations of what was modified and why, and verify that the contributing guide was followed and tests were run before submitting.
Docstring Coverage ⚠️ Warning Docstring coverage is 15.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: refactoring how props are passed to plugins. This aligns with the substantial modifications across multiple files involving parameter signature changes from theme strings to TanStackDevtoolsPluginProps objects.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/improve-props-passing-to-plugins
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
packages/devtools-utils/src/react/panel.tsx (1)

33-47: ⚠️ Potential issue | 🟠 Major

Don't key the mount effect off the entire props object.

When props is recreated with the same values, the effect dependency [props] still triggers because of object identity, not value equality. Since plugin.render() in plugins-tab.tsx creates a new props object { theme, devtoolsOpen } on each render, the Panel component will unnecessarily unmount and remount even when neither value has changed. This causes loss of panel-local state.

Depend only on the primitive values that should actually trigger a remount:

Suggested fix
-    }, [props])
+    }, [props.theme, props.devtoolsOpen])
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools-utils/src/react/panel.tsx` around lines 33 - 47, The effect
that mounts CoreClass is keyed on the whole props object causing remounts when
props identity changes; update the effect to depend only on the actual primitive
values that should trigger a remount (e.g., destructure theme and devtoolsOpen
from props and use those in the dependency array) while leaving devtools.current
= new CoreClass(), devtools.current.mount(devToolRef.current, props) and
devtools.current?.unmount() behavior unchanged; reference devtools.current,
CoreClass, devToolRef.current, mount, and unmount so you replace [props] with a
dependency array like [theme, devtoolsOpen] (or the specific primitive props
used) to avoid unnecessary unmount/remounts.
packages/devtools-utils/src/vue/panel.ts (1)

60-69: ⚠️ Potential issue | 🟡 Minor

Return type is outdated and inconsistent with the new props structure.

The return type still references only theme?: DevtoolsPanelProps['theme'], but the component now accepts the full TanStackDevtoolsPluginProps object via the props prop. This creates a type mismatch between the declared return type and actual usage.

♻️ Suggested fix
   return [Panel, NoOpPanel] as unknown as [
     DefineComponent<{
-      theme?: DevtoolsPanelProps['theme']
+      props?: DevtoolsPanelProps
       devtoolsProps: TComponentProps
     }>,
     DefineComponent<{
-      theme?: DevtoolsPanelProps['theme']
+      props?: DevtoolsPanelProps
       devtoolsProps: TComponentProps
     }>,
   ]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools-utils/src/vue/panel.ts` around lines 60 - 69, The declared
return type for Panel and NoOpPanel is stale: it still exposes theme?:
DevtoolsPanelProps['theme'] but the components actually receive the full
TanStackDevtoolsPluginProps via their props; update the tuple return type to
reflect the new props shape (replace the theme?: DevtoolsPanelProps['theme']
entry with props?: TanStackDevtoolsPluginProps or the exact prop name used by
the components) so the DefineComponent types match the runtime signature (refer
to Panel, NoOpPanel, DevtoolsPanelProps, TanStackDevtoolsPluginProps and
TComponentProps to locate and align the prop types).
packages/devtools-utils/src/preact/panel.tsx (1)

35-49: ⚠️ Potential issue | 🟠 Major

Fix effect dependency to avoid unnecessary remounts.

Line 49 uses the full props object as the effect dependency. Since the cleanup function (lines 43–48) nullifies devtools.current, React will unmount and remount the instance whenever the parent rerenders with a fresh props object, even if theme and devtoolsOpen haven't changed. This causes panel state loss and flickering.

TanStackDevtoolsPluginProps contains only theme and devtoolsOpen, so depend on those specific properties instead:

Suggested fix
-    }, [props])
+    }, [props.theme, props.devtoolsOpen])
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools-utils/src/preact/panel.tsx` around lines 35 - 49, The
effect currently depends on the entire props object causing unnecessary
remounts; update the useEffect dependency array in the component using
useEffect, devtools.current, devToolRef.current and CoreClass to depend only on
the specific TanStackDevtoolsPluginProps fields used (props.theme and
props.devtoolsOpen) so the instance isn’t unmounted/recreated on unrelated
parent re-renders.
🧹 Nitpick comments (4)
packages/devtools-utils/src/vue/panel.ts (1)

14-17: Consider renaming the prop to avoid confusion.

Having a prop named props that contains DevtoolsPanelProps is confusing. Consider renaming to pluginProps or devtoolsPluginProps for clarity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools-utils/src/vue/panel.ts` around lines 14 - 17, Rename the
confusing "props" identifier and prop key to something clearer (e.g., change the
top-level const name from props to pluginProps and the inner prop key from props
to pluginProps) so the DevtoolsPanelProps type is exposed as
pluginProps/devtoolsPluginProps; update all references/usages of the old "props"
identifier and prop key (including any type annotations or destructuring) to the
new name (pluginProps or devtoolsPluginProps) and ensure exports/imports reflect
the rename.
packages/preact-devtools/src/devtools.tsx (1)

193-232: Inconsistent parameter naming: theme should be props.

The plugin mapping callbacks at lines 201 and 219 use theme as the parameter name, but the actual value passed is TanStackDevtoolsPluginProps. This creates confusion since the parameter contains more than just the theme. The parameter naming should be consistent with the updated type.

♻️ Suggested fix for clarity
           name:
             typeof plugin.name === 'string'
               ? plugin.name
-              : (e, theme) => {
+              : (e, props) => {
                   const id = e.getAttribute('id')!
                   const target = e.ownerDocument.getElementById(id)

                   if (target) {
                     setTitleContainers((prev) => ({
                       ...prev,
                       [id]: e,
                     }))
                   }

                   convertRender(
                     plugin.name as PluginRender,
                     setTitleComponents,
                     e,
-                    theme,
+                    props,
                   )
                 },
-          render: (e, theme) => {
+          render: (e, props) => {
             const id = e.getAttribute('id')!
             const target = e.ownerDocument.getElementById(id)

             if (target) {
               setPluginContainers((prev) => ({
                 ...prev,
                 [id]: e,
               }))
             }

-            convertRender(plugin.render, setPluginComponents, e, theme)
+            convertRender(plugin.render, setPluginComponents, e, props)
           },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/preact-devtools/src/devtools.tsx` around lines 193 - 232, The
callbacks inside the pluginsMap mapping use the parameter name theme but
actually receive TanStackDevtoolsPluginProps; rename the parameter to props in
both the custom name function (plugin.name) and the render function
(plugin.render), and update all uses of that parameter inside those functions
(e.g., the convertRender calls) to pass props instead of theme; ensure
convertRender, setTitleComponents, setPluginComponents, setTitleContainers, and
setPluginContainers usages remain unchanged except for replacing theme with
props to keep naming consistent with the prop type.
packages/devtools/src/tabs/index.tsx (1)

6-25: Inconsistent component signatures across tabs.

Only PluginsTab is typed to receive { isOpen: boolean } props, but TabContent calls all tab components with { isOpen: props.isOpen }. While this works at runtime due to JavaScript's function arity flexibility, it creates a type inconsistency.

Consider aligning the signatures for consistency:

♻️ Suggested fix for consistency
   {
     name: 'SEO',
     id: 'seo',
-    component: () => <SeoTab />,
+    component: (_props: { isOpen: boolean }) => <SeoTab />,
     icon: () => <PageSearch />,
   },
   {
     name: 'Settings',
     id: 'settings',
-    component: () => <SettingsTab />,
+    component: (_props: { isOpen: boolean }) => <SettingsTab />,
     icon: () => <Cogs />,
   },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/devtools/src/tabs/index.tsx` around lines 6 - 25, The tabs array has
inconsistent component signatures: PluginsTab is typed as (props: { isOpen:
boolean }) but SeoTab and SettingsTab are not, while TabContent invokes every
tab with { isOpen: props.isOpen }; update the signatures to be consistent by
ensuring every tab's component has the same type (props: { isOpen: boolean }) =>
JSX.Element in the tabs array and adjust SeoTab and SettingsTab (or their
wrapper arrow functions in the tabs entries) to accept the props parameter
(e.g., component: (props: { isOpen: boolean }) => <SeoTab {...props} />) so
TypeScript sees a uniform component shape; reference symbols: tabs, PluginsTab,
SeoTab, SettingsTab, TabContent.
packages/react-devtools/src/devtools.tsx (1)

12-15: Document this callback signature change as a breaking API change.

Line 14 changes the callback parameter shape that backs the exported TanStackDevtoolsReactPlugin surface on Lines 24-66. Please ship this with a changeset or migration note so downstream plugins know name and render now receive { theme, devtoolsOpen } instead of a bare theme string.

Also applies to: 24-66

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/react-devtools/src/devtools.tsx` around lines 12 - 15, The callback
parameter shape for PluginRender has changed (now the render callback and plugin
"name" receive an object with { theme, devtoolsOpen } instead of a bare theme
string) and this is a breaking API change; add a changeset or migration note
documenting the change and how downstream plugins must update their
TanStackDevtoolsReactPlugin implementations (referencing PluginRender and
TanStackDevtoolsReactPlugin) to accept the new object signature, update any
TypeScript types/comments in packages/react-devtools/src/devtools.tsx to reflect
the new parameter shape, and update documentation/examples that show using name
and render to demonstrate the new { theme, devtoolsOpen } parameter format.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/thirty-spies-fetch.md:
- Around line 2-9: Update the changeset to mark a breaking change by changing
the release type from minor to major for each listed package
('@tanstack/preact-devtools', '@tanstack/devtools-utils',
'@tanstack/react-devtools', '@tanstack/solid-devtools', '@tanstack/devtools'),
and update the summary to state the API change explicitly: the plugin callback
signature changed from (el, theme) to (el, { theme, devtoolsOpen }), so
consumers must update implementations; ensure the changeset text clearly
documents this breaking change so the packages will be released with a major
version bump.

In `@packages/devtools-utils/src/solid/class-mount-impl.tsx`:
- Around line 3-6: The import order violates the import/order lint rule because
the type import TanStackDevtoolsPluginProps from '@tanstack/devtools' is placed
before Solid runtime imports; reorder imports so Solid runtime imports (lazy,
Portal, render, and JSX) appear first and then place the type import
TanStackDevtoolsPluginProps below them (i.e., import lazy, Portal, render, and
JSX from 'solid-js'/'solid-js/web' first, then import type {
TanStackDevtoolsPluginProps } from '@tanstack/devtools') to satisfy the linter.
- Around line 10-11: The lazy importer importFn is typed as returning a zero-arg
component but at runtime you spread TanStackDevtoolsPluginProps into it; update
the importFn type so the default export is a component that accepts
TanStackDevtoolsPluginProps (e.g. Promise<{ default: (props:
TanStackDevtoolsPluginProps) => JSX.Element }> or the Solid component type for
that props shape) so TSX prop checking matches the mount code; adjust any
related casts/usages in class-mount-impl.tsx around the props/importFn
parameters (props, importFn, and the mounted component call) to use the new
typed component signature.

---

Outside diff comments:
In `@packages/devtools-utils/src/preact/panel.tsx`:
- Around line 35-49: The effect currently depends on the entire props object
causing unnecessary remounts; update the useEffect dependency array in the
component using useEffect, devtools.current, devToolRef.current and CoreClass to
depend only on the specific TanStackDevtoolsPluginProps fields used (props.theme
and props.devtoolsOpen) so the instance isn’t unmounted/recreated on unrelated
parent re-renders.

In `@packages/devtools-utils/src/react/panel.tsx`:
- Around line 33-47: The effect that mounts CoreClass is keyed on the whole
props object causing remounts when props identity changes; update the effect to
depend only on the actual primitive values that should trigger a remount (e.g.,
destructure theme and devtoolsOpen from props and use those in the dependency
array) while leaving devtools.current = new CoreClass(),
devtools.current.mount(devToolRef.current, props) and
devtools.current?.unmount() behavior unchanged; reference devtools.current,
CoreClass, devToolRef.current, mount, and unmount so you replace [props] with a
dependency array like [theme, devtoolsOpen] (or the specific primitive props
used) to avoid unnecessary unmount/remounts.

In `@packages/devtools-utils/src/vue/panel.ts`:
- Around line 60-69: The declared return type for Panel and NoOpPanel is stale:
it still exposes theme?: DevtoolsPanelProps['theme'] but the components actually
receive the full TanStackDevtoolsPluginProps via their props; update the tuple
return type to reflect the new props shape (replace the theme?:
DevtoolsPanelProps['theme'] entry with props?: TanStackDevtoolsPluginProps or
the exact prop name used by the components) so the DefineComponent types match
the runtime signature (refer to Panel, NoOpPanel, DevtoolsPanelProps,
TanStackDevtoolsPluginProps and TComponentProps to locate and align the prop
types).

---

Nitpick comments:
In `@packages/devtools-utils/src/vue/panel.ts`:
- Around line 14-17: Rename the confusing "props" identifier and prop key to
something clearer (e.g., change the top-level const name from props to
pluginProps and the inner prop key from props to pluginProps) so the
DevtoolsPanelProps type is exposed as pluginProps/devtoolsPluginProps; update
all references/usages of the old "props" identifier and prop key (including any
type annotations or destructuring) to the new name (pluginProps or
devtoolsPluginProps) and ensure exports/imports reflect the rename.

In `@packages/devtools/src/tabs/index.tsx`:
- Around line 6-25: The tabs array has inconsistent component signatures:
PluginsTab is typed as (props: { isOpen: boolean }) but SeoTab and SettingsTab
are not, while TabContent invokes every tab with { isOpen: props.isOpen };
update the signatures to be consistent by ensuring every tab's component has the
same type (props: { isOpen: boolean }) => JSX.Element in the tabs array and
adjust SeoTab and SettingsTab (or their wrapper arrow functions in the tabs
entries) to accept the props parameter (e.g., component: (props: { isOpen:
boolean }) => <SeoTab {...props} />) so TypeScript sees a uniform component
shape; reference symbols: tabs, PluginsTab, SeoTab, SettingsTab, TabContent.

In `@packages/preact-devtools/src/devtools.tsx`:
- Around line 193-232: The callbacks inside the pluginsMap mapping use the
parameter name theme but actually receive TanStackDevtoolsPluginProps; rename
the parameter to props in both the custom name function (plugin.name) and the
render function (plugin.render), and update all uses of that parameter inside
those functions (e.g., the convertRender calls) to pass props instead of theme;
ensure convertRender, setTitleComponents, setPluginComponents,
setTitleContainers, and setPluginContainers usages remain unchanged except for
replacing theme with props to keep naming consistent with the prop type.

In `@packages/react-devtools/src/devtools.tsx`:
- Around line 12-15: The callback parameter shape for PluginRender has changed
(now the render callback and plugin "name" receive an object with { theme,
devtoolsOpen } instead of a bare theme string) and this is a breaking API
change; add a changeset or migration note documenting the change and how
downstream plugins must update their TanStackDevtoolsReactPlugin implementations
(referencing PluginRender and TanStackDevtoolsReactPlugin) to accept the new
object signature, update any TypeScript types/comments in
packages/react-devtools/src/devtools.tsx to reflect the new parameter shape, and
update documentation/examples that show using name and render to demonstrate the
new { theme, devtoolsOpen } parameter format.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9fa0e804-fbdb-4cef-81cd-31840fc0cfa4

📥 Commits

Reviewing files that changed from the base of the PR and between a120650 and 15e0903.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • .changeset/thirty-spies-fetch.md
  • packages/devtools-utils/package.json
  • packages/devtools-utils/src/preact/panel.tsx
  • packages/devtools-utils/src/preact/plugin.tsx
  • packages/devtools-utils/src/react/panel.tsx
  • packages/devtools-utils/src/react/plugin.tsx
  • packages/devtools-utils/src/solid/class-mount-impl.tsx
  • packages/devtools-utils/src/solid/class.test.tsx
  • packages/devtools-utils/src/solid/class.ts
  • packages/devtools-utils/src/solid/panel.tsx
  • packages/devtools-utils/src/solid/plugin.tsx
  • packages/devtools-utils/src/vue/panel.ts
  • packages/devtools/src/components/tab-content.tsx
  • packages/devtools/src/context/devtools-context.tsx
  • packages/devtools/src/devtools.tsx
  • packages/devtools/src/index.ts
  • packages/devtools/src/tabs/index.tsx
  • packages/devtools/src/tabs/plugins-tab.tsx
  • packages/preact-devtools/src/devtools.tsx
  • packages/react-devtools/src/devtools.tsx
  • packages/solid-devtools/src/core.tsx

Comment on lines +2 to +9
'@tanstack/preact-devtools': minor
'@tanstack/devtools-utils': minor
'@tanstack/react-devtools': minor
'@tanstack/solid-devtools': minor
'@tanstack/devtools': minor
---

Change the way props are passed to the plugins
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

This API change needs major version bumps.

The plugin callback contract now changes from (el, theme) to (el, { theme, devtoolsOpen }), which breaks existing plugin implementations at both type level and runtime. Shipping these packages as minor will understate the break for consumers.

Suggested changeset update
-'@tanstack/preact-devtools': minor
-'@tanstack/devtools-utils': minor
-'@tanstack/react-devtools': minor
-'@tanstack/solid-devtools': minor
-'@tanstack/devtools': minor
+'@tanstack/preact-devtools': major
+'@tanstack/devtools-utils': major
+'@tanstack/react-devtools': major
+'@tanstack/solid-devtools': major
+'@tanstack/devtools': major
@@
-Change the way props are passed to the plugins
+BREAKING: plugin callbacks now receive `TanStackDevtoolsPluginProps` (`theme` + `devtoolsOpen`) instead of a theme string
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'@tanstack/preact-devtools': minor
'@tanstack/devtools-utils': minor
'@tanstack/react-devtools': minor
'@tanstack/solid-devtools': minor
'@tanstack/devtools': minor
---
Change the way props are passed to the plugins
'@tanstack/preact-devtools': major
'@tanstack/devtools-utils': major
'@tanstack/react-devtools': major
'@tanstack/solid-devtools': major
'@tanstack/devtools': major
---
BREAKING: plugin callbacks now receive `TanStackDevtoolsPluginProps` (`theme` + `devtoolsOpen`) instead of a theme string
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/thirty-spies-fetch.md around lines 2 - 9, Update the changeset to
mark a breaking change by changing the release type from minor to major for each
listed package ('@tanstack/preact-devtools', '@tanstack/devtools-utils',
'@tanstack/react-devtools', '@tanstack/solid-devtools', '@tanstack/devtools'),
and update the summary to state the API change explicitly: the plugin callback
signature changed from (el, theme) to (el, { theme, devtoolsOpen }), so
consumers must update implementations; ensure the changeset text clearly
documents this breaking change so the packages will be released with a major
version bump.

@AlemTuzlak AlemTuzlak merged commit 40db560 into main Mar 13, 2026
4 of 5 checks passed
@AlemTuzlak AlemTuzlak deleted the feat/improve-props-passing-to-plugins branch March 13, 2026 11:51
@github-actions github-actions bot mentioned this pull request Mar 13, 2026
@coderabbitai coderabbitai bot mentioned this pull request Mar 13, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant