Conversation
What was broken Completed challenge phases in the work app schedule editor still exposed editable end date and duration controls, unlike legacy work-manager. Root cause Challenge phase normalization dropped `actualEndDate`, so the form lost the completion signal used by the legacy `canChangeDuration` rule and the schedule rows never disabled completed phases. What was changed Preserved phase completion timestamps when hydrating challenge editor form data. Applied the legacy completed-phase editability rule to schedule row end date and duration controls while keeping the existing start-date rules intact. Updated the challenge editor README to note the restored legacy behavior. Any added/updated tests Added a challenge-editor utils test that keeps `actualEndDate` in form state. Added a schedule section test that verifies completed phases lock end date and duration controls.
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
Completed challenge phases in the work app schedule editor still exposed editable end date and duration controls, unlike legacy work-manager.
Root cause
Challenge phase normalization dropped
actualEndDate, so the form lost the completion signal used by the legacycanChangeDurationrule and the schedule rows never disabled completed phases.What was changed
Preserved phase completion timestamps when hydrating challenge editor form data.
Applied the legacy completed-phase editability rule to schedule row end date and duration controls while keeping the existing start-date rules intact.
Updated the challenge editor README to note the restored legacy behavior.
Any added/updated tests
Added a challenge-editor utils test that keeps
actualEndDatein form state.Added a schedule section test that verifies completed phases lock end date and duration controls.
Validated with
yarn test:no-watch --runInBand src/apps/work/src/lib/utils/challenge-editor.utils.spec.ts src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ChallengeScheduleSection/ChallengeScheduleSection.component.spec.tsx,yarn lint, andyarn run build.Full
yarn test:no-watch --runInBandstill reports six unrelated failures insrc/apps/wallet-admin/src/home/tabs/payments/PaymentsListView.spec.tsx.