feat: Add settings in tanstack start - #768
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f37ce58bc
ℹ️ 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".
| * Exported as the invalidation target too - there is exactly one entry, so the | ||
| * key and the family are the same value. | ||
| */ | ||
| export const DEVICES_QUERY_KEY = ["devices", "me"] as const; |
There was a problem hiding this comment.
Invalidate device data when the session changes
When two users sign in sequentially in the same browser tab, this user-independent key retains the first user's device list after sign-out because useSignOutAction only invalidates the session query. On the second user's visit, the route loader uses ensureQueryData, which accepts the existing entry, while the configured refetchOnMount: false prevents the component from correcting it; the page therefore exposes the previous user's device names, IP addresses, and timestamps. Remove this identity-scoped entry on sign-out/authentication changes or include the authenticated user identity in its key.
Useful? React with 👍 / 👎.
Improving Documentation
pnpm lint:fixto fix formatting issues before opening the PR.Description
What?
Why?