Skip to content

test(query-devtools/Devtools): remove PiP auto-open and popup-blocker cases now covered by 'PiPContext.test.tsx'#10805

Merged
sukvvon merged 1 commit into
mainfrom
test/query-devtools-devtools-remove-pip-duplicates
May 26, 2026
Merged

test(query-devtools/Devtools): remove PiP auto-open and popup-blocker cases now covered by 'PiPContext.test.tsx'#10805
sukvvon merged 1 commit into
mainfrom
test/query-devtools-devtools-remove-pip-duplicates

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented May 26, 2026

🎯 Changes

The recent PiPContext.test.tsx series (#10797#10804) re-covered two cases that previously lived in Devtools.test.tsx's picture-in-picture describe at the wrong layer (they were exercising PiPContext's createEffect, not anything Devtools itself does):

  • should automatically open a PiP window when "pip_open" is "true" in "localStorage" — duplicated by PiPContext.test.tsx"pip_open" auto-open createEffectshould auto-open a PiP window when "pip_open" is "true" on mount.
  • should log and reset "pip_open" when the browser blocks the popup — duplicated by PiPContext.test.tsx"pip_open" auto-open createEffectshould reset "pip_open"/"open" and log when "window.open" returns null on auto-open.

Drop both from Devtools.test.tsx so the auto-open createEffect is only asserted in the PiPContext unit file. Coverage for PiPContext.tsx stays at 100% / 95.23% (stmts / branch) and Devtools.tsx is unchanged, since the removed cases weren't exercising any Devtools.tsx line the surviving PiP cases don't already hit.

The remaining picture-in-picture describe keeps the cases that are genuinely about Devtools UI — opening the PiP via the button, hiding/restoring the in-page panel, and the narrow PiP layout.

✅ 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

  • Tests
    • Removed test cases related to picture-in-picture functionality for the query devtools.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f53181ce-222c-4363-8fc1-916592815b70

📥 Commits

Reviewing files that changed from the base of the PR and between 9a1aa92 and b760aad.

📒 Files selected for processing (1)
  • packages/query-devtools/src/__tests__/Devtools.test.tsx
💤 Files with no reviewable changes (1)
  • packages/query-devtools/src/tests/Devtools.test.tsx

📝 Walkthrough

Walkthrough

Two picture-in-picture test cases are removed from the Devtools test suite. The removed tests validated PiP auto-open behavior when localStorage contains pip_open: true and error handling with flag reset when window.open is blocked.

Changes

PiP Test Removal

Layer / File(s) Summary
Removed PiP lifecycle tests
packages/query-devtools/src/__tests__/Devtools.test.tsx
Two test cases asserting PiP auto-open from localStorage when pip_open: true and popup-blocking error handling with pip_open reset to false are removed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TanStack/query#10803: The main PR removes PiP auto-open and window-blocking test cases in Devtools.test.tsx, which overlap with the PiPContext auto-open createEffect scenarios covered by the retrieved PR's new PiPContext.test.tsx tests.
  • TanStack/query#10762: Both PRs touch picture-in-picture behavior around pip_open in localStorage, with the main PR removing PiP-related assertions while the retrieved PR adds PiP lifecycle assertions including resetting the flag on PiP close.
  • TanStack/query#10761: The main PR removes the PiP test case that resets TanstackQueryDevtools.pip_open when window.open is blocked, while the retrieved PR adds that exact test scenario.

Suggested labels

package: query-devtools

Poem

🐰 Two tests hop away,
PiP logic takes a new day,
Fresh checks elsewhere now play,
Cleanup keeps the way clear and gay! 🎪

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing two PiP test cases from Devtools.test.tsx that are now covered by PiPContext.test.tsx.
Description check ✅ Passed The description fully addresses the template requirements with detailed explanation of changes, completed checklist items, and clear release impact assessment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/query-devtools-devtools-remove-pip-duplicates

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 26, 2026

View your CI Pipeline Execution ↗ for commit b760aad

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 29s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-26 03:20:36 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

2 package(s) bumped directly, 23 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/lit-query 0.2.6 → 0.2.7 Changeset
@tanstack/query-devtools 5.100.14 → 5.100.15 Changeset
@tanstack/angular-query-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/angular-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/eslint-plugin-query 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/preact-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/query-async-storage-persister 5.100.14 → 5.100.15 Dependent
@tanstack/query-broadcast-client-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/query-core 5.100.14 → 5.100.15 Dependent
@tanstack/query-persist-client-core 5.100.14 → 5.100.15 Dependent
@tanstack/query-sync-storage-persister 5.100.14 → 5.100.15 Dependent
@tanstack/react-query 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-next-experimental 5.100.14 → 5.100.15 Dependent
@tanstack/react-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query-devtools 5.100.14 → 5.100.15 Dependent
@tanstack/solid-query-persist-client 5.100.14 → 5.100.15 Dependent
@tanstack/svelte-query 6.1.33 → 6.1.34 Dependent
@tanstack/svelte-query-devtools 6.1.33 → 6.1.34 Dependent
@tanstack/svelte-query-persist-client 6.1.33 → 6.1.34 Dependent
@tanstack/vue-query 5.100.14 → 5.100.15 Dependent
@tanstack/vue-query-devtools 6.1.33 → 6.1.34 Dependent

@sukvvon sukvvon self-assigned this May 26, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 26, 2026

More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: b760aad

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 12.11 KB (0%)
react minimal 9.08 KB (0%)

@sukvvon sukvvon merged commit e42d85c into main May 26, 2026
11 of 12 checks passed
@sukvvon sukvvon deleted the test/query-devtools-devtools-remove-pip-duplicates branch May 26, 2026 03:30
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