fix(mentor-dashboard): show booked learner on session cards - #1941
fix(mentor-dashboard): show booked learner on session cards#1941nyxsky404 wants to merge 3 commits into
Conversation
Include student_id and the related profile in the upcoming sessions query so cards no longer hardcode the same Learner placeholder. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@nyxsky404 is attempting to deploy a commit to the durdana3105's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe mentor dashboard now includes booked learner profile data in session queries. A shared typed converter maps each row to a session card and supplies fallbacks for missing learner or session fields. Tests validate distinct learner profiles and fallback behavior. ChangesMentor session mapping
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Update profile-photo assertions for Supabase storage paths and the 2MB limit, and document /api/upload plus /api/users/upload-photo so docs completeness checks pass. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@nyxsky404 The CI failures on this PR are fixed. Cause: backend tests still expected the old local Fix: aligned The required @durdana3105 Ready for review and merge when you are. |
nyxsky404
left a comment
There was a problem hiding this comment.
Looks good: upcoming mentor sessions now load the booked learner profile instead of a hardcoded placeholder, with a clean fallback and unit coverage.
CI test is green after the upload test/docs alignment commit. LGTM on the feature change — needs a maintainer approval/merge (@durdana3105).
|
Hi @durdana3105 — gentle nudge. This PR is ready for review from my side. I've rebased/kept it current where possible. If CI is red due to unrelated upstream/main issues or deploy previews, the code change itself should still be reviewable. Please review and merge when you can — and add Thank you! |
Summary
Mentor Dashboard was selecting sessions without the learner relation, then forcing every card to
peerName: "Learner"/ placeholder avatar.Now the upcoming-sessions query pulls
student_id+student:profiles!student_id(id, name, avatar_url)and maps those into the SessionCard model. Missing profiles still fall back to the old placeholder.Testing
npx vitest run src/pages/mentorSessionCard.test.tsnpx eslint src/pages/MentorDashboard.tsx src/pages/mentorSessionCard.ts src/pages/mentorSessionCard.test.tsFixes #1898
Made with Cursor
Summary by CodeRabbit