Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-3216
https://topcoder.atlassian.net/browse/PM-2573

What's in this PR?

  • Dont show edit manager comment to reviewer
  • Filter reviews which are failed screening

selectedTab={props.selectedTab}
reviews={reviewTabReviews}
submitterReviews={reviewTabSubmitterReviews}
screeningOutcome={screeningOutcome}

Choose a reason for hiding this comment

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

[⚠️ correctness]
The screeningOutcome variable is being passed to the TabContentReview component. Ensure that this component is designed to handle the new screeningOutcome prop correctly, especially if it wasn't previously expecting this data. This could impact the component's behavior if not handled properly.

interface Props {
aiReviewers?: { aiWorkflowId: string }[]
selectedTab: string
screeningOutcome: {

Choose a reason for hiding this comment

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

[💡 maintainability]
Consider using ReadonlySet<string> for failingSubmissionIds and passingSubmissionIds to ensure immutability and prevent accidental modifications.

<MarkdownReview value={comment} />
</div>
{isManagerEdit && (
{isManagerEdit && canAddManagerComment && (

Choose a reason for hiding this comment

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

[⚠️ correctness]
The addition of canAddManagerComment to the condition ensures that the edit button is only shown when both isManagerEdit and canAddManagerComment are true. Verify that canAddManagerComment is correctly set in all contexts where this component is used, as any oversight could lead to unexpected behavior where the edit button is not displayed when it should be.

)

const filterScreeningPassedReviews = useCallback((submissions: SubmissionInfo[]): SubmissionInfo[] => {
return submissions.filter(submission => props.screeningOutcome.passingSubmissionIds.has(submission.id ?? ''))

Choose a reason for hiding this comment

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

[⚠️ correctness]
Consider adding a null check for submission.id before using it in props.screeningOutcome.passingSubmissionIds.has(submission.id ?? ''). This will prevent potential issues if submission.id is null or undefined.

() => (restrictToLatest ? latestSubmissions : reviewPhaseDatas),
[latestSubmissions, restrictToLatest, reviewPhaseDatas],
() => (restrictToLatest ? filterScreeningPassedReviews(latestSubmissions) : filterScreeningPassedReviews(reviewPhaseDatas)),
[latestSubmissions, restrictToLatest, reviewPhaseDatas, filterScreeningPassedReviews],

Choose a reason for hiding this comment

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

[⚠️ performance]
The dependency array for useMemo includes filterScreeningPassedReviews, which is a function. Functions are recreated on every render, causing this useMemo to recalculate every time. Consider using useCallback for filterScreeningPassedReviews to ensure stable references.

Copy link
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.

@hentrymartin fix lint & build

@hentrymartin
Copy link
Collaborator Author

@hentrymartin fix lint & build

@kkartunov Lint is fixed now!!

@kkartunov kkartunov self-requested a review December 15, 2025 15:39
@hentrymartin hentrymartin merged commit a3be432 into dev Dec 15, 2025
8 checks passed
@hentrymartin hentrymartin deleted the pm-3216 branch December 15, 2025 16:02
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.

3 participants