Skip to content

Conversation

AaronDDM
Copy link
Collaborator

@AaronDDM AaronDDM commented Sep 25, 2025

What did you do?

  • make Participant.email optional to match API behaviour

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.34%. Comparing base (9b8d8b8) to head (3890bb1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #671   +/-   ##
=======================================
  Coverage   93.34%   93.34%           
=======================================
  Files          37       37           
  Lines         812      812           
  Branches       72       72           
=======================================
  Hits          758      758           
  Misses         47       47           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

playerzero-ai bot commented Sep 25, 2025

Pull Request Summary

Summary of change

  • Participant.email was changed from required (email: string) to optional (email?: string) in src/models/events.ts.
  • Intent: allow participants to exist without an email (e.g., phone-only participants, unnamed identifiers, or participants represented only by phone number/ID).

Product / UX impacts

  • Participant creation: forms and APIs can create participants without an email — more flexible for phone-only or anonymous participants.
  • Displays & flows: any UI that assumed an email exists (participant list, contact cards, tooltips) must guard against missing email and present alternate info (phone, name, placeholder).
  • Email-dependent features: invites, RSVP links, email notifications, and any email-based actions will not work for email-less participants and need alternative handling or explicit validation before performing those actions.
  • User expectations: users may see participants with "No email" or just phone numbers; invitation/communication buttons should be disabled or prompt for an email.

Technical / developer impacts

  • TypeScript: consumers must handle Participant.email possibly being undefined — update code paths, add null checks, and adjust serializers/deserializers.
  • API contract: this relaxes the client model but may require server-side validation changes or runtime checks if server still requires emails for certain operations.
  • Downstream systems: deduplication, contact matching, exporting, authentication/account-linking, analytics and integrations that relied on email must be reviewed and adapted (or validated) to handle missing emails.
  • Tests & docs: update unit/integration tests, API docs and examples to reflect optional email behavior.
  • Migration/data: existing data unaffected, but imports/exports and backends should be validated for participants without emails.

Recommended follow-ups

  • Audit code where Participant.email was used without guards and add checks or fallbacks.
  • Update UI to clearly show when email is absent and disable/alter email-based actions.
  • Ensure server/API endpoints validate required contact info for operations that need an email (or provide alternatives like SMS).
  • Add tests covering participants without email for CRUD, invites, and notification flows.
  • Update documentation and API schema to explicitly state email is optional and describe consequences.

Files Changed

File Name Summary
src/models/events.ts - Change: Participant.email is now optional (email?: string) instead of required.
- Purpose: allow participants without emails (phone-only or identifier-only).
- UX/Product: UI must not assume email exists; guard displays and email-based actions; provide alternate RSVP/invite flows.
- Technical: update TypeScript usages, serializers, validations, API checks, tests and docs; handle undefined email across downstream systems.

View more in PlayerZero
updated: Sep 25 @ 08:41 PM UTC

@AaronDDM AaronDDM merged commit e4ed8bd into main Sep 26, 2025
7 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.

3 participants