Skip to content

refactor: Deduplicate signal metrics mapping between Comparison and Profile views #247

Closed

Description

@O2sa

Both ResultDashboard (src/features/comparison/components/result-dashboard.tsx) and UserProfileClient (src/features/developer/components/user-profile-client.tsx) define duplicate arrays mapping user signal fields (reposAnalyzed, pullRequestsAnalyzed, mergedExternalPRs, unmergedPRsIgnored, etc.) to translated labels.

Motivation

Duplicating metric lists creates maintenance overhead when new signal metrics are added to the scoring engine. Extracting a shared helper keeps metrics in sync.

Tasks

  • Create a shared helper function (e.g. getSignalMetricEntries(signals, t)) in src/features/developer or src/lib/.
  • Refactor ResultDashboard to consume the shared helper.
  • Refactor UserProfileClient to consume the shared helper.
  • Ensure all translation keys remain identical and typed.

Tip

🚀 Want to contribute?
Comment assign me to be automatically assigned to this issue via our GitHub Actions bot. Happy coding! ✨

Activity

  1. abhinavrastogi2627 commented on Oct 21, 2026

    @abhinavrastogi2627
    Contributor

    assign me

  2. github-actions commented on Oct 21, 2026

    @github-actions

    🎉 Issue assigned to @abhinavrastogi2627! Happy coding!

  3. O2sa commented on Oct 21, 2026

    @O2sa
    OwnerAuthor

    @abhinavrastogi2627
    One small note regarding our good first issue labels: these issues are intended specifically for contributors making their first contribution to the project.

    Once a contributor has successfully completed and merged their first contribution, please avoid taking issues labeled good first issue. This helps keep these issues available for new contributors who are looking for an accessible way to get started with the project.

    For future contributions, please consider picking issues without the good first issue label. Thanks for understanding and helping us keep the project welcoming to new contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions