Skip to content

chore: rsvpFormFields BE shape migration shim (legacy-first order)#166

Merged
sharmeebuilds merged 1 commit into
devfrom
chore/rsvp-form-fields-be-shape-migration-new
May 28, 2026
Merged

chore: rsvpFormFields BE shape migration shim (legacy-first order)#166
sharmeebuilds merged 1 commit into
devfrom
chore/rsvp-form-fields-be-shape-migration-new

Conversation

@sharmeebuilds
Copy link
Copy Markdown
Collaborator

Re-applies transitional dual-shape support for rsvpFormFields with save order corrected: legacy {required, visible} shape is sent first; the new {fields} shape is the fallback retry on rejection. Previous version was reverted because it sent new shape first, which fails against the current BE before ESP PR #903 ships.

Save side (useEventFormSave.ts):

  • Primary call converts rsvpFormFields to legacy shape before sending.
  • Retry with new {fields} shape only if BE rejects with a rsvpFormFields-flavored 400 (post-#903 environments).

Read side (eventFormMappers.ts):

  • readRsvpFormFields() adapts either GET shape to the array the form expects, so events stored under the legacy shape open correctly on edit.

All temporary code tagged rsvp-shape-migration for clean grep-and-delete once ESP PR #903 ships everywhere.

Re-applies transitional dual-shape support for rsvpFormFields with save
order corrected: legacy {required, visible} shape is sent first; the new
{fields} shape is the fallback retry on rejection. Previous version was
reverted because it sent new shape first, which fails against the current
BE before ESP PR #903 ships.

Save side (useEventFormSave.ts):
- Primary call converts rsvpFormFields to legacy shape before sending.
- Retry with new {fields} shape only if BE rejects with a
  rsvpFormFields-flavored 400 (post-#903 environments).

Read side (eventFormMappers.ts):
- readRsvpFormFields() adapts either GET shape to the array the form
  expects, so events stored under the legacy shape open correctly on edit.

All temporary code tagged `rsvp-shape-migration` for clean grep-and-delete
once ESP PR #903 ships everywhere.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sharmeebuilds sharmeebuilds merged commit 5d16e60 into dev May 28, 2026
3 checks passed
@sharmeebuilds
Copy link
Copy Markdown
Collaborator Author

Revert this PR once BE fixes RSVP and migrates changes. This is only for an interim purpose and should not be retained for long.

@qiyundai qiyundai mentioned this pull request May 29, 2026
5 tasks
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