Skip to content

feat(dsoc): complete proposal portal end-to-end#42

Merged
junaiddshaukat merged 1 commit into
mainfrom
dsoc-proposal-portal
May 28, 2026
Merged

feat(dsoc): complete proposal portal end-to-end#42
junaiddshaukat merged 1 commit into
mainfrom
dsoc-proposal-portal

Conversation

@ZeeshanAdilButt

Copy link
Copy Markdown
Collaborator

Summary

Closes the loop on the DSOC proposal flow. Before this PR, the apply form posted fields that mongoose silently dropped, the mentor dashboard linked to a 404, and mentees never saw any feedback after their application was reviewed.

  • Mentor review page at /dsoc/applications/[id] — full proposal, applicant context, status update, score, notes, accept/reject actions. The mentor dashboard already links here.
  • Schema completenessDSOCApplication now persists motivation, technicalSkills, githubProfile, timeline, challenges, timezone, startDate. These were posted by the apply form but dropped by mongoose strict mode.
  • POST sanitisation — empty optional strings (notably startDate) are dropped before save so the Date cast doesn't throw.
  • Mentee feedback loop — mentee dashboard surfaces mentorNotes, score, and review date inline once a proposal has been reviewed.
  • Security fixGET /api/dsoc/applications?my=true with no mentee session was returning every application in the database. Now requires auth.

Roles after this change

  • Students submit a proposal via /dsoc/apply/[id], see status + feedback on /dsoc/mentee/dashboard.
  • Mentors review proposals for their assigned projects on /dsoc/mentor/dashboard and open the full proposal at /dsoc/applications/[id] to set status, score, and notes.
  • Admins can review any application at the same URL (existing admin-token auth path).

Test plan

  • Mentor logs in, opens dashboard, clicks Review on a pending application, sets status + score + notes, saves
  • Same proposal now shows the new status + mentor feedback on the mentee dashboard
  • Apply form submits with optional fields blank (startDate, etc.) without server error
  • Calling /api/dsoc/applications?my=true without a mentee cookie returns 401, not data
  • Mentor B (not assigned to the project) cannot open another mentor's application — still 403

🤖 Generated with Claude Code

Closes the loop on the DSOC proposal flow so students can submit,
track status, and read mentor feedback, and mentors get a real
review screen instead of a 404.

- Add /dsoc/applications/[id] mentor + admin review page with full
  proposal, applicant context, status update, score, and notes
- Persist motivation, technicalSkills, githubProfile, timeline,
  challenges, timezone, startDate on DSOCApplication so the apply
  form fields stop getting silently dropped by mongoose strict mode
- Strip empty-string optional fields on POST so Date casts don't blow
  up when the mentee skips the optional start date
- Mentee dashboard now surfaces mentor feedback, score, and review
  date on each application card once it's been reviewed
- Fix unauthenticated `?my=true` returning every application in the
  database; require a valid mentee session
@junaiddshaukat junaiddshaukat merged commit d55d946 into main May 28, 2026
2 checks passed
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.

2 participants