Show list activity on profiles - #76
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
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: Repository UI 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 |
|
React Doctor found no issues. 🎉
|
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
ffb82c9 to
764e1eb
Compare
e60a507 to
89bb9a2
Compare
764e1eb to
9441425
Compare
89bb9a2 to
cad1cea
Compare
There was a problem hiding this comment.
Pull request overview
Adds “Recent activity” (AniList list updates) to both personal and public profile experiences, including a reusable activity row component and Apollo cache pagination support to avoid extra fetches.
Changes:
- Introduce
ActivityFeedRow/ActivityFeedDividerand a sharedActivityFeedFragment+filterListActivitieshelper. - Fetch and render recent list activity on the personal profile tab and public user profiles.
- Extend Apollo cache policies to support
Page.activitiespagination/merging and add missing Japanese strings.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| translations/ja_JP.json | Adds hashed-key Japanese translations for the new profile activity strings/connector. |
| i18n/translations/ja_JP.json | Adds short-key Japanese translations for the new profile activity strings/connector. |
| screens/UserProfileScreen/index.tsx | Adds activity fetch to the public profile query and passes activities into the profile content. |
| screens/ProfileScreen/UserProfileContent.tsx | Renders a “Recent activity” section and supports loading/error display for activities. |
| app/(tabs)/profile.tsx | Adds a separate activity query for the viewer profile and refreshes both viewer + activity on pull-to-refresh. |
| graphql/client.ts | Adds ActivityUnion possibleTypes and a Page.activities field policy for pagination-safe merges. |
| graphql/activity.ts | Introduces a shared fragment, profile activity limit constant, and activity filtering helper. |
| components/activity-feed-row.tsx | New reusable UI row for list activity with accessible user/media links and localized connector text. |
Comments suppressed due to low confidence (1)
screens/UserProfileScreen/index.tsx:105
UserProfileContentnow supportsactivityLoading/activityError, but the public profile screen only passesactivities. When the user object is satisfied from cache but the newPage.activitiesfield is still loading, this will render the activity section as empty (“No list updates yet.”) instead of showing a loading state.
Pass through an activity-loading flag (based on loading + whether activities are present yet) and surface GraphQL errors for the section so it can show the error text when activities fail to load.
<UserProfileContent
user={data.User}
activities={activities}
action={
accessToken ? (
<FollowButton
userId={data.User.id}
isFollowing={Boolean(data.User.isFollowing)}
isOwnProfile={data.User.id === data.Viewer?.id}
/>
) : undefined
}
/>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9441425 to
91d5636
Compare
85a4da3 to
e52b788
Compare
91d5636 to
370515e
Compare
e52b788 to
a4c4162
Compare
- Localize the activity headline connector and profile link accessibility labels (the status verb itself only exists in English on AniList)
- Extract the shared activity fragment, profile activity limit, and ListActivity normalization into graphql/activity.ts so the personal and public profile paths can't drift (also clears react-doctor's only-export-components warning on the row component) - Hide the activity row's cover poster when media has no cover image instead of rendering an empty uri
28c82bb to
25814fe
Compare
Stack: 3 of 4. Depends on #75.
Summary
Test plan
Summary by cubic
Adds recent AniList list activity to personal and public profiles with a reusable, localized
ActivityFeedRowand a “Recent activity” section (loading/error/empty, pull-to-refresh). Normalizes AniList status strings to localized actions, preserves locale-specific spacing, and hides media covers when missing.New Features
ja_JPstrings and accessibility labels.Refactors
ActivityFeedFragment,PROFILE_ACTIVITY_LIMIT,filterListActivities, andgetListActivityActiontographql/activity.ts(with tests).ActivityUnionandPage.activitiespolicies (customkeyArgsandmerge) to avoid extra fetches.Written for commit 25814fe. Summary will update on new commits.