Skip to content

PM-4840: preserve hydrated assignments after refresh#1745

Merged
jmgasper merged 2 commits intodevfrom
PM-4840-2
Apr 20, 2026
Merged

PM-4840: preserve hydrated assignments after refresh#1745
jmgasper merged 2 commits intodevfrom
PM-4840-2

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 19, 2026

What was broken
Saved design challenges could still lose the visible copilot and assigned reviewers after a full refresh or when reopening edit mode, and the review configuration could surface validation noise even though the persisted assignments and scorecards already existed.

Root cause (if identifiable)
The earlier refresh fix still stopped the initial persisted-resource hydration path as soon as mount-time form normalization marked the editor dirty. In the remaining legacy payload path, a saved copilot handle could also be replaced by a member-id-only resource match.

What was changed
Allowed the first persisted-resource hydration pass to continue during the initial normalization window while keeping the existing dirty-form guards for later user edits. Also preserved an already hydrated copilot handle when the refreshed resources only provide a legacy member-id match, and documented the behavior in the challenge editor README.

Any added/updated tests
Added ChallengeEditorForm coverage for rehydrating persisted copilot and reviewer assignments when a compatibility field dirties the form during initial hydration.

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/

What's in this PR?


Open in Devin Review

What was broken
Saved design challenges could still lose the visible copilot and assigned reviewers after a full refresh or when reopening edit mode, and the review configuration could surface validation noise even though the persisted assignments and scorecards already existed.

Root cause (if identifiable)
The earlier refresh fix still stopped the initial persisted-resource hydration path as soon as mount-time form normalization marked the editor dirty. In the remaining legacy payload path, a saved copilot handle could also be replaced by a member-id-only resource match.

What was changed
Allowed the first persisted-resource hydration pass to continue during the initial normalization window while keeping the existing dirty-form guards for later user edits. Also preserved an already hydrated copilot handle when the refreshed resources only provide a legacy member-id match, and documented the behavior in the challenge editor README.

Any added/updated tests
Added ChallengeEditorForm coverage for rehydrating persisted copilot and reviewer assignments when a compatibility field dirties the form during initial hydration.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 19, 2026 22:26
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@jmgasper jmgasper merged commit 06d7d5d into dev Apr 20, 2026
9 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