diff --git a/app/projects/[id]/editor/page.tsx b/app/projects/[id]/editor/page.tsx index 186e3773..b64739a7 100644 --- a/app/projects/[id]/editor/page.tsx +++ b/app/projects/[id]/editor/page.tsx @@ -927,15 +927,26 @@ export default function EditorPage() { )} - {/* Suggestions link */} - {isSuggestionMode && ( - - - - )} + {/* Suggestions / PRs link — unified, mode-aware */} + + + {/* Review Suggestions link (editors/admins only) */} {canEdit && pendingSuggestionCount > 0 && ( @@ -1022,19 +1033,6 @@ export default function EditorPage() { )} - {/* PR Link */} - - - - )} {/* PR List */} - + {/* Create Modal */} {session?.accessToken && ( diff --git a/components/pr/PRActions.tsx b/components/pr/PRActions.tsx index e36afe09..d2f6ba01 100644 --- a/components/pr/PRActions.tsx +++ b/components/pr/PRActions.tsx @@ -22,12 +22,14 @@ import { } from "lucide-react"; import Link from "next/link"; import { branchesApi } from "@/lib/api/revisions"; +import type { EditorMode } from "@/lib/stores/editorModeStore"; interface PRActionsProps { projectId: string; pr: PullRequest; accessToken: string; userRole?: string; + mode?: EditorMode; onUpdate: (pr: PullRequest) => void; className?: string; } @@ -37,9 +39,11 @@ export function PRActions({ pr, accessToken, userRole, + mode = "developer", onUpdate, className, }: PRActionsProps) { + const isSuggestionMode = mode === "standard"; const [isSubmitting, setIsSubmitting] = useState(false); const [error, setError] = useState(null); const [showReviewForm, setShowReviewForm] = useState(false); @@ -341,7 +345,7 @@ export function PRActions({ Review - {/* Merge button */} + {/* Merge / Accept button */} {canMerge && ( )} - {/* Close button */} + {/* Close / Reject button */} )} @@ -382,9 +386,11 @@ export function PRActions({ open={showMergeDialog} onOpenChange={setShowMergeDialog} onConfirm={handleMerge} - title="Merge Pull Request" - description={`Are you sure you want to merge "${pr.title}" into ${pr.target_branch}?`} - confirmLabel="Merge" + title={isSuggestionMode ? "Accept Suggestion" : "Merge Pull Request"} + description={isSuggestionMode + ? `Are you sure you want to accept "${pr.title}" into ${pr.target_branch}?` + : `Are you sure you want to merge "${pr.title}" into ${pr.target_branch}?`} + confirmLabel={isSuggestionMode ? "Accept" : "Merge"} variant="default" >