diff --git a/apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/instructions.tsx b/apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/instructions.tsx index 63a5f82bd8..0f5d345b8c 100644 --- a/apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/instructions.tsx +++ b/apps/mobile/src/app/(app)/(tabs)/(3_profile)/code-reviewer/[scope]/[platform]/(edit)/instructions.tsx @@ -26,6 +26,10 @@ function InstructionsEditor({ return ( + + Custom Instructions is planned for deprecation. Move these guidelines into a REVIEW.md file + in your repository instead. + 0 ? data.focusAreas.map(capitalize).join(', ') : 'All areas', }, - { - field: 'instructions', - icon: ScrollText, - title: 'Custom Instructions', - subtitle: data.customInstructions ? 'Set' : 'None', - }, + // Custom Instructions is deprecated in favour of REVIEW.md, so the row is + // only offered to configs that already have something stored in it. + ...(data.customInstructions?.trim() + ? [ + { + field: 'instructions', + icon: ScrollText, + title: 'Custom Instructions', + subtitle: 'Set', + }, + ] + : []), { field: 'model', icon: FileSliders, diff --git a/apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx b/apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx index 2d867822be..e26a3368cc 100644 --- a/apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx +++ b/apps/web/src/components/code-reviews/BitbucketReviewConfigForm.tsx @@ -1,6 +1,7 @@ 'use client'; import { useEffect, useMemo, useState } from 'react'; +import Link from 'next/link'; import { formatDistanceToNow } from 'date-fns'; import { AlertCircle, Play, RefreshCw, Save, Settings2, ShieldCheck } from 'lucide-react'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; @@ -84,9 +85,16 @@ export function BitbucketReviewConfigForm({ organizationId }: BitbucketReviewCon const [mutationError, setMutationError] = useState(null); const [manualReviewUrl, setManualReviewUrl] = useState(''); const [manualReviewError, setManualReviewError] = useState(null); + // Custom instructions is deprecated in favour of REVIEW.md. The field is only + // surfaced to configs that already have something stored in it, and stays + // visible for the rest of the session even if the user clears it. + const [showCustomInstructions, setShowCustomInstructions] = useState(false); useEffect(() => { if (!configQuery.data) return; + if (configQuery.data.customInstructions?.trim()) { + setShowCustomInstructions(true); + } const nextConfig: BitbucketReviewConfig = { reviewStyle: configQuery.data.reviewStyle, focusAreas: configQuery.data.focusAreas, @@ -530,19 +538,34 @@ export function BitbucketReviewConfigForm({ organizationId }: BitbucketReviewCon -
- -