fix(preact-query/useQueries): keep unsubscribed idle - #11315
Conversation
|
View your CI Pipeline Execution ↗ for commit 1e62bda
☁️ Nx Cloud last updated this comment at |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthrough
ChangesUnsubscribed
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized change makes unsubscribed queries remain idle and includes tests and release metadata; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
🚀 Changeset Version Preview1 package(s) bumped directly, 24 bumped as dependents. 🟩 Patch bumps
|
size-limit report 📦
|
1e62bda to
3b6dd9e
Compare
3b6dd9e to
588eb8d
Compare
🎯 Changes
useQueriesunconditionally set_optimisticResults = 'optimistic'for every query, ignoring the top-levelsubscribedoption. This meant unsubscribed queries showed an optimisticfetchingstate instead ofidle. Same defect as@tanstack/react-query's #11130 —@tanstack/preact-query'suseQueries.tshad the identical pattern and needed the same fix.Now
_optimisticResultsisundefinedwhensubscribedisfalse, matching the behavior already used forshouldSubscribe.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit
Bug Fixes
useQueriesto avoid showing an optimistic fetching state when queries are unsubscribed.Tests
subscribed: false.