authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-14 22:44:22-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-14 23:35:48-08:00
log47019ad79d55171f2cd206408510f2094c84f80d
tree0ef0faec652e87f06868dc93b4306a62d48df252
parent78fabcfde9576fbcca2133d0ec173485ba879bc0

Prefer upstream branch in push result summary

- show push target as `origin/<branch>` when available - update summarizeGitResult test expectation accordingly

2 files changed, 2 insertions(+), 2 deletions(-)

apps/web/src/components/GitActionsControl.logic.test.ts+1-1
...@@ -615,7 +615,7 @@ describe("summarizeGitResult", () => {...@@ -615,7 +615,7 @@ describe("summarizeGitResult", () => {
615 });615 });
616616
617 assert.deepEqual(result, {617 assert.deepEqual(result, {
618 title: "Pushed abcdef0 to foo",618 title: "Pushed abcdef0 to origin/foo",
619 description: "fix: tighten quick action tooltip hover handling",619 description: "fix: tighten quick action tooltip hover handling",
620 });620 });
621 });621 });
apps/web/src/components/GitActionsControl.logic.ts+1-1
...@@ -50,7 +50,7 @@ export function summarizeGitResult(...@@ -50,7 +50,7 @@ export function summarizeGitResult(
5050
51 if (result.push.status === "pushed") {51 if (result.push.status === "pushed") {
52 const shortSha = shortenSha(result.commit.commitSha);52 const shortSha = shortenSha(result.commit.commitSha);
53 const branch = result.push.branch ?? result.push.upstreamBranch;53 const branch = result.push.upstreamBranch ?? result.push.branch;
54 const pushedCommitPart = shortSha ? ` ${shortSha}` : "";54 const pushedCommitPart = shortSha ? ` ${shortSha}` : "";
55 const branchPart = branch ? ` to ${branch}` : "";55 const branchPart = branch ? ` to ${branch}` : "";
56 return withDescription(56 return withDescription(