Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ReviewSettingsSection = ({ configuration, onUpdateConfiguration, readOnly,
className={styles.modeDropdown}
>
<option value='AI_GATING'>AI_GATING</option>
<option value='AI_ONLY'>AI_ONLY</option>
{/* <option value='AI_ONLY'>AI_ONLY</option> */}
</select>
<p className={styles.modeInfo}>
{configuration.mode === 'AI_GATING'
Expand Down
5 changes: 3 additions & 2 deletions src/components/ChallengeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2053,6 +2053,7 @@ class ChallengeEditor extends Component {
const hasRealAiScreeningPhase = phases.some(p => p.name === AI_SCREENING_PHASE_NAME)
const showVirtualAiScreening = hasAiReviewers(challenge.reviewers) && !hasRealAiScreeningPhase
const submissionIndex = phases.findIndex(p => p.name === 'Submission')
const checkpointSubmissionIndex = phases.findIndex(p => p.name === 'Checkpoint Submission')
return (
<>
{phases.map((phase, index) => (
Expand All @@ -2065,7 +2066,7 @@ class ChallengeEditor extends Component {
this.onUpdatePhaseDate(item, index)
}}
/>
{showVirtualAiScreening && index === submissionIndex && (
{showVirtualAiScreening && (index === submissionIndex || index === checkpointSubmissionIndex) && (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[⚠️ maintainability]
The condition (index === submissionIndex || index === checkpointSubmissionIndex) is repeated multiple times in the code. Consider extracting this logic into a well-named function to improve maintainability and readability.

<PhaseInput
phase={{ name: AI_SCREENING_PHASE_NAME }}
readOnly
Expand All @@ -2074,7 +2075,7 @@ class ChallengeEditor extends Component {
)}
</React.Fragment>
))}
{showVirtualAiScreening && submissionIndex === -1 && (
{showVirtualAiScreening && (submissionIndex === -1 || checkpointSubmissionIndex === -1) && (
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[⚠️ maintainability]
The condition (submissionIndex === -1 || checkpointSubmissionIndex === -1) is repeated multiple times in the code. Consider extracting this logic into a well-named function to improve maintainability and readability.

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