Skip to content

PM-4528: preserve draft challenge billing markup#1589

Merged
jmgasper merged 1 commit intodevfrom
PM-4528
Apr 1, 2026
Merged

PM-4528: preserve draft challenge billing markup#1589
jmgasper merged 1 commit intodevfrom
PM-4528

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 1, 2026

What was broken
Draft challenge pages could keep showing a /usr/bin/bash challenge fee even when the project billing account had markup configured.

Root cause
When fetched draft data reset the challenge editor form, it reused the raw challenge billing payload and overwrote the already-hydrated project billing markup. Because the project billing data had usually loaded first, the later billing merge effect did not run again to repair that reset.

What was changed
The challenge editor now applies project billing defaults during the draft reset path as well, using the latest resolved project billing account so stale draft markup does not replace the correct value.

Any added/updated tests
Added a ChallengeEditorForm regression test that simulates project billing loading before the draft response and verifies the hydrated markup survives the form reset.


Open with Devin

What was broken
Draft challenge pages could keep showing a /usr/bin/bash challenge fee even when the project billing account had markup configured.

Root cause
When fetched draft data reset the challenge editor form, it reused the raw challenge billing payload and overwrote the already-hydrated project billing markup. Because the project billing data had usually loaded first, the later billing merge effect did not run again to repair that reset.

What was changed
The challenge editor now applies project billing defaults during the draft reset path as well, using the latest resolved project billing account so stale draft markup does not replace the correct value.

Any added/updated tests
Added a ChallengeEditorForm regression test that simulates project billing loading before the draft response and verifies the hydrated markup survives the form reset.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 1, 2026 17:20
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 ce794e2 into dev Apr 1, 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