fix(RC1-002): guest profile avatar navigation and related guest UX fixes - #432
Conversation
…oasts Link follower/following avatars to public profiles (RC1-002), gate dashboard chat/notification pollInterval on auth so guests no longer hit getChatRooms errors, and render landing People search avatars via DisplayAvatar. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ctation Unblocks frontend type-check (TS1117) failing in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
motirebuma
left a comment
There was a problem hiding this comment.
Hi @niamao nice work: clean, well-scoped PR. Three fixes in 5 files, all related to guest/unauthenticated UX.
-
Avatar navigation (RC1-002) — wrapping the
UserFollowDisplayavatar in a<Link>to the profile page is the right fix. The username was already linked; the avatar wasn't. Good test added for it too. -
Guest polling fix — gating
pollIntervalonloggedInin the dashboard layout is a solid catch. Apollo does keep polling even whenskipis true, which was firing authenticated requests for guests and causing theCannot read properties of undefined (reading '_id')toast. SettingpollInterval: loggedIn ? 60000 : 0(and8000 : 0for chat rooms) is the correct fix. -
Landing page avatar fix — switching from inline
Image/Usericon to the sharedDisplayAvatarcomponent for hero search People results handles empty/malformed avatar values cleanly and removes theUserimport that's no longer needed.
The duplicate username property removal in ProfileHeaderMessage.test.tsx is a valid fix too — duplicate object keys are a silent JS issue.
Verdict: approved, ready to merge.
Thank you @niamao
Summary
/dashboard/profile/{username}for logged-out users (username already linked; avatar was not).Cannot read properties of undefined (reading '_id')by gating dashboardGET_CHAT_ROOMS/GET_NOTIFICATIONSpollIntervalonloggedIn(Apollo continues polling whenskipis true).{}avatar values by using sharedDisplayAvatar.Test plan
/dashboard/explore, click a post author avatar → lands on that user's public profile/dashboard/explorefor ~20s → no_idtoast / nogetChatRoomserrors/: search a name with People results → avatars render with no Imagesrcconsole errorsMade with Cursor