PM-5203 approval phase ai only - #1910
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the AI-only approval workflow in the review app by removing inline workflow-score editing from the AI Approval tab and centralizing score response option generation for scorecard question inputs.
Changes:
- Refactors AI Approval tab to remove inline score editing/saving and instead navigate users to the submission’s scorecard (“View scorecard”).
- Adds
getScoreResponseOptionsutility and replaces duplicated scale/yes-no option logic across multiple scorecard-related components. - Extends the scorecard AI feedback UI to support privileged score editing during the approval phase (plus a customizable submit label for the reply/editor UI).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ReviewersField/ReviewConfigurationSummary.tsx | Adjusts empty-state messaging for human reviewers in AI-only mode. |
| src/apps/review/src/lib/utils/scorecardQuestionOptions.ts | Introduces shared getScoreResponseOptions helper for score response option generation. |
| src/apps/review/src/lib/utils/index.ts | Re-exports the new scorecard question options utility. |
| src/apps/review/src/lib/services/scorecards.service.ts | Adds updateRunItemScore API helper for updating AI run item scores. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardViewer.context.tsx | Exposes the review form via context regardless of edit mode. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/ScorecardQuestionEdit/ScorecardQuestionEdit.tsx | Switches to getScoreResponseOptions for response option generation. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/ReviewResponse/ReviewManagerComment/ReviewManagerComment.tsx | Switches to getScoreResponseOptions for response option generation. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/ReviewResponse/ReviewAppeal/ReviewAppeal.tsx | Switches to getScoreResponseOptions for response option generation. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackReply/AiFeedbackReply.tsx | Adds submitLabel to customize the submit button text. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx | Adds approval-phase privileged editing/saving of AI feedback question score and comment. |
| src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.module.scss | Adds styling for the AI feedback score editing UI. |
| src/apps/review/src/lib/components/ManagerComment/ManagerComment.tsx | Switches to getScoreResponseOptions for response option generation. |
| src/apps/review/src/lib/components/ChallengeDetailsContent/TabContentAiApproval.tsx | Removes inline workflow score editing from AI Approval tab; adds “View scorecard” navigation. |
| src/apps/review/src/lib/components/AppealComment/AppealComment.tsx | Switches to getScoreResponseOptions for response option generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
2
to
7
| /** | ||
| * Approval tab content for AI Only challenges. | ||
| * Renders submissions in a table format consistent with other tabs. | ||
| * Allows admins/copilots/PMs/TMs to edit decision scores via the AiReviewsTable. | ||
| */ | ||
| import { |
Comment on lines
+86
to
+91
| <select | ||
| className={styles.scoreEditSelect} | ||
| value={editedScore} | ||
| onChange={handleScoreChange} | ||
| disabled={isUpdatingScore} | ||
| > |
Comment on lines
+84
to
+88
| .scoreEditTextarea { | ||
| width: 100%; | ||
| min-height: 112px; | ||
| margin-top: $sp-2; | ||
| padding: $sp-3; |
| )} | ||
| </strong> | ||
|
|
||
| {hasQuestionScoreEditAccess && !isEditingScore && ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/
What's in this PR?
This pull request primarily refactors the AI Approval tab in the review app to remove the ability for admins and managers to directly edit and save workflow scores from the AI reviews table. Instead, users are now directed to view the full scorecard for a submission to inspect workflow scores. Additionally, the logic for generating response options for scorecard questions is consolidated into a utility function, reducing duplication across components.
Refactor and Removal of Inline Editing in AI Approval Tab:
TabContentAiApprovalcomponent. Users can no longer edit or save scores directly from the AI reviews table. Instead, a "View scorecard" button is provided to navigate to the detailed scorecard view.Consolidation of Score Response Option Logic:
AppealCommentandManagerCommentcomponents with a single utility functiongetScoreResponseOptions, simplifying code and ensuring consistency.These changes streamline the review workflow, reduce code duplication, and guide users to the appropriate place for managing workflow scores.