-
Notifications
You must be signed in to change notification settings - Fork 9
fix: resolve profile image caching bugs #1465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Fix queryKey mismatch in useCreateOrganization (userOrganizations → accountOrganizations) - Add cache invalidation in useOrgSettings after saving org image/name - Persist fresh artist data to localStorage in useInitialArtists
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughCache invalidation key changed from "userOrganizations" to "accountOrganizations" in organization-related hooks; artist selection persistence now saves refreshed or manually selected artists to localStorage and avoids redundant state updates. Changes
Sequence Diagram(s)mermaid mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@hooks/useInitialArtists.tsx`:
- Around line 44-50: The restore effect is causing redundant state-update cycles
because it sets selectedArtist when selections changes even if the referenced
artist is the same; update the restore effect in useInitialArtists (the effect
that reads from selections and calls setSelectedArtist) to compare
selectedArtist?.account_id (or the current selected's account_id) with the
candidate artist.account_id from selections and only call setSelectedArtist and
saveSelection when the account_id differs, ensuring you still handle the
currentArtist flow but avoid resetting state to a new object reference that
represents the same account.
Compare account_id before calling setSelectedArtist to avoid unnecessary re-render cycles when selections changes but artist is already selected
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.