Conversation
What was broken
QA re-tested the Design challenge Review section and still saw every reviewer
role (Checkpoint Review, Review, Approval, Checkpoint Screening, Screening)
instead of the single Screener selector requested on the ticket.
Root cause
The first fix gated the simplified Review section on the copilot-only billing
role check (isCopilot && !isAdmin && !isManager). QA and most Topcoder staff
accounts carry the administrator role, so the gate never evaluated to true for
them and the full tabbed configuration kept rendering. The Design track and
Challenge type parts of the gate were correct; only the role restriction was
wrong.
What was changed
The simplified Screener-only Review section now renders for every user editing
a Design Challenge, matching the ticket ("for the entire Review section we need
Screener + dropdown: Select user"). Administrators no longer lose the detailed
configuration: ReviewersField receives a canConfigureFullReview flag and, when
set, renders a "Show advanced review configuration" toggle that expands the
existing Human Review / AI Review / Review Context tabs on demand and collapses
back to the Screener selector. Copilots and managers only see the Screener
selector. The AI-gating "Manual review configuration is required" validation
stays suppressed while the simplified view is showing and re-applies as soon as
an administrator expands the advanced configuration. Challenge Editor
documentation was updated to describe the new behavior.
Any added/updated tests
ChallengeEditorForm.spec now asserts that administrators and managers also get
the simplified Design Challenge review section and that only administrators
receive the advanced-configuration capability. ReviewersField.spec adds cases
for the collapsed-by-default admin view, expanding and collapsing the advanced
configuration, the absence of the toggle for non-admins and non-Design
sections, and the suppressed AI-gating error in the simplified view. The
pre-existing AI-gating assertion in ReviewersField.spec was failing on dev
because the inline message is replaced by the registered form error once the
effect runs; it now asserts the registered reviewers form error instead, so the
suite is green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
What was broken
QA re-tested the Design challenge Review section after the first PM-5755 fix (PR #2134) and reported: "The change doesn't seem to be reflected. I am still able to see all roles in the review section." The Review section still rendered the full Human Review / AI Review / Review Context tabs with every reviewer row (Checkpoint Review, Review, Approval, Checkpoint Screening, Screening) instead of the single Screener selector requested on the ticket.
Root cause
The first fix gated the simplified Review section on the copilot-only billing role check:
The QA account used for the recorded run (
mess, user id 305384, the creator of every Design 2-round test challenge in project 100440) holds theadministratorrole, so the role part of the gate never evaluated to true and the full configuration kept rendering. The Design track and Challenge type parts of the gate were correct — those test challenges are Design / Challenge — only the role restriction was wrong.What was changed
Challenge, matching Daniela's clarification on the ticket: "for the entire Review section we need: Screener + dropdown: Select user".ReviewersFieldaccepts a newcanConfigureFullReviewprop (set fromworkAppContext.isAdmin) and renders a Show advanced review configuration toggle that expands the existing tabbed interface on demand and collapses back to the Screener selector. Copilots and managers only ever see the Screener selector.Manual review configuration is required.validation stays suppressed while the simplified view is showing and re-applies as soon as an administrator expands the advanced configuration.Checkpoint ScreenerandScreener, hidden phase/scorecard/reviewer defaults are untouched, and replacement, clearing, legacy handle-only resources, fetch failures, and in-flight locking behave as before.README.mdwas updated to describe the new behavior.Any added/updated tests
ChallengeEditorForm.spec.tsx: the admin case now asserts the simplified section pluscanConfigureFullReview, and a new manager case asserts the simplified section without the advanced capability.ReviewersField.spec.tsx: new cases for the collapsed-by-default administrator view, expanding and collapsing the advanced configuration, the absence of the toggle for non-admins and outside the simplified section, and the suppressed AI-gating error in the simplified view.requires manual reviewer configuration when AI Review mode is AI GATINGassertion was already failing ondev(the inline paragraph is replaced by the registered form error as soon as the effect runs); it now asserts the registeredreviewersform error, so the suite is green.Validation
yarn lint— passed.yarn build— passed.yarn test:no-watch— 223 of 241 suites passed. The 18 remaining failing suites reproduce unchanged on untouchedorigin/devand are unrelated to PM-5755; this branch has one fewer failing suite thandevbecauseReviewersField.spec.tsxis now green.🤖 Generated with Claude Code