From 7cbca9bca1805165920349b2f736e5a6da01a3bd Mon Sep 17 00:00:00 2001 From: Kainoa Newton Date: Sat, 7 Mar 2026 16:44:27 -0800 Subject: [PATCH] Rename Open PR action label to View PR - Update GitActionsControl quick/menu action text for existing pull requests - Align unavailable-state copy and tests with the new label --- .../src/components/GitActionsControl.logic.test.ts | 8 ++++---- apps/web/src/components/GitActionsControl.logic.ts | 6 +++--- apps/web/src/components/GitActionsControl.tsx | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/web/src/components/GitActionsControl.logic.test.ts b/apps/web/src/components/GitActionsControl.logic.test.ts index 628f2f359e..108cbe798f 100644 --- a/apps/web/src/components/GitActionsControl.logic.test.ts +++ b/apps/web/src/components/GitActionsControl.logic.test.ts @@ -42,7 +42,7 @@ describe("when: branch is clean and has an open PR", () => { }), false, ); - assert.deepInclude(quick, { kind: "open_pr", label: "Open PR", disabled: false }); + assert.deepInclude(quick, { kind: "open_pr", label: "View PR", disabled: false }); }); it("buildMenuItems disables commit/push and enables open PR", () => { @@ -78,7 +78,7 @@ describe("when: branch is clean and has an open PR", () => { }, { id: "pr", - label: "Open PR", + label: "View PR", disabled: false, icon: "pr", kind: "open_pr", @@ -199,7 +199,7 @@ describe("when: branch is clean, ahead, and has an open PR", () => { }, { id: "pr", - label: "Open PR", + label: "View PR", disabled: false, icon: "pr", kind: "open_pr", @@ -547,7 +547,7 @@ describe("when: branch has no upstream configured", () => { ); assert.deepInclude(quick, { kind: "open_pr", - label: "Open PR", + label: "View PR", disabled: false, }); }); diff --git a/apps/web/src/components/GitActionsControl.logic.ts b/apps/web/src/components/GitActionsControl.logic.ts index 9a9476e4ce..4ad5e79406 100644 --- a/apps/web/src/components/GitActionsControl.logic.ts +++ b/apps/web/src/components/GitActionsControl.logic.ts @@ -151,7 +151,7 @@ export function buildMenuItems( hasOpenPr ? { id: "pr", - label: "Open PR", + label: "View PR", disabled: !canOpenPr, icon: "pr", kind: "open_pr", @@ -216,7 +216,7 @@ export function resolveQuickAction( if (!gitStatus.hasUpstream) { if (!isAhead) { if (hasOpenPr) { - return { label: "Open PR", disabled: false, kind: "open_pr" }; + return { label: "View PR", disabled: false, kind: "open_pr" }; } return { label: "Push", @@ -266,7 +266,7 @@ export function resolveQuickAction( } if (hasOpenPr && gitStatus.hasUpstream) { - return { label: "Open PR", disabled: false, kind: "open_pr" }; + return { label: "View PR", disabled: false, kind: "open_pr" }; } return { diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx index 3662d1b79c..4f183e3935 100644 --- a/apps/web/src/components/GitActionsControl.tsx +++ b/apps/web/src/components/GitActionsControl.tsx @@ -98,7 +98,7 @@ function getMenuActionDisabledReason( } if (hasOpenPr) { - return "Open PR is currently unavailable."; + return "View PR is currently unavailable."; } if (!hasBranch) { return "Detached HEAD: checkout a branch before creating a PR."; @@ -374,12 +374,12 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions }, } : shouldOfferOpenPrCta - ? { - actionProps: { - children: "Open PR", - onClick: () => { - const api = readNativeApi(); - if (!api) return; + ? { + actionProps: { + children: "View PR", + onClick: () => { + const api = readNativeApi(); + if (!api) return; closeResultToast(); void api.shell.openExternal(prUrl); },