Problem
Right now mentor verification happens as a side effect of a GitHub review, detected by the webhook. There's no in-app flow for a mentor to explicitly verify a PR without going to GitHub.
What to build
On the maintainer PR queue and on the contributor's 'My Work' section, L2+ users should see a 'Verify' button on PRs that are linked and unverified. Clicking it:
- Calls a server action that sets
mentor_verified = true and mentor_reviewer_id = user.id on the PR
- Awards XP to the mentor (same as a GitHub review would)
- Creates an
xp_events entry for audit trail
- Shows feedback to the mentor confirming the action
Access control
- Only users with level >= 2 can call the verify action
- A mentor can't verify their own PR
- Can't verify an already-verified PR
Where
- New server action in
src/app/actions/maintainer.ts or a new src/app/actions/mentor.ts
- UI in
src/app/(app)/issues/my-work-section.tsx and src/app/(maintainer)/maintainer/pr-queue/page.tsx
Notes
- This is a meaningful feature - keep the XP award logic consistent with what the webhook does
- Check
src/inngest/functions/process-review-event.ts to see the current flow
Problem
Right now mentor verification happens as a side effect of a GitHub review, detected by the webhook. There's no in-app flow for a mentor to explicitly verify a PR without going to GitHub.
What to build
On the maintainer PR queue and on the contributor's 'My Work' section, L2+ users should see a 'Verify' button on PRs that are linked and unverified. Clicking it:
mentor_verified = trueandmentor_reviewer_id = user.idon the PRxp_eventsentry for audit trailAccess control
Where
src/app/actions/maintainer.tsor a newsrc/app/actions/mentor.tssrc/app/(app)/issues/my-work-section.tsxandsrc/app/(maintainer)/maintainer/pr-queue/page.tsxNotes
src/inngest/functions/process-review-event.tsto see the current flow