refactor(game-client): simplify chat and guild helpers#739
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b273ff9b9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }), | ||
| select: (response) => response.data, | ||
| refetchOnMount: true, | ||
| refetchOnMount: false, |
There was a problem hiding this comment.
Refetch stale guild data when mounting useGuilds
Setting refetchOnMount to false here can leave user-guilds stale for long periods because this app persists React Query cache (maxAge 15 minutes in src/lib/query-client.ts) and also disables window-focus refetch globally. In practice, after guild membership/name changes, components that depend on useGuilds (e.g. guild switcher/chat/notifications/timers) can continue using outdated guild IDs and labels until manual invalidation, which is a functional regression from the previous mount-refetch behavior for stale data.
Useful? React with 👍 / 👎.
No description provided.