Skip to content

PM- 4482 Fix MM skill tooltips#1555

Merged
himaniraghav3 merged 6 commits intodevfrom
PM-4482
Mar 30, 2026
Merged

PM- 4482 Fix MM skill tooltips#1555
himaniraghav3 merged 6 commits intodevfrom
PM-4482

Conversation

@himaniraghav3
Copy link
Copy Markdown
Collaborator

@himaniraghav3 himaniraghav3 commented Mar 26, 2026

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-4482

What's in this PR?

MM skills response has a different structure


Open with Devin

[myChallengeResources],
)

const canEditScorecard = useMemo(() => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The removal of hasChallengeCopilotRole from the dependencies of canEditScorecard could lead to incorrect behavior if the copilot role is intended to influence the ability to edit the scorecard. Ensure that the copilot role is not required for this logic, or consider adding it back if it was removed unintentionally.

}>
}

export type MarathonMatchSkillActivity = {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Consider adding validation or type-checking for the createdAt field to ensure it is a valid date string. This can prevent potential runtime errors if the data source provides an unexpected format.

):
</div>
{skillDetails.activity['marathon match'].sources?.map(s => (
<a
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 readability]
Consider adding a descriptive name for each Marathon Match link instead of using the generic text 'Marathon Match'. This will improve the clarity for users who are navigating the links.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

target='_blank'
rel='noopener noreferrer'
>
{s.name || 'Marathon Match'}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ correctness]
Using s.name || 'Marathon Match' assumes that s.name is always a string. If s.name can be null or undefined, this is fine, but if it can be other falsy values like an empty string, this logic might unintentionally fall back to 'Marathon Match'. Consider explicitly checking for null or undefined if those are the only cases you want to handle.

Copy link
Copy Markdown
Collaborator

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@himaniraghav3 fix the build as it failing...

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

<li>
<div className={styles.tooltipRow}>
Marathon Matches (
{skillDetails.activity['marathon match'].lastSources?.length ?? 0}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Marathon match count displays lastSources.length instead of .count, inconsistent with all other activity types

The marathon match section uses skillDetails.activity['marathon match'].lastSources?.length ?? 0 to display the count, while every other activity type (challenges, courses, certifications, engagements) uses the .count property from UserSkillActivity. The count field represents the total number of activities, whereas lastSources is a subset containing only the most recent entries (as implied by the name). This means the displayed count for marathon matches could be lower than the actual total when there are more activities than are returned in lastSources.

Suggested change
{skillDetails.activity['marathon match'].lastSources?.length ?? 0}
{skillDetails.activity['marathon match'].count}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@himaniraghav3 himaniraghav3 merged commit a15407f into dev Mar 30, 2026
9 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.

2 participants