Skip to content

Conversation

@marcoacierno
Copy link
Member

This PR implements co-speakers support for conference submissions as described in #4521.

Changes

  • Add CoSpeaker model to track co-speakers for each submission
  • Update GraphQL mutations to accept co-speaker emails
  • Automatically create User accounts for new co-speaker emails
  • Send email notifications to new co-speakers
  • Add validation for maximum 2 co-speakers
  • Add email template identifier with placeholders
  • Register CoSpeaker in Django admin

Implementation Details

  • Only emails newly added co-speakers (not existing ones on update)
  • Email template includes variable to distinguish new vs existing users
  • Users created without passwords can set password via password reset

Closes #4521

🤖 Generated with Claude Code

This commit implements co-speakers support for conference submissions:

- Add CoSpeaker model to track co-speakers for each submission
- Update GraphQL mutations (sendSubmission and updateSubmission) to accept co-speaker emails
- Automatically create User accounts (without passwords) for new co-speaker emails
- Send email notifications to new co-speakers when added to a submission
- Add validation to limit co-speakers to maximum of 2 per submission
- Add co_speaker_invitation email template identifier with placeholders
- Register CoSpeaker model in Django admin as inline
- Only send emails to newly added co-speakers (not existing ones on update)

The email template includes a placeholder to distinguish whether the user
already had an account or was newly created.

Closes #4521

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Marco Acierno <[email protected]>
@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
pycon Ready Ready Preview Jan 6, 2026 1:53am

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 48.27586% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.16%. Comparing base (4cb76dd) to head (f6985d5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4522      +/-   ##
==========================================
- Coverage   94.42%   94.16%   -0.27%     
==========================================
  Files         352      352              
  Lines       10141    10193      +52     
  Branches      732      741       +9     
==========================================
+ Hits         9576     9598      +22     
- Misses        468      494      +26     
- Partials       97      101       +4     
🚀 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.

verbose_name_plural = _("Submissions Confirm Pending Status")


class CoSpeaker(TimeStampedModel):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude rename this model "SubmissionCoSpeaker"

Copy link
Contributor

@claude claude bot Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @marcoacierno's task in 2m 29s —— View job


Renaming CoSpeaker to SubmissionCoSpeaker ✓

Tasks

  • Read current model and understand all usages
  • Update model class name in models.py
  • Update references in mutations.py
  • Update admin.py registration
  • Update migration file
  • Commit and push changes

Changes Made

Successfully renamed the CoSpeaker model to SubmissionCoSpeaker across the codebase:

Files updated:

  • backend/submissions/models.py - Renamed model class definition
  • backend/api/submissions/mutations.py - Updated import and all references
  • backend/submissions/admin.py - Updated import and inline admin model reference
  • backend/submissions/migrations/0031_cospeaker.py - Updated model name in migration

All references to the CoSpeaker model have been updated to use the new SubmissionCoSpeaker name. The migration file content has been updated to create the table with the correct name.

Note: The migration filename itself (0031_cospeaker.py) remains unchanged since renaming it would require approval, but the model name within the migration has been correctly updated to SubmissionCoSpeaker.

- Update model class name in models.py
- Update all references in mutations.py
- Update admin.py imports and inline admin
- Update migration file to use new model name

Co-authored-by: Marco Acierno <[email protected]>
Comment on lines 221 to 223
if "@" not in email or "." not in email:
errors.add_error("co_speaker_emails", f"Invalid email format: {email}")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude use Django's validate_email to validate the emails

Copy link
Contributor

@claude claude bot Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @marcoacierno's task in 1m 33s —— View job


Using Django's validate_email for email validation

Tasks

  • Read mutations.py to understand current email validation
  • Replace current validation with Django's validate_email
  • Run linting checks (skipped - no permissions)
  • Commit and push changes

Changes Made

Replaced the basic email validation (checking for @ and .) with Django's validate_email validator for more robust email validation at backend/api/submissions/mutations.py:223-226.

Updated:

  • Added imports for ValidationError and validate_email from Django core
  • Replaced the basic email format check with a try-except block using validate_email()

This provides proper email validation following Django's standards, which includes checking for valid email format, domain structure, and other email-specific rules.

--- | Branch

)

def validate(self, conference: Conference):
def validate(self, conference: Conference, current_user=None):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude current_user is never None

Copy link
Contributor

@claude claude bot Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude encountered an error —— View job


I'll analyze this and get back to you.

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.

Co-speakers support

2 participants