-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
WalkthroughAdds a Clerk event subscription hook, integrates it into App to invalidate queries on Clerk events, updates the Clerk React mock to expose Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Repository: TaskRatchet/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-12T21:38:27.063ZApplied to files:
🧬 Code graph analysis (1)src/App.tsx (1)
🔇 Additional comments (1)
Comment |
Outdated dependencies |
Bundle StatsHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger
Smaller No assets were smaller Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
📜 Review details
Configuration used: Repository: TaskRatchet/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
__mocks__/@clerk/clerk-react.tsx(1 hunks)package.json(1 hunks)src/App.tsx(2 hunks)src/lib/useOnClerkEvent.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: narthur
PR: TaskRatchet/taskratchet-web#166
File: global-setup.ts:25-25
Timestamp: 2025-08-12T21:38:27.063Z
Learning: The project uses __mocks__/clerk/clerk-react.tsx to provide mock implementations for Clerk authentication components and hooks instead of inline mocking in global-setup.ts. The mock file exports ClerkProvider, Protect, RedirectToSignIn, SignedIn, UserButton components and useUser/useClerk hooks with test-friendly return values.
📚 Learning: 2025-08-12T21:38:27.063Z
Learnt from: narthur
PR: TaskRatchet/taskratchet-web#166
File: global-setup.ts:25-25
Timestamp: 2025-08-12T21:38:27.063Z
Learning: The project uses __mocks__/clerk/clerk-react.tsx to provide mock implementations for Clerk authentication components and hooks instead of inline mocking in global-setup.ts. The mock file exports ClerkProvider, Protect, RedirectToSignIn, SignedIn, UserButton components and useUser/useClerk hooks with test-friendly return values.
Applied to files:
__mocks__/@clerk/clerk-react.tsxsrc/App.tsxsrc/lib/useOnClerkEvent.ts
📚 Learning: 2025-08-16T19:53:45.147Z
Learnt from: narthur
PR: TaskRatchet/taskratchet-web#166
File: src/components/organisms/NavBar.tsx:40-49
Timestamp: 2025-08-16T19:53:45.147Z
Learning: In the TaskRatchet project, NavBar.spec.tsx still uses the old useSession mock and doesn't test the new Clerk authentication integration with useUser and useClerk hooks, so tests pass even when the Clerk mock returns session: null.
Applied to files:
__mocks__/@clerk/clerk-react.tsx
🧬 Code graph analysis (2)
src/App.tsx (1)
src/lib/useOnClerkEvent.ts (1)
useOnClerkEvent(5-15)
src/lib/useOnClerkEvent.ts (1)
__mocks__/@clerk/clerk-react.tsx (1)
useClerk(32-35)
Currently it seems that if clerk auth changes, the data in the react query cache remains stale. This should invalidate the whole cache on clerk auth change.
Summary by CodeRabbit