Conversation
| @@ -1,3 +1,4 @@ | |||
| /* eslint-disable complexity */ | |||
There was a problem hiding this comment.
[maintainability]
Disabling the complexity rule can allow overly complex functions to go unnoticed. Consider refactoring the code to reduce complexity instead of disabling the rule.
| ? aiReviewDecisionsBySubmissionId?.[submissionId] | ||
| : undefined | ||
|
|
||
| const hasScore |
There was a problem hiding this comment.
[💡 readability]
The hasScore variable could be simplified by using currentDecision?.totalScore != null, which checks for both null and undefined in a more concise way.
| = currentDecision?.totalScore !== null | ||
| && currentDecision?.totalScore !== undefined | ||
|
|
||
| const overallStatus = normalizeDecisionStatus(currentDecision?.status) |
There was a problem hiding this comment.
[correctness]
Ensure that normalizeDecisionStatus handles all possible statuses correctly. If new statuses are added in the future, this could lead to incorrect behavior if not updated.
| <li | ||
| className={classNames( | ||
| styles.runEntry, | ||
| styles.overallRow, | ||
| )} | ||
| > | ||
| <span className={styles.workflowNameWrap}> | ||
| <IconAiReview /> | ||
| <span className={styles.overallScore}>Overall Score</span> | ||
| </span> | ||
|
|
||
| {hasScore ? ( | ||
| <AiWorkflowRunStatus | ||
| status={overallStatus} | ||
| score={overallScore ?? undefined} | ||
| showScore | ||
| hideLabel | ||
| /> | ||
| ) : ( | ||
| <AiWorkflowRunStatus | ||
| status='pending' | ||
| showScore={false} | ||
| hideLabel={false} | ||
| /> | ||
| )} | ||
| </li> | ||
| )} |
There was a problem hiding this comment.
🟡 Missing CSS module classes overallRow and overallScore in ReviewsSidebar stylesheet
The new "Overall Score" sidebar entry references styles.overallRow (line 151) and styles.overallScore (line 156), but neither class is defined in ReviewsSidebar.module.scss. With CSS modules, these will resolve to undefined, so classNames(styles.runEntry, styles.overallRow) effectively only applies runEntry, and the <span className={styles.overallScore}> gets no class at all. If these classes were intended to provide distinct styling for the overall score row (e.g., different font weight, separator, or visual distinction from individual workflow entries), that styling will be completely missing.
Prompt for agents
Add the missing CSS classes .overallRow and .overallScore to src/apps/review/src/pages/reviews/components/ReviewsSidebar/ReviewsSidebar.module.scss. These classes are referenced in ReviewsSidebar.tsx at lines 151 and 156 respectively. Define appropriate styles for the Overall Score row - for example, .overallRow might need a top border or margin to visually separate it from individual workflow entries, and .overallScore might need a bold font-weight to distinguish it as a summary label.
Was this helpful? React with 👍 or 👎 to provide feedback.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/PM-4265
What's in this PR?
Adds overall score
Fixes UI for gating indicator