Skip to content

PM-5043: Restore locked challenge fee fallback#1872

Open
jmgasper wants to merge 1 commit into
devfrom
PM-5043-2
Open

PM-5043: Restore locked challenge fee fallback#1872
jmgasper wants to merge 1 commit into
devfrom
PM-5043-2

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

What was broken
Locked challenge rows in the billing account details modal could show a blank Challenge Fee value when challenge markup hydration did not resolve, even though the row still had the billing-account markup needed to calculate the fee.

Root cause
The prior PM-5043 modal fix moved challenge rows to challenge-specific markup, but canonical challenge rows returned undefined while hydration was missing or failed. Locked rows store member-payment subtotals directly, so the fee calculation had no fallback markup and rendered "-".

What was changed
The modal now falls back to billing-account markup when challenge-specific markup is unavailable, while preserving hydrated challenge markup values including zero. This keeps locked challenge fees populated without changing consumed-row subtotal handling.

Any added/updated tests
Added BillingAccountLineItemsModal regression coverage for a locked challenge row whose challenge markup cannot be loaded, asserting the member payments remain unchanged and the Challenge Fee is still calculated.

Validation

  • yarn test:no-watch --runTestsByPath src/apps/work/src/lib/components/BillingAccountLineItemsModal/BillingAccountLineItemsModal.spec.tsx passed.
  • yarn lint passed.
  • yarn run build passed with existing warnings.
  • yarn test:no-watch was run and failed in unrelated wallet-admin, PaymentFormModal, PaymentView, and ChallengeEditorForm suites on current dev.

What was broken
Locked challenge rows in the billing account details modal could show a blank Challenge Fee value when challenge markup hydration did not resolve, even though the row still had the billing-account markup needed to calculate the fee.

Root cause
The prior PM-5043 modal fix moved challenge rows to challenge-specific markup, but canonical challenge rows returned undefined while hydration was missing or failed. Locked rows store member-payment subtotals directly, so the fee calculation had no fallback markup and rendered "-".

What was changed
The modal now falls back to billing-account markup when challenge-specific markup is unavailable, while preserving hydrated challenge markup values including zero. This keeps locked challenge fees populated without changing consumed-row subtotal handling.

Any added/updated tests
Added BillingAccountLineItemsModal regression coverage for a locked challenge row whose challenge markup cannot be loaded, asserting the member payments remain unchanged and the Challenge Fee is still calculated.
@jmgasper jmgasper requested a review from kkartunov as a code owner May 22, 2026 01:19
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