Skip to content

feat: add followers and follwing list on user and org profiles. #130

Open
Esubaalew wants to merge 9 commits intobetter-auth:mainfrom
Esubaalew:feat/profile-followers-following-20260226
Open

feat: add followers and follwing list on user and org profiles. #130
Esubaalew wants to merge 9 commits intobetter-auth:mainfrom
Esubaalew:feat/profile-followers-following-20260226

Conversation

@Esubaalew
Copy link
Copy Markdown
Contributor

@Esubaalew Esubaalew commented Feb 26, 2026

Adding followers and following lists

I am not really sure if this is important but I think it is a good addition, so below is what I did.

so /username?tab=followers and /username?tab=following will list the followers and following of the account

  • add followers/following tab support on user profile routes
  • improve org/user routing and link behavior
  • improve follower list presentation and dropdown stat links

Copilot AI review requested due to automatic review settings February 26, 2026 12:56
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2026

@Esubaalew is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

@Esubaalew Esubaalew changed the title feat: improve profile followers/following experience feat: add followers and follwing list on user and org profiles. Feb 26, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the user profile experience by adding support for viewing followers and following lists, improving navigation between user/organization pages, and adding interactive links to follower/following statistics throughout the application.

Changes:

  • Added new tab-based navigation (repos/followers/following) to user profile pages with URL parameter support
  • Implemented GitHub API integration for fetching and enriching follower/following data via GraphQL and REST APIs
  • Converted static follower/following counts into interactive buttons/links that navigate to the respective tabs
  • Improved routing logic in the [owner] page to better distinguish between users and organizations

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
apps/web/src/lib/utils.ts Added ProfileTab type and resolveProfileTab utility function for tab validation
apps/web/src/lib/github.ts Added comprehensive follower/following fetch functions with GraphQL enrichment and REST fallbacks
apps/web/src/components/users/user-profile-content.tsx Implemented tab navigation UI, follower/following display, and state management for profile tabs
apps/web/src/components/orgs/org-detail-content.tsx Converted follower/following stats to interactive links and updated date formatting
apps/web/src/components/layout/navbar.tsx Made navbar follower/following/repos stats clickable with navigation
apps/web/src/app/(app)/users/[username]/page.tsx Added tab parameter handling and follower/following data fetching
apps/web/src/app/(app)/[owner]/page.tsx Improved user/org routing with better type detection and redirects for invalid org tabs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/web/src/components/orgs/org-detail-content.tsx Outdated
Comment thread apps/web/src/lib/github.ts Outdated
Comment thread apps/web/src/components/orgs/org-detail-content.tsx Outdated
Comment thread apps/web/src/components/users/user-profile-content.tsx Outdated
Comment thread apps/web/src/components/users/user-profile-content.tsx Outdated
Comment thread apps/web/src/components/users/user-profile-content.tsx Outdated
Comment thread apps/web/src/components/orgs/org-detail-content.tsx Outdated
Comment thread apps/web/src/app/(app)/[owner]/page.tsx
Comment thread apps/web/src/components/users/user-profile-content.tsx Outdated
Comment thread apps/web/src/app/(app)/[owner]/page.tsx Outdated
@Esubaalew
Copy link
Copy Markdown
Contributor Author

I tried applying Copilot’s reviews, but I don’t think all of them are necessary. I addressed the ones I believe are needed, so there are still some reviews left.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-hub Ready Ready Preview, Comment Mar 5, 2026 7:14pm

Request Review

Copy link
Copy Markdown
Member

@ping-maxwell ping-maxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, please fix the merge conflicts and this should be good to go

@Esubaalew
Copy link
Copy Markdown
Contributor Author

@ping-maxwell on it.

@Esubaalew Esubaalew force-pushed the feat/profile-followers-following-20260226 branch from 596350e to cbb7257 Compare February 26, 2026 17:17
Comment thread apps/web/src/app/(app)/[owner]/page.tsx
Comment thread apps/web/src/lib/github.ts
@Esubaalew
Copy link
Copy Markdown
Contributor Author

Hey, @ping-maxwell
Updated this pr to be on top of the latest repo
Changed the not found harsh method to softer method

... About caching, caching is implemented for authenticated users. if we should do this for unauthenticated ones it is with tradeoffs and should be an enhancement separate from this PR

Copy link
Copy Markdown
Member

@ping-maxwell ping-maxwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey we've changed the UI a lot, I just tried to preview deploy your changes and I can't seem to see the followers btn:

Image

Could you please update this? Thanks 🙌

@Esubaalew
Copy link
Copy Markdown
Contributor Author

@ping-maxwell
Yeah the UI change removed the my changes. it looks good now . i guess

@Esubaalew Esubaalew requested a review from ping-maxwell March 5, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants