Skip to content

PM-5203 approval phase ai only - #1910

Merged
vas3a merged 6 commits into
devfrom
PM-5203_approval-phase-ai-only
Jun 8, 2026
Merged

PM-5203 approval phase ai only#1910
vas3a merged 6 commits into
devfrom
PM-5203_approval-phase-ai-only

Conversation

@vas3a

@vas3a vas3a commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Removed all state and logic related to inline editing, saving, and confirming workflow scores in the TabContentAiApproval component. 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.
  • Updated UI text to reflect the new workflow ("Click View scorecard to inspect workflow scores.") and removed the edit/save/cancel buttons and confirmation modal.

Consolidation of Score Response Option Logic:

  • Replaced duplicated logic for generating score response options in both AppealComment and ManagerComment components with a single utility function getScoreResponseOptions, 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.

@vas3a
vas3a requested review from jmgasper and kkartunov as code owners June 8, 2026 12:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 getScoreResponseOptions utility 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 && (
@vas3a
vas3a merged commit 0979ddd into dev Jun 8, 2026
9 checks passed
@vas3a
vas3a deleted the PM-5203_approval-phase-ai-only branch June 8, 2026 19:50
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.

2 participants