fix(solid-query): address suspense detachment in solid query#11113
fix(solid-query): address suspense detachment in solid query#11113MaNaN1803 wants to merge 2 commits into
Conversation
…d to prevent Suspense detach
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults 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)
📝 WalkthroughWalkthrough
ChangesSolid Query subscriber flow
Estimated code review effort: 2 (Simple) | ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/solid-query/src/useBaseQuery.ts`:
- Around line 186-187: Update the refetch condition in useBaseQuery so settled
error results do not trigger refetch(). Limit refetching to an active resolver
or loading transition, while preserving the existing behavior for those states.
- Around line 183-189: Update the queued callback in useBaseQuery to capture the
subscription/observer generation associated with observerResult and apply or
refetch only when that generation still matches the current subscription.
Increment the generation whenever createClientSubscriber replaces the observer
subscription, so results queued by a previous QueryObserver are ignored rather
than updating current Solid state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: d7563bbf-e5bf-4e75-8b3c-2a9c10596181
📒 Files selected for processing (1)
packages/solid-query/src/useBaseQuery.ts
Resolves an issue in Solid Query where suspense detachment causes queries to fail or hang.
Summary by CodeRabbit