fix: Display requested friend's name in pending partner requests#40
Merged
fix: Display requested friend's name in pending partner requests#40
Conversation
Co-authored-by: JustinhSE <84724234+JustinhSE@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix display of requested friend's name when sending partner request
fix: Display requested friend's name in pending partner requests
Feb 25, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes the display of requested friend names in the "Pending Requests" section by changing how outgoing friend requests are stored in the application state. Previously, only user IDs were stored, making it impossible to reliably display user names without fragile lookups.
Changes:
- Modified
friendRequests.outgoingfrom storing user IDs (string[]) to full user profiles (UserProfile[]) - Updated auth loading logic to fetch complete profile data for each outgoing friend request
- Simplified the "Pending Requests" UI to directly access user properties from the profile objects
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/utils/auth.tsx | Changed friendRequests.outgoing type from string[] to UserProfile[] and added logic to fetch full profiles at auth load time |
| src/components/FriendsList.tsx | Updated filter logic to work with UserProfile[] objects and simplified the "Pending Requests" rendering to use profile data directly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
JustinhSE
approved these changes
Feb 25, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
friendRequests.outgoingwas stored asstring[](IDs only), so the "Pending Requests" UI had no reliable way to resolve names — it fell back to looking up IDs inallUsernames, which explicitly filtered out users with pending requests.Changes
src/utils/auth.tsxfriendRequests.outgoingtype fromstring[]→UserProfile[]UserProfilefor each outgoing request ID at auth load time, mirroring the existing pattern for incoming requests:src/components/FriendsList.tsxallUsernamesfilter:.includes(user.id)→.some(u => u.id === user.id)to account for the new object shapeUserProfileobjects directly — removes the fragileallUsernameslookup fallback that was producing"User"as the display nameOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.