authorgravatar for k@kainoa.meKainoa Newton <k@kainoa.me> 2026-03-08 16:27:39-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-03-08 16:27:39-07:00
log40a7f4b4b1780c24db24a201f5b0860ce9763028
treed714c0089879ebbcabbb4a9af5d151cd16a7bf6d
parentcba0f23a9e003a522c0f92f5391f15f0879a98f2
signature Signed by PGP key B5690EEEBB952194

Rename Open PR action label to View PR (#467)

- Update GitActionsControl quick/menu action text for existing pull requests - Align unavailable-state copy and tests with the new label

3 files changed, 14 insertions(+), 14 deletions(-)

apps/web/src/components/GitActionsControl.logic.test.ts+4-4
......@@ -42,7 +42,7 @@ describe("when: branch is clean and has an open PR", () => {
4242 }),
4343 false,
4444 );
45 assert.deepInclude(quick, { kind: "open_pr", label: "Open PR", disabled: false });
45 assert.deepInclude(quick, { kind: "open_pr", label: "View PR", disabled: false });
4646 });
4747
4848 it("buildMenuItems disables commit/push and enables open PR", () => {
......@@ -78,7 +78,7 @@ describe("when: branch is clean and has an open PR", () => {
7878 },
7979 {
8080 id: "pr",
81 label: "Open PR",
81 label: "View PR",
8282 disabled: false,
8383 icon: "pr",
8484 kind: "open_pr",
......@@ -199,7 +199,7 @@ describe("when: branch is clean, ahead, and has an open PR", () => {
199199 },
200200 {
201201 id: "pr",
202 label: "Open PR",
202 label: "View PR",
203203 disabled: false,
204204 icon: "pr",
205205 kind: "open_pr",
......@@ -547,7 +547,7 @@ describe("when: branch has no upstream configured", () => {
547547 );
548548 assert.deepInclude(quick, {
549549 kind: "open_pr",
550 label: "Open PR",
550 label: "View PR",
551551 disabled: false,
552552 });
553553 });
apps/web/src/components/GitActionsControl.logic.ts+3-3
......@@ -151,7 +151,7 @@ export function buildMenuItems(
151151 hasOpenPr
152152 ? {
153153 id: "pr",
154 label: "Open PR",
154 label: "View PR",
155155 disabled: !canOpenPr,
156156 icon: "pr",
157157 kind: "open_pr",
......@@ -216,7 +216,7 @@ export function resolveQuickAction(
216216 if (!gitStatus.hasUpstream) {
217217 if (!isAhead) {
218218 if (hasOpenPr) {
219 return { label: "Open PR", disabled: false, kind: "open_pr" };
219 return { label: "View PR", disabled: false, kind: "open_pr" };
220220 }
221221 return {
222222 label: "Push",
......@@ -266,7 +266,7 @@ export function resolveQuickAction(
266266 }
267267
268268 if (hasOpenPr && gitStatus.hasUpstream) {
269 return { label: "Open PR", disabled: false, kind: "open_pr" };
269 return { label: "View PR", disabled: false, kind: "open_pr" };
270270 }
271271
272272 return {
apps/web/src/components/GitActionsControl.tsx+7-7
......@@ -98,7 +98,7 @@ function getMenuActionDisabledReason(
9898 }
9999
100100 if (hasOpenPr) {
101 return "Open PR is currently unavailable.";
101 return "View PR is currently unavailable.";
102102 }
103103 if (!hasBranch) {
104104 return "Detached HEAD: checkout a branch before creating a PR.";
......@@ -374,12 +374,12 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
374374 },
375375 }
376376 : shouldOfferOpenPrCta
377 ? {
378 actionProps: {
379 children: "Open PR",
380 onClick: () => {
381 const api = readNativeApi();
382 if (!api) return;
377 ? {
378 actionProps: {
379 children: "View PR",
380 onClick: () => {
381 const api = readNativeApi();
382 if (!api) return;
383383 closeResultToast();
384384 void api.shell.openExternal(prUrl);
385385 },