Skip to content

PM-5755: Show the simplified Design review section for every role - #2154

Open
jmgasper wants to merge 1 commit into
devfrom
PM-5755-1
Open

PM-5755: Show the simplified Design review section for every role#2154
jmgasper wants to merge 1 commit into
devfrom
PM-5755-1

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

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:

shouldUseSimplifiedDesignReview = isCopilot && !isAdmin && !isManager
    && isDesignTrackSelected && isChallengeTypeSelected

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 the administrator role, 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

  • The simplified Screener-only Review section now renders for every user editing a Design Challenge, matching Daniela's clarification on the ticket: "for the entire Review section we need: Screener + dropdown: Select user".
  • Administrators do not lose the detailed configuration. ReviewersField accepts a new canConfigureFullReview prop (set from workAppContext.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.
  • 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.
  • Everything else from the first fix is preserved: selecting the screener still assigns the same member to both Checkpoint Screener and Screener, hidden phase/scorecard/reviewer defaults are untouched, and replacement, clearing, legacy handle-only resources, fetch failures, and in-flight locking behave as before.
  • Challenge Editor README.md was updated to describe the new behavior.

Any added/updated tests

  • ChallengeEditorForm.spec.tsx: the admin case now asserts the simplified section plus canConfigureFullReview, 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.
  • The pre-existing requires manual reviewer configuration when AI Review mode is AI GATING assertion was already failing on dev (the inline paragraph is replaced by the registered form error as soon as the effect runs); it now asserts the registered reviewers form 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 untouched origin/dev and are unrelated to PM-5755; this branch has one fewer failing suite than dev because ReviewersField.spec.tsx is now green.

🤖 Generated with Claude Code

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>
@jmgasper
jmgasper requested a review from kkartunov as a code owner August 14, 2026 06:34
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