Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/web/src/components/GitActionsControl.logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
});
});
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/GitActionsControl.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function buildMenuItems(
hasOpenPr
? {
id: "pr",
label: "Open PR",
label: "View PR",
disabled: !canOpenPr,
icon: "pr",
kind: "open_pr",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions apps/web/src/components/GitActionsControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand Down Expand Up @@ -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);
},
Expand Down