Dovy/fea/profiles with usernames#202
Merged
Merged
Conversation
Replace GET /users/:id and GET /users/:id/events with GET /users/:username and GET /users/:username/events. Add userGetPublicByName and userGetPublicEventsByName service methods that normalize the username and delegate to the existing ID-based public methods.
Update userService with getUserByName/getUserEventsByName methods, change the router param from :id to :username, and update the publicProfileLoader to fetch by username instead of numeric ID.
Replace /users/:id with /users/:name across chat bubbles, chat headers, conversation cards, global search, event page host link, friends page, and profile sidebar.
Add controller unit tests for getUserByUsername and getUserEventsByUsername including the 404 case. Update GlobalSearch test route and mock data to reflect username-based navigation.
…gination Add ReqUserPublicEventsDto (limit + cursor query params), update userGetPublicEvents to accept limit/cursor and return a paginated envelope, and wire the query params through the controller.
Update getUserEventsByName to accept limit/cursor params, pass the first page and pagination from the loader into ProfileTabs, and replace the static events grid with useInfiniteScroll + sentinel div.
Pass activeTab as a dependency to useInfiniteScroll so the IntersectionObserver is recreated when the user switches to the events tab. Without this the sentinel is hidden/unmounted at observer setup time (Radix TabsContent) and the observer never fires.
Collaborator
Author
|
Added pagination to public-profiles so events are not all fetched at same time |
… routing
- Route mocks now use username slugs instead of numeric IDs
- User mock data includes displayName field alongside lowercase name
- Events mock response uses paginated envelope { data, pagination }
Owner
alx-sch
approved these changes
Mar 19, 2026
Owner
alx-sch
left a comment
There was a problem hiding this comment.
Good stuff! Good catch with that event-list on the public profile page -- totally forgot about this one ;)
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.

closes #200
Basically some changes to be able to retrieve user specific information using usernames now that they are generated.
This pull request updates the user profile and event routes, as well as all related frontend code, to use usernames instead of numeric user IDs in URLs and API endpoints. It introduces new backend service methods and controller endpoints for fetching public user data and events by username, and updates all frontend navigation, data fetching, and tests to use the username-based routes. This change improves URL readability and consistency across the application.
Backend API updates
userGetPublicByNameanduserGetPublicEventsByNamemethods toUserServiceto fetch user and event data by username, and updated theUserControllerto provide endpoints at/users/:usernameand/users/:username/eventsinstead of ID-based routes.Frontend Routing and Data Fetching
/users/aliceinstead of/users/1). This includes updates to chat components, event pages, friend pages, profile sidebar, and global search.These changes collectively migrate the application to a more user-friendly and consistent username-based routing system for user profiles and related features.