Skip to content

PM-6648: Link manual review scorecard in challenge Review Style - #2547

Merged
jmgasper merged 1 commit into
devfrom
PM-6648
Oct 22, 2026
Merged

jmgasper merged 1 commit into
devfrom
PM-6648

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-6648

What's in this PR?

What was broken

The opportunities challenge sidebar listed the manual review in Review Style only as Manual. Members could not open the scorecard the manual review uses. The design asks for • Manual: Scorecard Link ⓘ.

Root cause

The sidebar only knew the AI review config mode. It never read the challenge review definition (challenge.reviewers), which holds the member reviewer's scorecardId. The opportunities models did not type those reviewer fields or the phase type id (phase.phaseId) the reviewers point to.

What was changed

  • utils/challenge-detail.utils.ts: new challengeManualReviewScorecardId and challengeManualReviewScorecardUrl.
    • They pick the member (isMemberReview, non-AI) reviewer on the Review phase, falling back to Iterative Review. Screening, approval and AI workflow reviewers are ignored.
    • They build the public Review App scorecard URL (REVIEW_APP_URL/scorecard/<id>). Admin tooling and the work app already link to this URL.
  • components/ChallengeSidebar.tsx: ReviewStyleSection receives that URL. The Manual bullet now reads Manual: Scorecard Link (opens in a new tab) with the existing tooltip. The link is only added when no AI review config exists; AI Gating and AI only are unchanged.
  • models/opportunity.models.ts: typed ChallengeReviewer.isMemberReview/phaseId/scorecardId and ChallengePhase.phaseId.

The matching legacy community-app change is topcoder-platform/community-app#7292.

Added/updated tests

  • challenge-detail.utils.spec.ts: Review phase selection, Iterative Review fallback, id encoding, ignoring AI and screening reviewers.
  • ChallengeSidebar.spec.tsx: the Manual scorecard link, and no link for AI review modes.

Validation

  • CI=true yarn -s craco test --watchAll=false src/apps/opportunities: 65 suites and 821 tests passed
  • yarn lint: pass
  • npx tsc --noEmit -p tsconfig.json: pass
  • yarn run build: pass
  • Rendered the real ChallengeSidebar from a dev challenge payload (60f35fb5-…). It shows Manual: Scorecard Link → https://review.topcoder-dev.com/scorecard/hFU73Ve2XlYCK-, matching the design. That page and GET /v6/scorecards/:id are both public.

🤖 Generated with Claude Code

What was broken
The opportunities challenge sidebar listed the manual review in Review
Style only as "Manual". Members could not open the scorecard the manual
review uses. The design asks for "Manual: Scorecard Link".

Root cause
The sidebar only knew the AI review config mode. It never read the
challenge review definition (challenge.reviewers), which holds the
member reviewer's scorecardId. The opportunities models did not type
those reviewer fields or the phase type id the reviewers point to.

What was changed
- Added challengeManualReviewScorecardId and
  challengeManualReviewScorecardUrl to challenge-detail.utils. They pick
  the member (non-AI) reviewer on the Review phase, falling back to
  Iterative Review, and build the public Review App scorecard URL
  (REVIEW_APP_URL/scorecard/<id>).
- ChallengeSidebar passes that URL to ReviewStyleSection. The Manual
  bullet now reads "Manual: Scorecard Link" with the existing tooltip.
  The link is only added when no AI review config exists.
- Typed ChallengeReviewer isMemberReview/phaseId/scorecardId and
  ChallengePhase phaseId.

Added/updated tests
- challenge-detail.utils.spec.ts covers Review phase selection, the
  Iterative Review fallback, id encoding, and ignoring AI and screening
  reviewers.
- ChallengeSidebar.spec.tsx covers the Manual scorecard link and checks
  that AI review modes do not get the link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmgasper
jmgasper requested a review from kkartunov as a code owner October 22, 2026 01:14
@jmgasper
jmgasper merged commit 6e4d4ae into dev Oct 22, 2026
8 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.

1 participant