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", () => {...@@ -42,7 +42,7 @@ describe("when: branch is clean and has an open PR", () => {
42 }),42 }),
43 false,43 false,
44 );44 );
45 assert.deepInclude(quick, { kind: "open_pr", label: "Open PR", disabled: false });45 assert.deepInclude(quick, { kind: "open_pr", label: "View PR", disabled: false });
46 });46 });
4747
48 it("buildMenuItems disables commit/push and enables open PR", () => {48 it("buildMenuItems disables commit/push and enables open PR", () => {
...@@ -78,7 +78,7 @@ describe("when: branch is clean and has an open PR", () => {...@@ -78,7 +78,7 @@ describe("when: branch is clean and has an open PR", () => {
78 },78 },
79 {79 {
80 id: "pr",80 id: "pr",
81 label: "Open PR",81 label: "View PR",
82 disabled: false,82 disabled: false,
83 icon: "pr",83 icon: "pr",
84 kind: "open_pr",84 kind: "open_pr",
...@@ -199,7 +199,7 @@ describe("when: branch is clean, ahead, and has an open PR", () => {...@@ -199,7 +199,7 @@ describe("when: branch is clean, ahead, and has an open PR", () => {
199 },199 },
200 {200 {
201 id: "pr",201 id: "pr",
202 label: "Open PR",202 label: "View PR",
203 disabled: false,203 disabled: false,
204 icon: "pr",204 icon: "pr",
205 kind: "open_pr",205 kind: "open_pr",
...@@ -547,7 +547,7 @@ describe("when: branch has no upstream configured", () => {...@@ -547,7 +547,7 @@ describe("when: branch has no upstream configured", () => {
547 );547 );
548 assert.deepInclude(quick, {548 assert.deepInclude(quick, {
549 kind: "open_pr",549 kind: "open_pr",
550 label: "Open PR",550 label: "View PR",
551 disabled: false,551 disabled: false,
552 });552 });
553 });553 });
apps/web/src/components/GitActionsControl.logic.ts+3-3
...@@ -151,7 +151,7 @@ export function buildMenuItems(...@@ -151,7 +151,7 @@ export function buildMenuItems(
151 hasOpenPr151 hasOpenPr
152 ? {152 ? {
153 id: "pr",153 id: "pr",
154 label: "Open PR",154 label: "View PR",
155 disabled: !canOpenPr,155 disabled: !canOpenPr,
156 icon: "pr",156 icon: "pr",
157 kind: "open_pr",157 kind: "open_pr",
...@@ -216,7 +216,7 @@ export function resolveQuickAction(...@@ -216,7 +216,7 @@ export function resolveQuickAction(
216 if (!gitStatus.hasUpstream) {216 if (!gitStatus.hasUpstream) {
217 if (!isAhead) {217 if (!isAhead) {
218 if (hasOpenPr) {218 if (hasOpenPr) {
219 return { label: "Open PR", disabled: false, kind: "open_pr" };219 return { label: "View PR", disabled: false, kind: "open_pr" };
220 }220 }
221 return {221 return {
222 label: "Push",222 label: "Push",
...@@ -266,7 +266,7 @@ export function resolveQuickAction(...@@ -266,7 +266,7 @@ export function resolveQuickAction(
266 }266 }
267267
268 if (hasOpenPr && gitStatus.hasUpstream) {268 if (hasOpenPr && gitStatus.hasUpstream) {
269 return { label: "Open PR", disabled: false, kind: "open_pr" };269 return { label: "View PR", disabled: false, kind: "open_pr" };
270 }270 }
271271
272 return {272 return {
apps/web/src/components/GitActionsControl.tsx+7-7
...@@ -98,7 +98,7 @@ function getMenuActionDisabledReason(...@@ -98,7 +98,7 @@ function getMenuActionDisabledReason(
98 }98 }
9999
100 if (hasOpenPr) {100 if (hasOpenPr) {
101 return "Open PR is currently unavailable.";101 return "View PR is currently unavailable.";
102 }102 }
103 if (!hasBranch) {103 if (!hasBranch) {
104 return "Detached HEAD: checkout a branch before creating a PR.";104 return "Detached HEAD: checkout a branch before creating a PR.";
...@@ -374,12 +374,12 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions...@@ -374,12 +374,12 @@ export default function GitActionsControl({ gitCwd, activeThreadId }: GitActions
374 },374 },
375 }375 }
376 : shouldOfferOpenPrCta376 : shouldOfferOpenPrCta
377 ? {377 ? {
378 actionProps: {378 actionProps: {
379 children: "Open PR",379 children: "View PR",
380 onClick: () => {380 onClick: () => {
381 const api = readNativeApi();381 const api = readNativeApi();
382 if (!api) return;382 if (!api) return;
383 closeResultToast();383 closeResultToast();
384 void api.shell.openExternal(prUrl);384 void api.shell.openExternal(prUrl);
385 },385 },