Conversation
What was broken The work app engagement editor still required every private engagement member slot to have an assigned handle. After all assignments were completed and no active assignments remained, saving a private engagement as closed failed in the UI before the API request was sent. Root cause The previous backend fix allowed private engagements without active assignments, but the platform-ui Yup schema still enforced assignedMemberHandles for each required private member slot and the private assignment input was still marked required. What was changed Relaxed private assignment validation so blank member slots are allowed while preserving assignment-detail validation for any selected member handle. Removed the required marker from optional private assignment inputs. Any added/updated tests Updated engagement editor schema tests for private engagements with no assignees and with fewer assigned members than requiredMemberCount. Added form coverage that saves a private engagement with only terminal assignments without sending assignedMemberHandles or assignmentDetails. Updated the private section test mock to match the current assignment helper imports.
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 engagement editor still required every private engagement member slot to have an assigned handle. After all assignments were completed and no active assignments remained, saving a private engagement as closed failed in the UI before the API request was sent.
Root cause
The earlier API fix allowed private engagements without active assignments, but platform-ui still enforced assignedMemberHandles for each required private member slot and displayed the assignment inputs as required.
What was changed
Relaxed private assignment validation so empty member slots are allowed. Assignment details are still required when a member handle is actually selected. Removed the required marker from optional private assignment inputs.
Any added/updated tests
Updated engagement editor schema tests for private engagements without assignees and with fewer assigned members than requiredMemberCount. Added form coverage for saving a private engagement with only terminal assignments without sending assignedMemberHandles or assignmentDetails. Updated the private section test mock to match the current assignment helper imports.
Validation note: yarn lint passed; focused engagement editor tests passed; yarn run build passed with existing warnings. The full yarn test:no-watch command still fails in unrelated wallet, payment, reviewer, and challenge editor suites; the PM-5504 engagement editor tests pass.