Skip to content

PM-4618: preserve attachments after challenge save#1587

Merged
jmgasper merged 2 commits intodevfrom
PM-4618
Apr 2, 2026
Merged

PM-4618: preserve attachments after challenge save#1587
jmgasper merged 2 commits intodevfrom
PM-4618

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 1, 2026

What was broken
Uploaded challenge attachments disappeared from the challenge editor after saving a draft.

Root cause (if identifiable)
The editor reset form state from the patch response, and when that response omitted attachments it overwrote the locally managed attachment list.

What was changed
Preserved the current attachment list when the saved challenge payload does not include attachments, while still preferring persisted attachment data when the API returns it.

Any added/updated tests
Added a ChallengeEditorForm regression test that covers saving after an attachment upload when the update response omits attachments.


Open with Devin

What was broken:
Uploaded challenge attachments disappeared from the editor after saving a draft.

Root cause:
The challenge editor reset its form state from the patch response, and when that response omitted attachments the locally managed attachment list was overwritten.

What was changed:
Preserved the current attachment list when the saved challenge payload does not include attachments, while still using persisted attachment data when it is returned.

Any added/updated tests:
Added a ChallengeEditorForm regression test covering the save flow when the update response omits attachments.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 1, 2026 16:53
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 3 additional findings.

Open in Devin Review

@jmgasper jmgasper merged commit e3f07c4 into dev Apr 2, 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