Skip to content

fix(analytics): replace hardcoded fake member profiles with real workspace user data [NSoC'26]#165

Open
anshul23102 wants to merge 1 commit into
Shriii19:masterfrom
anshul23102:fix/161-analytics-fake-members
Open

fix(analytics): replace hardcoded fake member profiles with real workspace user data [NSoC'26]#165
anshul23102 wants to merge 1 commit into
Shriii19:masterfrom
anshul23102:fix/161-analytics-fake-members

Conversation

@anshul23102
Copy link
Copy Markdown

Description

getAnalytics built member metrics from a static list of six hardcoded fictional team members (Alex Rivera, Jordan Smith, Casey Morgan, Riley Lee, Morgan Patel, Quinn Taylor). Task assignments and completion counts were computed with a deterministic hash function and arbitrary multipliers, bearing no relation to actual workspace users or their activity.

Changes Made

File Change
backend/controllers/analytics.controller.js Removed all hardcoded member profiles, hashString, and the fake buildMembers function
backend/controllers/analytics.controller.js The member roster is now derived from the distinct set of usernames present in the messages table
backend/controllers/analytics.controller.js Assigned tasks and completed tasks are computed from real Supabase task data; the 8-day activity histogram is built from actual message timestamps

Testing Done

  • GET /api/analytics now returns the real contributors who have sent messages.
  • If no messages exist, a single "team" placeholder is returned to prevent an empty response.
  • Sprint split is based on the chronological midpoint of actual tasks.

Checklist

  • No merge conflicts with master
  • No em dashes or double hyphens in comments
  • Changes focused on the reported surface

Closes #161

…space data [NSoC'26]

getAnalytics built member metrics from a static list of six fictional team
members (Alex Rivera, Jordan Smith, Casey Morgan, Riley Lee, Morgan Patel,
Quinn Taylor) using a hash-based pseudo-assignment. None of these metrics
reflected who actually created tasks or sent messages.

Replaced the fake members with a roster derived from the distinct usernames
present in the messages table. Metrics (assigned tasks, completed tasks,
reviews, daily activity) are now computed from the real Supabase data.
The 8-day activity histogram is built from actual message timestamps.

Closes Shriii19#161
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

@anshul23102 is attempting to deploy a commit to the shreemp194-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

👋 Thank you for opening this pull request! I will review your changes and assist you soon.

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.

Bug: analytics.controller.js uses hardcoded fake member profiles — member metrics bear no relation to actual workspace users

1 participant