Skip to content

PM-5444: Show top percentile for highest profile ratings#1987

Merged
jmgasper merged 1 commit into
devfrom
PM-5444
Jun 25, 2026
Merged

PM-5444: Show top percentile for highest profile ratings#1987
jmgasper merged 1 commit into
devfrom
PM-5444

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken
Profiles with a positive rating above the highest returned rating distribution bucket showed the rating value but omitted the Top X% percentile badge.

Root cause
The percentile calculation returned undefined when no distribution bucket contained or exceeded the member rating. For outlier ratings above the final bucket, that suppressed the badge even though the member should still be shown as a top-ranked member.

What was changed
Treat ratings above the final distribution bucket as the top known member percentage so the existing formatter renders a visible Top 1% badge instead of hiding the percentile details.

Any added/updated tests
Added utility coverage for ratings above the highest distribution range and component coverage for rendering Top 1% with a 4051 profile rating.

Validation run:

  • PASS yarn test:no-watch --runTestsByPath src/apps/profiles/src/member-profile/about-me/MemberRatingCard/MemberRatingCard.utils.spec.ts src/apps/profiles/src/member-profile/about-me/MemberRatingCard/MemberRatingCard.spec.tsx
  • PASS yarn lint
  • PASS yarn run build, with existing CSS order and lint warning output from unrelated modules
  • FAIL yarn test:no-watch: existing unrelated failures in src/apps/work specs, including engagement-editor schema validation, ReviewersField missing mocked fetchAiReviewConfigByChallenge, and ChallengeEditorForm launch expectations

What was broken
Profiles with a positive rating above the highest returned rating distribution bucket showed the rating value but omitted the Top X% percentile badge.

Root cause
The percentile calculation returned undefined when no distribution bucket contained or exceeded the member rating. For outlier ratings above the final bucket, that suppressed the badge even though the member should still be shown as a top-ranked member.

What was changed
Treat ratings above the final distribution bucket as the top known member percentage so the existing formatter renders a visible Top 1% badge instead of hiding the percentile details.

Any added/updated tests
Added utility coverage for ratings above the highest distribution range and component coverage for rendering Top 1% with a 4051 profile rating.
@jmgasper jmgasper requested a review from kkartunov as a code owner June 24, 2026 23:03
@jmgasper jmgasper merged commit 632d431 into dev Jun 25, 2026
7 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