PM-5954 - show actions in review tab for copilots & reviewers - #2178
Merged
Conversation
vas3a
requested
a lite review from Copilot
and removed request for
jmgasper and
kkartunov
August 21, 2026 12:06
There was a problem hiding this comment.
Pull request overview
This PR centralizes detection of AI-failed review submissions into the shared reviewPhaseGuards utilities and updates Review-tab filtering/logic so AI-failed submissions remain actionable for reviewers/copilots. It also updates related call sites and adds unit tests for the new shared helper.
Changes:
- Added
isAiFailedReviewSubmissiontoreviewPhaseGuards.tsand replaced local/inline status checks with the shared helper. - Updated
TableReviewfiltering to include AI-failed submissions even when they don’t pass the regular review-phase guard. - Added unit tests covering AI-failed detection, including casing and undefined submissions.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/apps/review/src/lib/utils/reviewPhaseGuards.ts | Adds shared isAiFailedReviewSubmission helper to centralize AI-failed detection. |
| src/apps/review/src/lib/utils/reviewPhaseGuards.spec.ts | Adds unit tests for isAiFailedReviewSubmission. |
| src/apps/review/src/lib/components/TableReview/TableReview.tsx | Uses shared helper and adjusts Review table filtering/action logic for AI-failed submissions. |
| src/apps/review/src/lib/components/ChallengeDetailsContent/TabContentReview.tsx | Removes local AI-failed helper in favor of shared utility import. |
| src/apps/review/src/lib/components/ChallengeDetailsContent/iterativeReviewFiltering.ts | Removes local AI-failed helper in favor of shared utility import. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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/PM-5954
What's in this PR?
This pull request refactors how the application detects and handles AI-failed review submissions to improve code reuse and maintainability. The main change is centralizing the
isAiFailedReviewSubmissionlogic in the sharedreviewPhaseGuardsutility, replacing local implementations and ensuring consistent behavior across the codebase. Additional updates include improved test coverage and minor logic adjustments for clarity.Refactoring and Code Reuse
isAiFailedReviewSubmissionfunction toreviewPhaseGuards.tsand updated all usages across components to import and use this shared utility, removing local duplicates. [1] [2] [3] [4] [5] [6]Logic and Behavior Updates
'AI_FAILED_REVIEW'with the new utility function for consistency and clarity in multiple locations. [1] [2]Testing Improvements
isAiFailedReviewSubmission, including case-insensitivity and scenarios where the submission is undefined or has other statuses. [1] [2]Minor UI Logic Fix