Skip to content

fix(query-devtools/Devtools): apply the 'hideDisabledQueries' prop to the query list - #11638

Open
sukvvon wants to merge 3 commits into
mainfrom
fix/query-devtools-hide-disabled-queries-prop
Open

sukvvon wants to merge 3 commits into
mainfrom
fix/query-devtools-hide-disabled-queries-prop

Conversation

@sukvvon

@sukvvon sukvvon commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

The hideDisabledQueries prop is accepted by the framework devtools (ReactQueryDevtools, PreactQueryDevtools, etc.) and forwarded to query-devtools, but the query list in Devtools.tsx only read the hideDisabledQueries setting from local storage, so passing the prop had no effect.

ContentView now resolves the effective value with a hideDisabledQueries memo: the local storage setting (changed from the settings menu) if set, otherwise the prop, otherwise false. This follows the same precedence as position and initialIsOpen. Both the query list filter and the settings menu's Show/Hide selection use this value.

Adds tests that the prop hides disabled queries, and that the local storage setting takes precedence over the prop.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 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
    • The disabled-query visibility setting now correctly controls which queries appear in the devtools list. A saved preference to show or hide disabled queries takes precedence over the hideDisabledQueries prop. If no valid saved preference is available, the prop controls visibility; when neither setting is provided, disabled queries remain visible.

@sukvvon sukvvon self-assigned this Sep 25, 2026
@nx-cloud

nx-cloud Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 31fd3bc

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

☁️ Nx Cloud last updated this comment at 2026-09-26 16:49:17 UTC

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 24 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/query-devtools 5.104.0 → 5.104.1 Changeset
@tanstack/angular-query-experimental 5.104.0 → 5.104.1 Dependent
@tanstack/angular-query-persist-client 5.104.0 → 5.104.1 Dependent
@tanstack/eslint-plugin-query 5.104.0 → 5.104.1 Dependent
@tanstack/lit-query 0.2.25 → 0.2.26 Dependent
@tanstack/preact-query 5.104.0 → 5.104.1 Dependent
@tanstack/preact-query-devtools 5.104.0 → 5.104.1 Dependent
@tanstack/preact-query-persist-client 5.104.0 → 5.104.1 Dependent
@tanstack/query-async-storage-persister 5.104.0 → 5.104.1 Dependent
@tanstack/query-broadcast-client-experimental 5.104.0 → 5.104.1 Dependent
@tanstack/query-core 5.104.0 → 5.104.1 Dependent
@tanstack/query-persist-client-core 5.104.0 → 5.104.1 Dependent
@tanstack/query-sync-storage-persister 5.104.0 → 5.104.1 Dependent
@tanstack/react-query 5.104.0 → 5.104.1 Dependent
@tanstack/react-query-devtools 5.104.0 → 5.104.1 Dependent
@tanstack/react-query-next-experimental 5.104.0 → 5.104.1 Dependent
@tanstack/react-query-persist-client 5.104.0 → 5.104.1 Dependent
@tanstack/solid-query 5.104.0 → 5.104.1 Dependent
@tanstack/solid-query-devtools 5.104.0 → 5.104.1 Dependent
@tanstack/solid-query-persist-client 5.104.0 → 5.104.1 Dependent
@tanstack/svelte-query 6.3.0 → 6.3.1 Dependent
@tanstack/svelte-query-devtools 6.3.0 → 6.3.1 Dependent
@tanstack/svelte-query-persist-client 6.3.0 → 6.3.1 Dependent
@tanstack/vue-query 5.104.0 → 5.104.1 Dependent
@tanstack/vue-query-devtools 6.3.0 → 6.3.1 Dependent

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TanStack/query/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 12d093dc-78b0-4122-bfa1-931e9b59364e

📥 Commits

Reviewing files that changed from the base of the PR and between 99976f5 and 31fd3bc.

📒 Files selected for processing (1)
  • packages/query-devtools/src/__tests__/Devtools.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The devtools resolves disabled-query visibility from an explicit local-storage value or, when none is set, from the hideDisabledQueries context setting. The resolved preference controls query filtering and the settings display. Tests cover prop behavior and local-storage precedence.

Changes

Disabled-query visibility

Layer / File(s) Summary
Resolve and apply disabled-query preference
packages/query-devtools/src/Devtools.tsx, packages/query-devtools/src/__tests__/Devtools.test.tsx, .changeset/query-devtools-hide-disabled-queries-prop.md
ContentView uses an explicit 'true' or 'false' local-storage value when present; otherwise it uses the context setting, defaulting to false. The resolved preference drives query filtering and settings indicators. Tests cover the prop and local-storage precedence. A patch changeset records the change.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 31fd3

The disabled-query setting appears to behave as intended. No merge-blocking issue is identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 31fd3

The change affects which queries appear in the devtools list, not query execution or access controls. No security issue was established, but review coverage does not justify a minimal-risk assessment.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The established effect is limited to devtools query-list visibility and its settings indicator; the examined path does not add a query-execution or authorization path.

Trust Boundaries and Controls

  • observed — The queryFn flagged as a possible public entrypoint is an inline fixture in the changed devtools test, not a newly exposed production entrypoint.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description follows the required template. It explains the bug and fix, documents test coverage, completes the checklist, and records the generated changeset.
Title check ✅ Passed The title clearly and concisely describes the main change: applying the hideDisabledQueries prop to the query list.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11638

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11638

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11638

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 31fd3bc

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.73 KB (0%)
react minimal 8.58 KB (0%)

@sukvvon
sukvvon requested a review from TkDodo September 25, 2026 08:20

This branch has not been deployed

No deployments
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.

2 participants