Skip to content

PM-5433: Fix profile subtrack summary counters#1981

Merged
jmgasper merged 1 commit into
devfrom
PM-5433
Jun 22, 2026
Merged

PM-5433: Fix profile subtrack summary counters#1981
jmgasper merged 1 commit into
devfrom
PM-5433

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken
AI Engineering and Data Science subtrack summary cards could show 0 submissions, and AI Engineering detail headers could show 0 wins, even when the profile history showed challenge activity and winning placements.

Root cause
The profiles UI rendered aggregate counters directly from member stats rows. Some unified stats rows expose challenge/rating history while their aggregate win or submission counters are missing or left at zero.

What was changed
Added a shared subtrack summary helper that preserves positive aggregate counters, falls back to history placement wins when aggregate wins are zero, and falls back to history/challenge counts when submission counters are zero. Track and subtrack views now use that helper for cards and detail summaries.

Any added/updated tests
Updated useFetchActiveTracks specs to cover zero-submission fallback and AI Engineering history-derived wins/submissions.

Validation

  • yarn test:no-watch src/apps/profiles/src/hooks/useFetchActiveTracks.spec.tsx passed.
  • yarn lint passed.
  • yarn run build passed with existing CRA warnings.
  • yarn test:no-watch was run for the full suite and failed in unrelated work/wallet specs outside profiles.

What was broken
AI Engineering and Data Science subtrack summary cards could show 0 submissions, and AI Engineering detail headers could show 0 wins, even when the profile history showed challenge activity and winning placements.

Root cause
The profiles UI rendered aggregate counters directly from member stats rows. Some unified stats rows expose challenge/rating history while their aggregate win or submission counters are missing or left at zero.

What was changed
Added a shared subtrack summary helper that preserves positive aggregate counters, falls back to history placement wins when aggregate wins are zero, and falls back to history/challenge counts when submission counters are zero. Track and subtrack views now use that helper for cards and detail summaries.

Any added/updated tests
Updated useFetchActiveTracks specs to cover zero-submission fallback and AI Engineering history-derived wins/submissions.
@jmgasper jmgasper requested a review from kkartunov as a code owner June 22, 2026 20:34
@jmgasper jmgasper merged commit 3460355 into dev Jun 22, 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