feat(profile): add My Workshops page for booked schedule items#4660
Conversation
Users could book workshops but had no profile view of their bookings. Expose bookedScheduleItems on User and add a profile section listing title, time, room, and a link to each event (scheduled items only).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Adds a "My Workshops" profile page that lists a user's booked schedule items, with a new Critical: Unsafe destructuring crashes on load In const {
data: {
me: { bookedScheduleItems },
},
} = useMyProfileWithBookedWorkshopsQuery({ ... })
const { data } = useMyProfileWithBookedWorkshopsQuery({ ... })
const bookedScheduleItems = data?.me?.bookedScheduleItems ?? []Error handling in The catch block in Reusing
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4660 +/- ##
=======================================
Coverage 92.52% 92.52%
=======================================
Files 359 359
Lines 10791 10797 +6
Branches 821 821
=======================================
+ Hits 9984 9990 +6
Misses 696 696
Partials 111 111 🚀 New features to boost your workflow:
|
|
@claude do the code review again |
|
Claude finished @estyxx's task in 1m 24s —— View job Code Review Complete
SummaryThis PR adds a "My Workshops" profile page that lists a user's booked schedule items. The implementation includes a new What looks goodBackend (well-implemented):
Frontend:
Issues to address1. Reusing proposals date format key (Minor)
<FormattedMessage
id="profile.myProposals.date" // Should use a workshop-specific key
values={{...}}
/>While this works since both use the same format, if proposal and workshop date formats ever need to diverge, this implicit coupling will be hard to find. Consider adding Patterns matching existing code (informational)These patterns match how other profile pages work but are worth noting: Direct destructuring without loading stateThe component destructures const {
data: {
me: { bookedScheduleItems },
},
} = useMyProfileWithBookedWorkshopsQuery({...})This works because Catch-all redirect to loginThe OverallThe implementation is solid and follows established patterns in the codebase. The backend work is particularly well done with good query optimization and comprehensive tests. The minor i18n key reuse is the only actionable item. |
|
@claude do the final code review |
|
Claude finished @estyxx's task in 1m 13s —— View job Final Code Review
SummaryThis PR adds a "My Workshops" profile page showing booked schedule items. The implementation is well done and follows established patterns in the codebase. Backend ✅
Frontend ✅The implementation closely follows existing patterns from
i18n ✅All translations present for both English and Italian:
One Minor Improvement (Optional)
<FormattedMessage
id="profile.myProposals.date" // Could be "profile.myWorkshops.date"
values={{...}}
/>This works since both use the same format VerdictApproved ✅ - Clean implementation that follows codebase conventions. Backend has proper filtering and good test coverage. Ready to merge. |
Summary
bookedScheduleItems(conference)on the GraphQLUsertype so logged-in attendees can list workshops they booked (only items with a schedule slot, sostart/endresolve safely)./profile/my-workshopspage showing title, date/time, room, and a link to each event.Test plan
docker exec pycon-backend-1 uv run pytest api/users/tests/test_booked_schedule_items.py