Repository navigation
fix(devtools)!: follow the TanStack Devtools theme in the panel - #75
Merged
JasonPaff merged 1 commit intoOct 3, 2026
Conversation
paramourDevtoolsPlugin() returned render as a plain element. The TanStack
shell passes its theme only to function renders and renders elements as-is,
so the panel never received `theme` and always rendered light. The docs
claimed the shell cloned the element and injected the theme, which no
supported shell version does.
render is now (el, { theme }) => <ParamourDevtoolsPanel theme={theme} />.
Every shell the >=0.10.0 peer range allows calls a function render with
{ theme, devtoolsOpen }.
BREAKING CHANGE: ParamourDevtoolsPluginEntry.render changes from
ReactElement to (el: HTMLElement, props: { readonly theme: "dark" | "light" })
=> ReactElement. Passing the entry to <TanStackDevtools plugins={...} /> is
unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JasonPaff
deleted the
jasonpaff/par-120-devtools-panel-always-renders-light-the-tanstack-shell-never
branch
October 3, 2026 02:25
This branch was successfully 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.
Found in the PAR-3 trial on the ATK web app. The Paramour panel rendered white inside a dark TanStack Devtools shell. TanStack's setting was
theme: "dark"and the app's<html>wasdark, but.pmr-roothaddata-theme="light".Cause
paramourDevtoolsPlugin()returnedrender: <ParamourDevtoolsPanel />. In@tanstack/react-devtools(checked 0.10.0, 0.10.8 and 0.10.13),convertRendercallsrender(el, props)only whenrenderis a function, and uses an element as-is. Core 0.11–0.15 calls it with{ theme, devtoolsOpen }. So the panel never receivedthemeand fell back to"light". The docs said the shell "clones the rendered element and injectstheme", which no supported version does.Change
renderis now(_el, { theme }) => <ParamourDevtoolsPanel theme={theme} />. Every shell in the>=0.10.0peer range calls a function render with the theme.ParamourDevtoolsPluginEntry.renderchanges fromReactElementto(el: HTMLElement, props: { readonly theme: "dark" | "light" }) => ReactElement.<TanStackDevtools plugins={[paramourDevtoolsPlugin()]} />is unchanged. Only code that readsentry.renderas an element is affected. The changeset ismajor, which stays at1.0.0-rc.2in pre mode (checked withchangeset status).Verification
theme.test.tsxcase: the entry'srender, called as the shell calls it, mounts the panel with that theme and flips it without remounting. It fails without the fix withentry.render is not a function.public-api.tst.tsxpins the newrendertype and still checks assignability to the real shell'spluginstype.test:types:devtoolspasses on TS 5.4 and current.pnpm test packages/devtools: 86 passed. Typecheck, lint and the examples' typecheck are clean.examples/basicon the local build with the real TanStack shell: the shell set to dark givesdata-theme="dark", and set to light gives"light". On/product/42?page=2&q=cablethe panel shows the/apphooks' params and search decode, and the console is clean.Fixes PAR-120
🤖 Generated with Claude Code