You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UserProfile active-devices list was cached in a module-scoped fetch cache keyed only by a constant string, so a session switch or a sign-out/sign-in on a shared device could render the previous user's device activity (IP, location, browser/device). Key the cache by user.id.
Checklist
pnpm test runs as expected.
pnpm build runs as expected.
(If applicable) JSDoc comments have been added or updated for any package exports
The UserProfile active-devices list was cached in a module-scoped fetch
cache keyed only by a constant string, so a session switch or a
sign-out/sign-in on a shared device could render the previous user's
device activity (IP, location, browser/device). Key the cache by user.id.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This PR fixes a caching issue in the UserProfile component where active-device session data was being shared across users due to module-level cache scoping. The fix updates the useFetch hook invocation in ActiveDevicesSection to include userId as an options parameter, ensuring the cache is keyed per user. A new test verifies that device activity from one user does not appear when rendering for another user. The changeset documents the patch release.
The pull request title clearly and concisely summarizes the main change: fixing the active-devices cache by scoping it to user.id to prevent cross-user data leakage.
Description check
✅ Passed
The pull request description is directly related to the changeset, explaining the caching issue and the solution of keying the cache by user.id.
Docstring Coverage
✅ Passed
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check
✅ Passed
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
✅ Passed
Check skipped because no linked issues were found for this pull request.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
UserProfileactive-devices list was cached in a module-scoped fetch cache keyed only by a constant string, so a session switch or a sign-out/sign-in on a shared device could render the previous user's device activity (IP, location, browser/device). Key the cache byuser.id.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change