Conversation
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.
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
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 lintpassed.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.tspassed.yarn run buildpassed with existing warnings.yarn test:no-watchwas 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.