From 2c00848869496669c07cf7876a9ec6c1db37b45a Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 08:37:35 +0000 Subject: [PATCH] fix: hide "send back to review" button for non-approved posts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frontend visibility condition only checked `isUpcoming`, so the button showed on DRAFT/PENDING/REJECTED posts whose underlying question had a future open_time — but the backend `send_back_to_review` action requires `curation_status == APPROVED` and 400s otherwise. Add an `isApproved` guard so the button visibility matches the backend precondition. Fixes #3029 Co-authored-by: aseckin <3686968+aseckin@users.noreply.github.com> --- front_end/src/components/post_actions/post_dropdown_menu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front_end/src/components/post_actions/post_dropdown_menu.tsx b/front_end/src/components/post_actions/post_dropdown_menu.tsx index bb8e1e74a5..1fdec4cf75 100644 --- a/front_end/src/components/post_actions/post_dropdown_menu.tsx +++ b/front_end/src/components/post_actions/post_dropdown_menu.tsx @@ -217,8 +217,8 @@ export const PostDropdownMenu: FC = ({ post, button, hideShare }) => { ] : []), - // Include if upcoming and user is admin or curator - ...(isUpcoming && (isAdmin || isCurator) + // Include if post is approved & upcoming and user is admin or curator + ...(isApproved && isUpcoming && (isAdmin || isCurator) ? [ { id: "sendBackToReview",