From b0f7331e2379dd084d65e8dfe60f6d8a30d33abd Mon Sep 17 00:00:00 2001 From: flamboh Date: Mon, 12 Oct 2026 01:47:58 +0000 Subject: [PATCH 1/2] fix(mobile): Forgejo change requests ask for the summary they require --- .../pull-requests/PullRequestReviewSheet.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx b/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx index 25d6788a5f7b..f0eb6edd3172 100644 --- a/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx +++ b/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx @@ -1,5 +1,6 @@ import { useAtomRefresh } from "@effect/atom-react"; import { StackActions, useNavigation, type StaticScreenProps } from "@react-navigation/native"; +import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients"; import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime"; import type { PullRequestReviewVerdict } from "@t3tools/contracts"; import { useCallback, useRef, useState } from "react"; @@ -84,12 +85,21 @@ export function PullRequestReviewSheet({ const verdict = offered.find((option) => option.value === requestedVerdict) ?? offered[0]; const reviewing = params.mode === "review"; const canSubmitComments = !store.draft.comments.length || permissions.canInlineComment; + // Forgejo requires a summary when requesting changes, even with inline comments. + const summaryRequired = + verdict !== undefined && result.data + ? sourceControlClients.get(result.data.provider).reviewSummaryRequired(verdict.value) + : false; const canSubmit = store.ready && (!reviewing || (!stale && canSubmitComments)) && (reviewing ? verdict !== undefined && - (verdict.value === "approve" || body.trim().length > 0 || store.draft.comments.length > 0) + (summaryRequired + ? body.trim().length > 0 + : verdict.value === "approve" || + body.trim().length > 0 || + store.draft.comments.length > 0) : permissions.canComment && body.trim().length > 0); const perform = () => submission.submit(async () => { @@ -160,7 +170,13 @@ export function PullRequestReviewSheet({ Date: Mon, 12 Oct 2026 02:20:17 +0000 Subject: [PATCH 2/2] fix(mobile): shorten the Forgejo summary placeholder so iOS shows all of it --- .../src/features/pull-requests/PullRequestReviewSheet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx b/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx index f0eb6edd3172..d9171135a724 100644 --- a/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx +++ b/apps/mobile/src/features/pull-requests/PullRequestReviewSheet.tsx @@ -173,7 +173,7 @@ export function PullRequestReviewSheet({ placeholder={ reviewing ? summaryRequired - ? "Summarize your review (required to request changes)" + ? "Summary required to request changes…" : "Summarize your review…" : "Write a comment…" }