Skip to content

test(query-broadcast-client-experimental): replace inline query key literals with 'queryKey' in incoming message tests - #11247

Merged
sukvvon merged 1 commit into
mainfrom
test/query-broadcast-client-incoming-message-query-key
Aug 22, 2026
Merged

test(query-broadcast-client-experimental): replace inline query key literals with 'queryKey' in incoming message tests#11247
sukvvon merged 1 commit into
mainfrom
test/query-broadcast-client-incoming-message-query-key

Conversation

@sukvvon

@sukvvon sukvvon commented Aug 22, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Replace inline query key literals (['remote'], ['existing'], ['local'], ['local2']) with queryKey() from @tanstack/query-test-utils in the two "incoming message handling" tests added by #11242, so queryHash values are computed from the generated keys (JSON.stringify(remoteKey) for the new/uncached query, existingQuery.queryHash unchanged for the cached one) instead of hardcoded.

✅ 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
    • Expanded coverage for broadcast error handling.
    • Verified broadcasting continues after failures.
    • Confirmed incoming messages are applied to both new and existing queries.

…iterals with 'queryKey' in incoming message tests
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fdd7e5d2-97a6-4782-bc33-4fee6db800ab

📥 Commits

Reviewing files that changed from the base of the PR and between d156adc and 2a995ab.

📒 Files selected for processing (1)
  • packages/query-broadcast-client-experimental/src/__tests__/index.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The broadcast error-handling tests now use generated, distinct query keys. They verify incoming messages and later local updates for newly built and existing queries after failures.

Changes

Broadcast test recovery

Layer / File(s) Summary
Generated keys in recovery scenarios
packages/query-broadcast-client-experimental/src/__tests__/index.test.ts
The tests use generated remote, local, and existing query keys instead of hard-coded key arrays. They continue to validate incoming messages and subsequent local updates after failures.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 2a995

This test-only change replaces hardcoded query keys and hashes with generated values without changing production behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: koreahghg, n-satoshi061

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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 1 files.
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.
Title check ✅ Passed The title clearly identifies the test changes and the replacement of inline query key literals with queryKey.
Description check ✅ Passed The description explains the changes, motivation, checklist status, and release impact, and it matches the repository template.
✨ 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-broadcast-client-incoming-message-query-key

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.

@nx-cloud

nx-cloud Bot commented Aug 22, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 2a995ab

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

☁️ Nx Cloud last updated this comment at 2026-08-22 01:47:18 UTC

@sukvvon sukvvon self-assigned this Aug 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

10 package(s) bumped directly, 15 bumped as dependents.

🟨 Minor bumps

Package Version Reason
@tanstack/angular-query-experimental 5.101.4 → 5.102.0 Changeset
@tanstack/eslint-plugin-query 5.101.4 → 5.102.0 Changeset
@tanstack/preact-query 5.101.4 → 5.102.0 Changeset
@tanstack/query-broadcast-client-experimental 5.101.4 → 5.102.0 Changeset
@tanstack/query-core 5.101.4 → 5.102.0 Changeset
@tanstack/react-query 5.101.4 → 5.102.0 Changeset
@tanstack/solid-query 5.101.4 → 5.102.0 Changeset
@tanstack/vue-query 5.101.4 → 5.102.0 Changeset
@tanstack/angular-query-persist-client 5.101.4 → 5.102.0 Dependent
@tanstack/preact-query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/preact-query-persist-client 5.101.4 → 5.102.0 Dependent
@tanstack/query-async-storage-persister 5.101.4 → 5.102.0 Dependent
@tanstack/query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/query-persist-client-core 5.101.4 → 5.102.0 Dependent
@tanstack/query-sync-storage-persister 5.101.4 → 5.102.0 Dependent
@tanstack/react-query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/react-query-next-experimental 5.101.4 → 5.102.0 Dependent
@tanstack/react-query-persist-client 5.101.4 → 5.102.0 Dependent
@tanstack/solid-query-devtools 5.101.4 → 5.102.0 Dependent
@tanstack/solid-query-persist-client 5.101.4 → 5.102.0 Dependent

🟩 Patch bumps

Package Version Reason
@tanstack/lit-query 0.2.11 → 0.2.12 Changeset
@tanstack/svelte-query 6.1.38 → 6.1.39 Changeset
@tanstack/svelte-query-devtools 6.1.38 → 6.1.39 Dependent
@tanstack/svelte-query-persist-client 6.1.38 → 6.1.39 Dependent
@tanstack/vue-query-devtools 6.1.38 → 6.1.39 Dependent

@pkg-pr-new

pkg-pr-new Bot commented Aug 22, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: 2a995ab

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.98 KB (0%)
react minimal 8.92 KB (0%)

@sukvvon
sukvvon merged commit c9dba07 into main Aug 22, 2026
9 checks passed
@sukvvon
sukvvon deleted the test/query-broadcast-client-incoming-message-query-key branch August 22, 2026 01:48
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