feat: implement Phase 3 participant self-management (stories 4.5, 6.1)

Implemented features:
- Story 4.5: View Participant List - participants can see other active participants
- Story 6.1: Update Profile - participants can edit name and gift ideas before matching
- Utility functions for state management and business logic
- Comprehensive unit and integration tests

New files:
- src/utils/participant.py - Business logic utilities
- src/templates/participant/profile_edit.html - Profile edit form
- tests/unit/test_participant_utils.py - Unit tests for utilities
- tests/integration/test_participant_list.py - Integration tests for participant list
- tests/integration/test_profile_update.py - Integration tests for profile updates

Modified files:
- src/routes/participant.py - Added dashboard participant list and profile edit route
- src/templates/participant/dashboard.html - Added participant list section and edit link
- src/forms/participant.py - Added ProfileUpdateForm
- src/app.py - Added participant.profile_edit to setup check exemptions
- tests/conftest.py - Added exchange_factory, participant_factory, auth_participant fixtures

All tests passing. Phase 3.3 (reminder preferences) and 3.4 (withdrawal) remain to be implemented.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-22 21:01:45 -07:00
co-authored by Claude Opus 4.5
parent 75378ac769
commit a7902aa623
10 changed files with 709 additions and 1 deletions
+22
View File
@@ -48,3 +48,25 @@ class MagicLinkRequestForm(FlaskForm):
Length(max=255, message="Email must be less than 255 characters"),
],
)
class ProfileUpdateForm(FlaskForm):
"""Form for updating participant profile."""
name = StringField(
"Name",
validators=[
DataRequired(message="Name is required"),
Length(min=1, max=255, message="Name must be 1-255 characters"),
],
description="Your display name (visible to other participants)",
)
gift_ideas = TextAreaField(
"Gift Ideas",
validators=[
Length(max=10000, message="Gift ideas must be less than 10,000 characters")
],
description="Optional wishlist or gift preferences for your Secret Santa",
render_kw={"rows": 6, "maxlength": 10000},
)