Skip to content

fix: use dense ranking on profile pages to match ranking table#17

Merged
vahldiek merged 1 commit into
ReproDB:mainfrom
vahldiek:fix/dense-rank-profile-page
Jun 3, 2026
Merged

fix: use dense ranking on profile pages to match ranking table#17
vahldiek merged 1 commit into
ReproDB:mainfrom
vahldiek:fix/dense-rank-profile-page

Conversation

@vahldiek

@vahldiek vahldiek commented Jun 3, 2026

Copy link
Copy Markdown
Member

Problem

The profile page displayed ranks using competition ranking (from the pre-computed rank field in JSON data), while the ranking table computed dense ranks client-side. This caused mismatches — e.g., Sanidhya Kashyap showed rank 4 in the header but the ranking table showed the correct dense rank.

Additionally, the ranking history chart showed stale values from old snapshots that used competition ranking.

Fix

  • Added assignDenseRanks() to compute dense ranks client-side from combined_score
  • Added fixHistoryRanks() to recompute dense ranks within each history snapshot from stored scores
  • Profile header card now shows _denseRank instead of the stored rank field
  • Both author and institution profiles are fixed

Verification

Tested that Anjo Vahldiek-Oberwagner shows rank 9 (not 11) and Sanidhya Kashyap shows rank 4 (not higher), matching the ranking table.

The profile page was reading pre-computed rank values from the JSON data
which used competition ranking (skips numbers after ties). The ranking
table on the overview page computes dense ranks client-side (rank only
increments by 1 per distinct score).

This fix adds client-side dense rank computation for:
- Author profile rank card
- Institution profile rank card
- Author ranking history chart
- Institution ranking history chart

Example: Anjo Vahldiek-Oberwagner was shown as rank 11 but should be 9
(two tied pairs above reduce the dense rank by 2).
@vahldiek vahldiek merged commit f754621 into ReproDB:main Jun 3, 2026
3 checks passed
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