Skip to content

PM-5121: Cap manual reviewer count#1881

Merged
jmgasper merged 1 commit into
devfrom
PM-5121
May 26, 2026
Merged

PM-5121: Cap manual reviewer count#1881
jmgasper merged 1 commit into
devfrom
PM-5121

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

What was broken

The Work app could become unresponsive after closing the public review opportunity and adjusting the reviewer count, because that count directly controlled how many member assignment selectors were rendered.

Root cause (if identifiable)

Manual reviewer count input only stripped non-digits and had no upper bound. Large values could flow into the form state and force the human review tab to render an unbounded number of controlled autocomplete fields.

What was changed

Added a shared maximum manual reviewer count, clamped the Work human-review count input and rendered assignment slots to that limit, added min/max support to the shared text field, and applied the same limit in reviewer validation, reviewer cost, summary, and launch validation paths.

Any added/updated tests

Added HumanReviewTab coverage for capped closed-opportunity assignment fields and schema coverage for rejecting counts above the manual reviewer limit.

Validation:

  • yarn lint passed.
  • yarn test:no-watch --runTestsByPath src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ReviewersField/HumanReviewTab.spec.tsx src/apps/work/src/lib/schemas/challenge-editor.schema.spec.ts passed.
  • yarn run build passed with existing warnings.
  • yarn test:no-watch was run and fails in unrelated existing suites, including wallet-admin module alias resolution failures for ~/config, ~/libs/core, and ~/apps/work/src/lib/services/challenges.service, plus existing engagement/payment assignment utility mock failures.

What was broken
The Work app could become unresponsive after closing the public review opportunity and adjusting the reviewer count, because that count directly controlled how many member assignment selectors were rendered.

Root cause (if identifiable)
Manual reviewer count input only stripped non-digits and had no upper bound. Large values could flow into the form state and force the human review tab to render an unbounded number of controlled autocomplete fields.

What was changed
Added a shared maximum manual reviewer count, clamped the Work human-review count input and rendered assignment slots to that limit, added min/max support to the shared text field, and applied the same limit in reviewer validation, reviewer cost, summary, and launch validation paths.

Any added/updated tests
Added HumanReviewTab coverage for capped closed-opportunity assignment fields and schema coverage for rejecting counts above the manual reviewer limit.
@jmgasper jmgasper marked this pull request as ready for review May 26, 2026 03:02
@jmgasper jmgasper requested a review from kkartunov as a code owner May 26, 2026 03:02
@jmgasper jmgasper merged commit 0743984 into dev May 26, 2026
7 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