Fix contributor graph score milestone thresholds to match backend scoring#331
Merged
rushabhcodes merged 2 commits intoMay 24, 2026
Conversation
|
@rushabhcodes is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
Updates the frontend contributor score graph’s milestone reference lines so they match the backend score→badge threshold mapping, preventing UI/scoring discrepancies.
Changes:
- Updated
ContributorGraphscore milestone thresholds to4, 11, 50, 82, 122, 162. - Adjusted the displayed badge labels at each milestone to match the current backend mapping.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
imrishabh18
approved these changes
May 24, 2026
|
Thank you for your contribution! 🎉 PR Rating: ⭐⭐ Track your contributions and see the leaderboard at: tscircuit Contribution Tracker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a scoring consistency bug in the contributor graph by deriving score milestone markers from the shared backend scoring thresholds instead of maintaining a separate frontend
copy.
Changes
SCORE_TO_STAR_THRESHOLDSfromlib/scoring/scoreToStarsSCORE_LABEL_ENTRIESthreshold table from the frontendWhy
The contributor graph had a duplicated score-to-badge mapping that had already drifted from the backend scoring rules once. This change removes that source of inconsistency and
ensures future threshold updates stay in sync across the app.
Before
After
Refactoring for consistency and maintainability:
SCORE_LABEL_ENTRIESarray with a derived array generated from the importedSCORE_TO_STAR_THRESHOLDSconstant, filtering out entries with aminScoreof 0 or an emptystarString(frontend/src/components/ContributorGraph.tsx).SCORE_TO_STAR_THRESHOLDSfromlib/scoring/scoreToStarsto use as the source of truth for score-to-star mappings (frontend/src/components/ContributorGraph.tsx).