From 77f7d7eac034e3d00176cc816f349be9094956e7 Mon Sep 17 00:00:00 2001 From: Jefferson Date: Fri, 29 May 2026 15:38:17 -0600 Subject: [PATCH 1/2] feat(revisions): add Request Revisions action to submission approval panel --- .../bounty-detail/bounty-detail-client.tsx | 21 +- .../bounty/application-submit-work-panel.tsx | 24 +- .../bounty/submission-approval-panel.tsx | 120 +++++-- e2e/request-revisions.spec.ts | 319 ++++++++++++++++++ hooks/use-bounty-application.ts | 68 +++- 5 files changed, 530 insertions(+), 22 deletions(-) create mode 100644 e2e/request-revisions.spec.ts diff --git a/components/bounty-detail/bounty-detail-client.tsx b/components/bounty-detail/bounty-detail-client.tsx index 6d6ed5c7..83ee359f 100644 --- a/components/bounty-detail/bounty-detail-client.tsx +++ b/components/bounty-detail/bounty-detail-client.tsx @@ -243,10 +243,28 @@ export function BountyDetailClient({ bountyId }: { bountyId: string }) { {bounty.type === "MILESTONE_BASED" && isAssignedApplicant && walletAddress && - bounty.status === "IN_PROGRESS" && ( + (() => { + const mySubmission = bounty.submissions?.find( + (s) => s.submittedBy === session?.user?.id, + ); + const hasRevision = + mySubmission?.status === "REVISION_REQUESTED" && + !!mySubmission?.reviewComments; + return ( + bounty.status === "IN_PROGRESS" || + (bounty.status === "UNDER_REVIEW" && hasRevision) + ); + })() && ( + s.submittedBy === session?.user?.id && + s.status === "REVISION_REQUESTED", + )?.reviewComments ?? undefined + } /> )} @@ -256,6 +274,7 @@ export function BountyDetailClient({ bountyId }: { bountyId: string }) { + {revisionFeedback && ( +
+
+ +
+

+ Revision Requested +

+

+ {revisionFeedback} +

+
+
+
+ )}
- {/* Revision Section - Coming Soon */} + {/* Revision Section */}
-
- -

- Needs Changes? -

-

- Request revisions before releasing the escrow. -

- -
+ {!showRevisionForm ? ( +
+ +

+ Needs Changes? +

+

+ Request revisions before releasing the escrow. +

+ +
+ ) : ( +
+
+ +

+ Describe what needs to change before you can approve. +

+