Skip to content

PM-5506: Link missing member terms in work save errors#2009

Open
jmgasper wants to merge 1 commit into
devfrom
PM-5506
Open

PM-5506: Link missing member terms in work save errors#2009
jmgasper wants to merge 1 commit into
devfrom
PM-5506

Conversation

@jmgasper

@jmgasper jmgasper commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

What was broken
PMs and copilots could see that an assigned member had not agreed to required terms, but the work app only rendered the API error text and did not provide a direct terms URL to send to the member.

Root cause
The challenge editor normalized save failures to a plain string and rendered that string directly, even when the selected challenge terms and terms catalog were available in the editor.

What was changed
The challenge editor now detects the missing-terms save error, matches the referenced terms against the currently selected challenge terms, and renders each matched term title as a link to the public Topcoder terms detail page. Manual form submit failures now rely on the visible save error state instead of surfacing an unhandled rejected promise after the UI has handled the failure.

Any added/updated tests
Added a ChallengeEditorForm regression test that verifies a missing-terms save error renders the selected term as a terms detail link.

Validation notes:

  • yarn lint passed.
  • yarn run build passed with existing warnings.
  • Targeted regression test passed: yarn test:no-watch --runTestsByPath src/apps/work/src/pages/challenges/ChallengeEditorPage/components/ChallengeEditorForm.spec.tsx -t "renders selected terms as links".
  • Full yarn test:no-watch was run and failed in unrelated existing suites, including engagement-editor.schema.spec.ts, PaymentFormModal.spec.tsx, and existing ChallengeEditorForm launch approval-status expectations.

What was broken
PMs and copilots could see that an assigned member had not agreed to required terms, but the work app only rendered the API error text and did not provide a direct terms URL to send to the member.

Root cause
The challenge editor normalized save failures to a plain string and rendered that string directly, even when the selected challenge terms and terms catalog were available in the editor.

What was changed
The challenge editor now detects the missing-terms save error, matches the referenced terms against the currently selected challenge terms, and renders each matched term title as a link to the public Topcoder terms detail page. Manual form submit failures now rely on the visible save error state instead of surfacing an unhandled rejected promise after the UI has handled the failure.

Any added/updated tests
Added a ChallengeEditorForm regression test that verifies a missing-terms save error renders the selected term as a terms detail link.
@jmgasper jmgasper requested a review from kkartunov as a code owner July 2, 2026 01:09
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