Skip to content

PM-5954 - show actions in review tab for copilots & reviewers - #2178

Merged
vas3a merged 2 commits into
devfrom
PM-5954_actions-for-copilots
Aug 21, 2026
Merged

PM-5954 - show actions in review tab for copilots & reviewers#2178
vas3a merged 2 commits into
devfrom
PM-5954_actions-for-copilots

Conversation

@vas3a

@vas3a vas3a commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

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 isAiFailedReviewSubmission logic in the shared reviewPhaseGuards utility, 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

  • Moved the isAiFailedReviewSubmission function to reviewPhaseGuards.ts and 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

  • Updated the Review Table logic to always display AI-failed submissions, even if they don't pass the regular review phase guard, ensuring they remain actionable for reviewers and copilots.
  • Replaced direct status checks for 'AI_FAILED_REVIEW' with the new utility function for consistency and clarity in multiple locations. [1] [2]

Testing Improvements

  • Added comprehensive unit tests for isAiFailedReviewSubmission, including case-insensitivity and scenarios where the submission is undefined or has other statuses. [1] [2]

Minor UI Logic Fix

  • Removed an unnecessary conditional around action button rendering in the review table, ensuring all relevant actions are available.

@vas3a
vas3a requested a lite review from Copilot and removed request for jmgasper and kkartunov August 21, 2026 12:06

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 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 isAiFailedReviewSubmission to reviewPhaseGuards.ts and replaced local/inline status checks with the shared helper.
  • Updated TableReview filtering 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.

Comment thread src/apps/review/src/lib/utils/reviewPhaseGuards.spec.ts
Comment thread src/apps/review/src/lib/components/TableReview/TableReview.tsx Outdated
@vas3a
vas3a merged commit 3298753 into dev Aug 21, 2026
3 of 4 checks passed
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