Skip to content

Comments

Sayali : Add member count display to PR Actions Done chart#4864

Open
sayali-2308 wants to merge 2 commits intodevelopmentfrom
Sayali_Add_Member_Count_To_PR_Actions_Chart
Open

Sayali : Add member count display to PR Actions Done chart#4864
sayali-2308 wants to merge 2 commits intodevelopmentfrom
Sayali_Add_Member_Count_To_PR_Actions_Chart

Conversation

@sayali-2308
Copy link

@sayali-2308 sayali-2308 commented Feb 19, 2026

image

Description

Implements Task #14 (PRIORITY MEDIUM): Show the number of team members next to team name in 'PR Action Done' bar charts.

The PR Action Done chart on the PR Reviews Insights page now displays the number of team members next to each team name using Unicode circled numbers (⓪①②③...). The member count is fetched from the backend API and updates dynamically based on how many active users have that team's teamCode assigned.

Implements # 14 (Priority Medium - PR Review Team Analytics Dashboard - PR Insights Frontend)

Related PRs (if any):

This frontend PR is related to the backend PR OneCommunityGlobal/HGNRest#2060
To test this PR you also need the backend PR for the test endpoint.

Main changes explained:

  • Updated ActionDoneGraph.jsx to display Unicode circled numbers (⓪①②③...) next to each team name on the y-axis of the PR Action Done bar chart, showing the number of active members in that team
  • Updated ReviewsInsight.jsx to include memberCount when formatting team data from the API response, so it is correctly passed down to ActionDoneGraph

How to test:

  1. Check out current branch: Sayali_Add_Member_Count_To_PR_Actions_Chart
  2. Run npm install and npm run start:local to run the frontend locally
  3. Ensure backend is running on port 4500
  4. Clear site data/cache
  5. Navigate to: http://localhost:5173/pull-request-analytics/reviews-insight
  6. Verify all teams show ⓪ initially (no users assigned to teams in test DB)
  7. To test count updates, use Postman:
    • POST http://localhost:4500/api/login with admin credentials to get token
    • GET http://localhost:4500/api/userprofile (with Bearer token) — copy any _id
    • POST http://localhost:4500/api/test/set-team-code with body { "userId": "<copied_id>", "teamCode": "Team E" }
    • Hard refresh (Ctrl+Shift+R) — Team E should now show ①
    • Repeat with another userId for Team E — should show ②
  8. Verify feature works in [dark mode]

Screenshots or videos of changes:

image image

Note:

  • The backend already returns memberCount per team in the /api/analytics/pr-review-insights response. The count reflects active users (isActive: true) whose teamCode matches the team.
  • All teams currently show ⓪ in the test database as no users have teamCode assigned by default. The test endpoint (/api/test/set-team-code) from the related backend PR can be used to assign teamCodes for testing.
  • Unicode circles support counts from 0–20. For teams with more than 20 members, the count is displayed as (n) e.g. (25).

@netlify
Copy link

netlify bot commented Feb 19, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit e7859c0
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/699695b4eabd87000875c4fa
😎 Deploy Preview https://deploy-preview-4864--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link

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.

1 participant