Skip to content

Conversation

@ColemanDunn
Copy link
Contributor

@ColemanDunn ColemanDunn commented Jan 26, 2026

🎯 Changes

Make Trigger Error set data to null so that error boundaries can be more easily tested using the devtools (no longer need to manually edit the data to trigger error boundary).

More info here: #10044

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run 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

  • Bug Fixes
    • Enhanced error state handling in the DevTools query inspector. When triggering an error for an active query, the data state is now properly reset to undefined in addition to status and error properties, ensuring more accurate query state representation during error scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest commit: 7528079

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

This PR includes changesets to release 7 packages
Name Type
@tanstack/query-devtools Minor
@tanstack/angular-query-experimental Patch
@tanstack/react-query-devtools Patch
@tanstack/solid-query-devtools Patch
@tanstack/svelte-query-devtools Patch
@tanstack/vue-query-devtools Patch
@tanstack/angular-query-persist-client 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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

Adds a changeset file documenting a minor version bump for @tanstack/query-devtools. Modifies the QueryDetails component in Devtools.tsx to reset the data property to undefined when triggering an error for the active query.

Changes

Cohort / File(s) Summary
Changeset
.changeset/many-toes-speak.md
Documents minor version bump with description "Set data to undefined on Trigger Error"
Query Devtools
packages/query-devtools/src/Devtools.tsx
Adds data: undefined to state update in QueryDetails when triggering error, ensuring data property is cleared alongside error status

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • TkDodo
  • birkskyum

Poem

🐰 When errors hop into view,
Data vanishes, fresh and new,
Undefined paths clear the way,
Devtools recovers—hip hooray!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the template with all required sections completed: Changes section explains the motivation, Checklist items are marked, and Release Impact indicates a changeset was generated.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately reflects the main change: setting data to undefined when triggering errors in the query devtools, which aligns with the PR objectives and file modifications.

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

✨ Finishing touches
  • 📝 Generate docstrings

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.

@ColemanDunn
Copy link
Contributor Author

Do these changes count as dev-only (per This change is docs/CI/dev-only (no release))?

@ColemanDunn ColemanDunn changed the title Set query data to undefined when an error is triggered feat(query-devtools)-set-data-to-undefined-on-Trigger-Error-in-TanstackQueryDevtools Jan 26, 2026
@ColemanDunn ColemanDunn changed the title feat(query-devtools)-set-data-to-undefined-on-Trigger-Error-in-TanstackQueryDevtools feat(query-devtools) set data to undefined on Trigger Error in TanstackQueryDevtools Jan 26, 2026
@nx-cloud
Copy link

nx-cloud bot commented Jan 30, 2026

View your CI Pipeline Execution ↗ for commit 7528079

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 4m 1s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-30 09:25:40 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 30, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10072

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10072

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10072

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10072

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10072

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10072

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10072

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10072

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10072

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10072

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10072

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10072

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10072

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10072

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10072

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10072

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10072

@tanstack/vue-query-devtools

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

commit: 7528079

@TkDodo TkDodo merged commit 83366c4 into TanStack:main Jan 30, 2026
7 checks passed
@sentry
Copy link

sentry bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.35%. Comparing base (ed5e5fc) to head (7528079).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main   #10072       +/-   ##
===========================================
- Coverage   36.87%   18.35%   -18.52%     
===========================================
  Files         245       51      -194     
  Lines       11103     2936     -8167     
  Branches     2083      674     -1409     
===========================================
- Hits         4094      539     -3555     
+ Misses       6484     2134     -4350     
+ Partials      525      263      -262     
Components Coverage Δ
@tanstack/angular-query-experimental 46.35% <ø> (ø)
@tanstack/eslint-plugin-query ∅ <ø> (∅)
@tanstack/query-async-storage-persister ∅ <ø> (∅)
@tanstack/query-broadcast-client-experimental ∅ <ø> (∅)
@tanstack/query-codemods ∅ <ø> (∅)
@tanstack/query-core ∅ <ø> (∅)
@tanstack/query-devtools 3.38% <ø> (ø)
@tanstack/query-persist-client-core ∅ <ø> (∅)
@tanstack/query-sync-storage-persister ∅ <ø> (∅)
@tanstack/query-test-utils ∅ <ø> (∅)
@tanstack/react-query ∅ <ø> (∅)
@tanstack/react-query-devtools 9.25% <ø> (ø)
@tanstack/react-query-next-experimental ∅ <ø> (∅)
@tanstack/react-query-persist-client ∅ <ø> (∅)
@tanstack/solid-query ∅ <ø> (∅)
@tanstack/solid-query-devtools 64.17% <ø> (ø)
@tanstack/solid-query-persist-client ∅ <ø> (∅)
@tanstack/svelte-query ∅ <ø> (∅)
@tanstack/svelte-query-devtools ∅ <ø> (∅)
@tanstack/svelte-query-persist-client ∅ <ø> (∅)
@tanstack/vue-query ∅ <ø> (∅)
@tanstack/vue-query-devtools ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions bot mentioned this pull request Jan 30, 2026
@github-actions
Copy link
Contributor

🎉 This PR has been released!

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants