The submission approval panel at components/bounty/submission-approval-panel.tsx lets a creator approve a contributor's work and award reputation points, but there's no path to send the submission back for changes. Reviewers currently have to either approve or do nothing.
We need a Request Revisions action that records the reviewer's feedback against the submission, moves the bounty back to a revision state, and surfaces the feedback to the contributor.
What to do
Add a useRequestRevisions mutation in hooks/use-bounty-application.ts following the same shape as useApproveApplicationSubmission. It should accept bountyId, submissionId, and feedback, optimistically set the bounty status to UNDER_REVIEW, and roll back on error.
In components/bounty/submission-approval-panel.tsx:
- Re-enable the Request Revisions button so the existing textarea reveals
- Wire the textarea submission through the new mutation
- Show a success toast and reset the panel on success
In components/bounty/application-submit-work-panel.tsx, surface the latest revision feedback so the contributor sees what needs changing before resubmitting.
Acceptance criteria
- Reviewer can click Request Revisions, type feedback, and submit without leaving the page
- Bounty status reflects the revision state after submission
- Feedback shows up on the contributor side in
application-submit-work-panel.tsx
- Optimistic update and rollback follow the same pattern as the approve mutation
Files
hooks/use-bounty-application.ts
components/bounty/submission-approval-panel.tsx
components/bounty/application-submit-work-panel.tsx
The submission approval panel at
components/bounty/submission-approval-panel.tsxlets a creator approve a contributor's work and award reputation points, but there's no path to send the submission back for changes. Reviewers currently have to either approve or do nothing.We need a Request Revisions action that records the reviewer's feedback against the submission, moves the bounty back to a revision state, and surfaces the feedback to the contributor.
What to do
Add a
useRequestRevisionsmutation inhooks/use-bounty-application.tsfollowing the same shape asuseApproveApplicationSubmission. It should acceptbountyId,submissionId, andfeedback, optimistically set the bounty status toUNDER_REVIEW, and roll back on error.In
components/bounty/submission-approval-panel.tsx:In
components/bounty/application-submit-work-panel.tsx, surface the latest revision feedback so the contributor sees what needs changing before resubmitting.Acceptance criteria
application-submit-work-panel.tsxFiles
hooks/use-bounty-application.tscomponents/bounty/submission-approval-panel.tsxcomponents/bounty/application-submit-work-panel.tsx