Implement Phase 3 participant self-management features:
Story 6.3 - Reminder Preferences:
- Add ReminderPreferenceForm to participant forms
- Add update_preferences route for preference updates
- Update dashboard template with reminder preference toggle
- Participants can enable/disable reminder emails at any time
Story 6.2 - Withdrawal from Exchange:
- Add can_withdraw utility function for state validation
- Create WithdrawalService to handle withdrawal process
- Add WithdrawForm with explicit confirmation requirement
- Add withdraw route with GET (confirmation) and POST (process)
- Add withdrawal confirmation email template
- Update dashboard to show withdraw link when allowed
- Withdrawal only allowed before registration closes
- Session cleared after withdrawal, user redirected to registration
All acceptance criteria met for both stories.
Test coverage: 90.02% (156 tests passing)
Linting and type checking: passed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Logger.info wasn't visible in gunicorn container logs. Using print
with flush=True ensures magic link URLs are visible in container
logs for QA testing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The budget field is stored as a string (e.g., '$25-50'), not a number.
Updated EmailService.send_registration_confirmation() to accept budget
as a string and display it directly in the email.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixed return type annotations in EmailService to use Any instead of dict[str, Any] to properly handle Resend API's SendResponse type.
The Resend library returns a SendResponse object in production mode and a dict in dev mode. Using Any allows both return types while maintaining type safety for callers.
Changes:
- Updated send_email() return type from dict[str, Any] to Any
- Updated send_magic_link() return type from dict[str, Any] to Any
- Updated send_registration_confirmation() return type from dict[str, Any] to Any
- Removed unnecessary type annotation on result variable
This resolves mypy type checking errors while preserving the existing dev/production mode behavior.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a flexible email service that integrates with Resend API
and supports development mode for easier testing.
Features:
- Resend API integration for production email delivery
- Development mode that logs emails instead of sending
- Magic link URL logging in dev mode for testing
- Helper methods for magic link and registration emails
- Comprehensive test coverage (100% for service)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>