Skip to content

feat(tanstack-query-devtools): port @tanstack/react-query-devtools 5.102.8 - #1881

Merged
trueadm merged 2 commits into
octanejs:mainfrom
dion04:feat/tanstack-query-devtools-port
Oct 8, 2026
Merged

trueadm merged 2 commits into
octanejs:mainfrom
dion04:feat/tanstack-query-devtools-port

Conversation

@dion04

@dion04 dion04 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds @octanejs/tanstack-query-devtools, an Octane port of @tanstack/react-query-devtools 5.102.8: ReactQueryDevtools, ReactQueryDevtoolsPanel, the DevtoolsPanelOptions type, and the ./production entry.
  • Reuses the unchanged framework-neutral @tanstack/query-devtools core and @octanejs/tanstack-query for useQueryClient and onlineManager.
  • Recreates feat(tanstack-query-devtools): port @tanstack/react-query-devtools 5.102.8 #1465, which went stale, on current main under the current repo rules.

Why

  • @octanejs/tanstack-query documented the devtools package as not included. This fills that gap.

Changes

  • New package packages/tanstack-query-devtools: authored .tsrx adapters, a byte-exact committed pristine upstream tree with its lock and provenance, the parity manifest, and audit inventories.
  • One intentional divergence: the core instance is built in a lazy useState initializer instead of on every render. The upstream suite asserts no constructor count. The divergence is recorded in UPSTREAM.md, status.json, the parity manifest, and an OCTANE DIVERGENCE marker.
  • Pin: npm publishes no gitHead for this release, so preflight ran with --npm-provenance. Tag @tanstack/[email protected] resolves to 2969edf, the same commit @octanejs/tanstack-query pins.
  • Changes from feat(tanstack-query-devtools): port @tanstack/react-query-devtools 5.102.8 #1465 to match current main:
    • The typecheck script uses octane-tsc -p tsconfig.json, and the package tsconfig is added to the root pnpm typecheck, as typecheck:coverage now requires.
    • The peer range is octane: workspace:^0.10.0, and the tsconfig adds noUnusedLocals/noUnusedParameters, matching sibling bindings.
    • The parity environment pins [email protected], which update-audit.mjs now reads from the root packageManager instead of hardcoding it.
    • The TSRX sources are Prettier-formatted, and the .prettierignore exemption is dropped because the plugin now round-trips them correctly. The source-ledger hashes were regenerated to match.
  • Updates the tanstack-query README line that said devtools were not included.
  • Regenerated outputs from pnpm sync: bindings status, parity gaps, package inventory, CLI data, ecosystem index, consumer tsconfigs, the evals manifest, and a one-line lockfileSha256 bump in every audit/react-parity.json because the new workspace package changes pnpm-lock.yaml.

Validation

Local runs were on Windows:

  • targeted tests: tanstack-query-devtools, tanstack-query-devtools-ssr, and tanstack-query-devtools-adapted. All 49 tests pass, covering the 37 upstream registrations with import rewrites only and the 12 Octane conformance and SSR tests.
  • octane-tsc -p packages/tanstack-query-devtools/tsconfig.json
  • pnpm sync leaves the tree clean.
  • These pass: changeset:check, test:markers:check, tsrx-decls:check, virtual-tsx:check, parity:gaps:check, packages:inventory:check, website:ecosystem-data:check, binding-parity:gaps:check, cli:data:check, scaffold:manifest:check, bindings:status:check, consumer:tsconfigs:check, packages:source:check, rules:check, and node scripts/check-typecheck-coverage.mjs.
  • react-parity:validate: this package validates. The only failures are formisch and embla-carousel, from the Windows ESM loader, in packages this PR does not touch beyond the lockfile hash.
  • tanstack-query-devtools-pristine: not run locally. pristine-suite-lib.mjs spawns node_modules/.bin/vitest without .cmd, so it cannot run on Windows. CI covers it.
  • pnpm typecheck (full): not run locally. Windows rejects the command line as too long. CI covers it.
  • pnpm format:check: the only warning is packages/pdf/test-utils.ts, which this PR does not touch.
  • pnpm test (full), packages:pack:check, and the node --test self-tests behind typecheck:coverage: these hit Windows path and spawn issues in repo scripts. Left to CI.
  • perf-review: report below.

Perf review: feat/tanstack-query-devtools-port (upstream/main..HEAD)

Scan: node scripts/perf-review-scan.mjs --base upstream/main packages/tanstack-query-devtools/src/ found 0 candidates.

Hot paths touched: none in the framework. ReactQueryDevtools and ReactQueryDevtoolsPanel are dev-only components, mounted once per app. They re-render only when their own props or the query client change.

# Severity Location Dimension Finding Required evidence Provided?
1 note packages/tanstack-query-devtools/src/ReactQueryDevtools.tsrx:98-134 allocation Each render allocates seven effect closures and their deps arrays. This matches upstream one to one, and the component renders rarely. none n/a
2 note packages/tanstack-query-devtools/src/ReactQueryDevtoolsPanel.tsrx:104 allocation Each render allocates the style spread literal, which matches upstream. This is a cold dev-only panel. none n/a
3 note packages/tanstack-query-devtools/src/ReactQueryDevtools.tsrx:80 allocation Upstream builds the core on every render, and the port builds it only once in the lazy initializer. This saves allocation compared to upstream. none n/a

Not checked: compiled output and browser latency, because no hot path is touched.

Risk / follow-ups

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Low Risk
Adds a new dev-only binding with broad test coverage and no changes to query runtime or auth; the lazy core initializer is an internal optimization with no asserted upstream behavioral difference.

Overview
Introduces @octanejs/tanstack-query-devtools, an Octane binding for @tanstack/[email protected] that pairs with @octanejs/tanstack-query. It exposes ReactQueryDevtools, ReactQueryDevtoolsPanel, DevtoolsPanelOptions, and a ./production entry while keeping @tanstack/query-devtools as the unchanged core.

The adapter is implemented in .tsrx with Octane hooks and useQueryClient from the query binding. The devtools core is created in a lazy useState initializer (documented divergence from React’s per-render construction). The default export is development-only via NODE_ENV, matching upstream; production always ships the real components.

Parity and CI wiring include pinned upstream artifacts, pristine/adapted vitest lanes for all 37 upstream tests, conformance/SSR tests, audit inventories, and registration in root typecheck, generated docs/inventory (110 bindings), CLI ecosystem data, and a changeset. Workspace lockfile updates refresh lockfileSha256 across existing audit/react-parity.json files.

Reviewed by Cursor Bugbot for commit 61fc461. Bugbot is set up for automated code reviews on this repo. Configure here.

…102.8

Add @octanejs/tanstack-query-devtools: ReactQueryDevtools,
ReactQueryDevtoolsPanel, DevtoolsPanelOptions and the ./production entry
over the unchanged @tanstack/query-devtools core. The core is built once in
a lazy useState initializer (recorded divergence).

Recreated on current main: octane-tsc typecheck script, peer octane
^0.10.0, noUnused* compiler options, root typecheck coverage, pnpm 12.9.1
parity environment, and Prettier-formatted TSRX sources instead of a
.prettierignore exemption.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability labels Oct 8, 2026
@dion04
dion04 marked this pull request as ready for review October 8, 2026 07:49
Copilot AI balanced review requested due to automatic review settings October 8, 2026 07:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The generator ran on Windows and wrote six floating-ui pin headings with
backslash separators, which `binding-parity:gaps:check` rejects on CI.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit b7d152c into octanejs:main Oct 8, 2026
6 of 24 checks passed
trueadm added a commit that referenced this pull request Oct 8, 2026
…atalogs

#1881 published @octanejs/tanstack-query-devtools and added it to the website
catalog (bindings.json) but not to the two hand-maintained agent catalogs, so
main b7d152c failed test shard 1/4:

- octane-mcp-server bridge.test.js: KNOWN_BINDINGS must cover every
  published binding derived from the workspace manifests.
- website-mcp content.test.ts: llms.txt must list the catalogued bindings
  package-for-package.

Map @tanstack/react-query-devtools to the binding in KNOWN_BINDINGS, list it
beside @octanejs/tanstack-devtools in llms.txt's devtools line, and include
the CLI data pnpm sync regenerates from that map.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent feat PR: new feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event delegation shares the $$<type> expando with Solid, so handlers fire twice inside Octane roots

3 participants