Skip to content

consolidate analytics computation logic#234

Open
ash1shkumar wants to merge 1 commit into
Shriii19:masterfrom
ash1shkumar:consolidate-analytics-computation-layer
Open

consolidate analytics computation logic#234
ash1shkumar wants to merge 1 commit into
Shriii19:masterfrom
ash1shkumar:consolidate-analytics-computation-layer

Conversation

@ash1shkumar
Copy link
Copy Markdown
Contributor

📝 Description

This PR improves the analytics architecture by introducing reusable computation helpers and centralizing aggregate metric calculations used by the performance analytics dashboard.

Previously, analytics values such as completed tasks, assigned tasks, review totals, and completion percentages were calculated directly within the component. As analytics requirements expand, maintaining multiple isolated calculation paths can increase duplication and make future enhancements more difficult.

Changes Implemented

  • Introduced reusable analytics aggregation helper
  • Added centralized completion rate calculation helper
  • Consolidated metric computation logic into dedicated utility functions
  • Reduced duplicated calculation patterns within the component
  • Added memoized analytics aggregation using useMemo
  • Improved separation between analytics computation and presentation layers

Benefits

  • Improved analytics consistency
  • Reduced duplicated calculations
  • Better maintainability
  • Cleaner component structure
  • Improved scalability for future reporting features
  • Easier extension of analytics metrics and aggregations

🎯 Type of Change

  • Refactoring
  • Performance Improvement
  • Code Quality Improvement

✅ Testing

  • Verified completion percentage calculations remain accurate
  • Verified completed task totals render correctly
  • Verified assigned task totals remain unchanged
  • Verified review totals render correctly
  • Verified metric toggle functionality remains operational
  • Verified analytics charts render correctly
  • Verified member performance visualization remains unchanged
  • Verified no UI regressions after computation refactoring
  • Verified memoized aggregation updates correctly when member data changes

Fixes #209

Expected Labels

level3 NSoC'26

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

@ash1shkumar 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 5, 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.

Introduce Reusable Analytics Computation Layer

1 participant