Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds tests to Devtools verifying the Query Details panel toggles on row clicks and that details-panel action buttons (Remove, Reset, Invalidate, Refetch, Trigger Error, Restore Error) update QueryClient state and emit the expected devtools event for refetch. ChangesDevtools Query Interaction Tests
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 615d81d
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
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/query-devtools/src/__tests__/Devtools.test.tsx`:
- Around line 487-489: The test uses a single element reference "row" from
rendered.getByLabelText(...) for two clicks which can become stale after a
rerender; change the second click to re-query the DOM (call
rendered.getByLabelText(/Query key \["details-toggle"\]/) again) before firing
the second fireEvent.click to ensure you operate on the current node and catch
rerender-related regressions.
- Around line 564-577: The assertion in the test "should restore the query
status when \"Restore Error\" is clicked after \"Trigger Error\"" is too
lax—replace the negative check with an exact expected status (e.g., assert
queryClient.getQueryState(['action-restore-error'])?.status === 'success' or the
intended exact state) so the test fails if restore lands in the wrong state;
update the expectation in the test block that uses
queryClient.getQueryState(['action-restore-error'])?.status to toBe('success')
(or the precise expected status) and optionally verify the query data if needed.
🪄 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
Run ID: bec0b1b5-ab5e-482e-ab48-dcb3c555d959
📒 Files selected for processing (1)
packages/query-devtools/src/__tests__/Devtools.test.tsx
size-limit report 📦
|
…ssert exact 'pending' status after 'Restore Error'
🎯 Changes
Add tests for the query details panel and the action buttons that operate on the selected query.
query details— opening and closing the details panel:query actions— buttons inside the details panel:Removeremoves the query from the cache.Resetresets the query data toundefined.Invalidatemarks the query as invalidated.Refetchdispatches a'REFETCH'event.Trigger Errorsets the query status to'error'.Restore Errorrestores the query status from'error'.✅ Checklist
🚀 Release Impact
Summary by CodeRabbit