Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/ChallengeEditor/ChallengeView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ const ChallengeView = ({
const hasRealAiScreeningPhase = phaseList.some(p => p.name === AI_SCREENING_PHASE_NAME)
const showVirtualAiScreening = hasAiReviewers(challenge.reviewers) && !hasRealAiScreeningPhase
const submissionIndex = phaseList.findIndex(p => p.name === 'Submission')
const checkpointSubmissionIndex = phaseList.findIndex(p => p.name === 'Checkpoint Submission')
return (
<>
{phaseList.map((phase, index) => (
Expand All @@ -242,7 +243,7 @@ const ChallengeView = ({
phaseIndex={index}
readOnly
/>
{showVirtualAiScreening && index === submissionIndex && (
{showVirtualAiScreening && (index === submissionIndex || index === checkpointSubmissionIndex) && (
<PhaseInput
phase={{ name: AI_SCREENING_PHASE_NAME }}
readOnly
Expand All @@ -251,7 +252,7 @@ const ChallengeView = ({
)}
</React.Fragment>
))}
{showVirtualAiScreening && submissionIndex === -1 && (
{showVirtualAiScreening && submissionIndex === -1 && checkpointSubmissionIndex === -1 && (

Choose a reason for hiding this comment

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

[⚠️ correctness]
The condition submissionIndex === -1 && checkpointSubmissionIndex === -1 is used to determine if neither a 'Submission' nor a 'Checkpoint Submission' phase exists. Ensure that this logic aligns with the intended behavior, as it might lead to unexpected results if either phase is missing but not both.

<PhaseInput
phase={{ name: AI_SCREENING_PHASE_NAME }}
readOnly
Expand Down
Loading