Skip to content

Implement the Request Revisions flow on the submission approval panel #202

Description

@Benjtalkshow

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions