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
17 changes: 17 additions & 0 deletions apps/desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ The VS Code / Cursor extension has its own changelog at
separately — desktop releases are tagged `app-v*`, extension releases `ext-v*` —
but they share the same engine, so most Git behaviour lands in both at once.

## [Unreleased]

### Added
- **Cherry-pick and revert a merge commit.** The app asks which side, as the
extension does: for a cherry-pick, the changes that were merged in or those
of the branch it was merged into; for a revert, which branch to keep. Every
parent of an octopus merge is offered. It used to refuse and name the git
command to run instead.

### Changed
- **You choose the OpenAI model.** A new OpenAI or Azure OpenAI connection no
longer comes with models filled in; each model field lists what the
provider offers for it, and the connection is ready once you pick. A
connection keeps the model it is on — none is swapped for you when OpenAI
retires one. Adding a Custom connection no longer says "Ready to use" before
it has a model.

## [2.9.0] - 2026-11-07

### Added
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/harness/check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,10 @@ const CASES = [
["a-revert-over-your-changes-asks-and-outlives-the-refresh", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "intheway=1" }],
["a-revert-over-your-changes-asks-and-outlives-the-refresh", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "intheway=1", theme: "light" }],
["cancelling-the-stash-question-runs-nothing-and-says-nothing", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "intheway=1" }],
// A merge commit's cherry-pick or revert asks which side (?mergepick=).
["a-merge-cherry-pick-asks-which-side-and-sends-it", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "mergepick=1" }],
["a-merge-cherry-pick-asks-which-side-and-sends-it", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "mergepick=1", theme: "light" }],
["a-merge-revert-asks-which-branch-to-keep-and-cancel-says-nothing", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "mergepick=1" }],
["a-pull-over-your-changes-asks-and-outlives-its-own-fetch", "code", { extra: "intheway=1" }],
["a-pull-over-your-changes-asks-and-outlives-its-own-fetch", "code", { extra: "intheway=1", theme: "light" }],
["the-stash-question-does-not-follow-you-to-another-repository", "code", { extra: "intheway=1" }],
Expand Down
71 changes: 71 additions & 0 deletions apps/desktop/harness/checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -18098,6 +18098,77 @@
c.ok(!!t && t.classList.contains("toast-success"), "…and the revert is reported done");
c.ok(!$(".toast-error"), "nothing red at any point");
},
// A merge commit's cherry-pick or revert: main answers its parents
// (`mergeSides`) and bridge.ts asks which side — the extension's question,
// in its words — then sends the same request again with `mainline`. It
// used to refuse and name the git command. ?mergepick= makes the commit a
// merge (see the shim).
/** The question, both sides offered in git's order; the pick goes with -m. */
"a-merge-cherry-pick-asks-which-side-and-sends-it": async (f) => {
const c = check(f);
$$("#toast-stack .toast").forEach((t) => t.remove());
const sent = () =>
(window.__GS_INVOKED || []).filter((r) => r.channel === "commit:action" && r.payload?.action === "cherry-pick");
const more = $$(".det-tb-actions button").find((x) =>
/actions for this commit/i.test(x.getAttribute("aria-label") || ""),
);
if (!more) return c.ok(false, "no actions menu to press");
more.click();
await settle(250);
const item = $$(".dropdown-item").find((i) => /^Cherry-pick onto current branch/.test(text(i) || ""));
if (!item) return c.ok(false, "no Cherry-pick to press");
item.click();
await settle(700);
c.match(text(".modal-title"), /^Cherry-pick the merge [0-9a-f]{7}$/, "it asks which side");
c.match(text(".modal-message"), /two sides/, "…saying why");
const labels = $$(".modal-choice-label").map((e) => text(e));
c.eq(labels.slice(0, 2).join(" | "), "Apply the changes that were merged in | Apply the changes of the branch it was merged into", "both sides, parent 1 first");
const subs = $$(".modal-choice-sub").map((e) => text(e));
c.match(subs[1] || "", /^b2b2b2b · feat\(desktop\): the branch window$/, "each side names its parent");
c.ok(!$(".toast-error"), "nothing is red");
const second = $$(".modal-choice").find((r) => /branch it was merged into/.test(text(r) || ""));
if (!second) return;
second.click();
await settle(800);
c.eq(sent().length, 2, "the cherry-pick is sent again — once");
const [first, again] = sent().map((r) => r.payload);
c.eq(first?.mainline, undefined, "the first request carried no side");
c.eq(again?.mainline, 2, "…the second carries the one picked");
c.eq(again?.sha, first?.sha, "…for the same commit");
c.ok(!$(".modal-card"), "the question is answered and gone");
const t = $$("#toast-stack .toast").find((x) => /Cherry-picked/.test(text(x)));
c.ok(!!t && t.classList.contains("toast-success"), "…and the cherry-pick is reported done");
},
/** Revert asks its own question; Cancel runs nothing and says nothing. */
"a-merge-revert-asks-which-branch-to-keep-and-cancel-says-nothing": async (f) => {
const c = check(f);
$$("#toast-stack .toast").forEach((t) => t.remove());
const sent = () =>
(window.__GS_INVOKED || []).filter((r) => r.channel === "commit:action" && r.payload?.action === "revert");
const more = $$(".det-tb-actions button").find((x) =>
/actions for this commit/i.test(x.getAttribute("aria-label") || ""),
);
if (!more) return c.ok(false, "no actions menu to press");
more.click();
await settle(250);
const item = $$(".dropdown-item").find((i) => /^Revert this commit/.test(text(i) || ""));
if (!item) return c.ok(false, "no Revert to press");
item.click();
await settle(350);
$(".modal-ok")?.click(); // Revert confirms first, as it always has
await settle(700);
c.match(text(".modal-title"), /^Revert the merge [0-9a-f]{7}$/, "it asks which branch to keep");
const labels = $$(".modal-choice-label").map((e) => text(e));
c.eq(labels.slice(0, 2).join(" | "), "Keep the branch this was merged into | Keep the branch that was merged in", "the revert's own words");
c.eq(labels.length, 2, "only the sides are choices — Cancel is the dialog's button");
const cancel = $$(".modal-actions button").find((b) => /^Cancel$/.test(text(b) || ""));
if (!cancel) return c.ok(false, "no Cancel to press");
cancel.click();
await settle(700);
c.ok(!$(".modal-card"), "the question closes");
c.eq(sent().length, 1, "nothing is sent again");
c.eq($$("#toast-stack .toast").length, 0, `and nothing is said (${text("#toast-stack")})`);
},
/** Cancel runs nothing, says nothing, and files nothing. */
"cancelling-the-stash-question-runs-nothing-and-says-nothing": async (f) => {
const c = check(f);
Expand Down
23 changes: 23 additions & 0 deletions apps/desktop/harness/shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -2959,6 +2959,29 @@
optionLike: { fullName: req.fullName, name, local: true },
};
}
// ?mergepick=1: the commit is a MERGE — a cherry-pick or revert sent
// without its side answers the merge's parents, as gitBridge's
// commitActionRefusal does, and the bridge asks which side.
if (
params.get("mergepick") &&
(req?.action === "cherry-pick" || req?.action === "revert") &&
req.mainline === undefined &&
!(Array.isArray(req.shas) && req.shas.length > 1)
) {
const short = String(req.sha).slice(0, 7);
return {
ok: false,
changed: false,
expected: true,
message: `${short} is a merge commit, and ${req.action === "cherry-pick" ? "cherry-picking" : "reverting"} a merge needs the side.`,
mergeSides: {
parents: [
{ sha: "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1", subject: "Merge pull request #142 from feat/branch-window" },
{ sha: "b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", subject: "feat(desktop): the branch window" },
],
},
};
}
const done = () => ({ ok: true, changed: true, message: `${req?.action ?? "action"} ok` });
const kind = { checkout: "checkout", "checkout-ref": "checkout", "cherry-pick": "cherry-pick", revert: "revert" }[
req?.action
Expand Down
17 changes: 17 additions & 0 deletions apps/desktop/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
"A merge": "A merge",
"A merge commit in this range isn't listed — a rebase replays the merged-in commits one by one and the merge itself disappears.": "A merge commit in this range isn't listed — a rebase replays the merged-in commits one by one and the merge itself disappears.",
"A merge commit — its diff is against the first parent.": "A merge commit — its diff is against the first parent.",
"A merge has two sides, so git needs to know which one to keep.": "A merge has two sides, so git needs to know which one to keep.",
"A merge has two sides, so git needs to know which side's changes to apply.": "A merge has two sides, so git needs to know which side's changes to apply.",
"A merge is in progress in it": "A merge is in progress in it",
"A merge is in progress in it. Removing the worktree abandons the merge.": "A merge is in progress in it. Removing the worktree abandons the merge.",
"A merge is in progress — finish or abort it first.": "A merge is in progress — finish or abort it first.",
Expand Down Expand Up @@ -282,6 +284,7 @@
"Add to filter": "Add to filter",
"Add to your review": "Add to your review",
"Add variable": "Add variable",
"Add your API key and choose a model to finish.": "Add your API key and choose a model to finish.",
"Add your API key to finish.": "Add your API key to finish.",
"Add {0} after {1}": "Add {0} after {1}",
"Add {0} to the filter": "Add {0} to the filter",
Expand All @@ -294,6 +297,7 @@
"Adds everything above, plus discard, reset and force operations that can lose uncommitted work or rewrite history.": "Adds everything above, plus discard, reset and force operations that can lose uncommitted work or rewrite history.",
"Adds everything in Read-only, plus stage, commit and create or switch branches. It won't be able to discard or rewrite existing work.": "Adds everything in Read-only, plus stage, commit and create or switch branches. It won't be able to discard or rewrite existing work.",
"Adds inspect-only access — history, diffs, branches and file contents. A client added this way cannot change your repository.": "Adds inspect-only access — history, diffs, branches and file contents. A client added this way cannot change your repository.",
"Against parent {0}": "Against parent {0}",
"Agent Access · MCP": "Agent Access · MCP",
"Ahead": "Ahead",
"All": "All",
Expand Down Expand Up @@ -376,6 +380,8 @@
"Apply non-conflicting changes:": "Apply non-conflicting changes:",
"Apply non-conflicting changes: all": "Apply non-conflicting changes: all",
"Apply non-conflicting changes: {0}": "Apply non-conflicting changes: {0}",
"Apply the changes of the branch it was merged into": "Apply the changes of the branch it was merged into",
"Apply the changes that were merged in": "Apply the changes that were merged in",
"Apply with {0} unresolved": "Apply with {0} unresolved",
"Apply {0}": "Apply {0}",
"Apply {0} and keep it in the stash list": "Apply {0} and keep it in the stash list",
Expand Down Expand Up @@ -555,6 +561,7 @@
"Cherry-pick in progress": "Cherry-pick in progress",
"Cherry-pick onto current branch": "Cherry-pick onto current branch",
"Cherry-pick stopped": "Cherry-pick stopped",
"Cherry-pick the merge {0}": "Cherry-pick the merge {0}",
"Cherry-pick {0} commits": "Cherry-pick {0} commits",
"Cherry-picked": "Cherry-picked",
"Cherry-picked {0} commits.": "Cherry-picked {0} commits.",
Expand All @@ -565,7 +572,9 @@
"Choose a base…": "Choose a base…",
"Choose a folder to clone into": "Choose a folder to clone into",
"Choose a folder…": "Choose a folder…",
"Choose a model to finish.": "Choose a model to finish.",
"Choose editors…": "Choose editors…",
"Choose from the list, or type a model ID": "Choose from the list, or type a model ID",
"Choose how GitStudio looks. “System” follows your OS.": "Choose how GitStudio looks. “System” follows your OS.",
"Choose location…": "Choose location…",
"Choose the branch it comes from": "Choose the branch it comes from",
Expand Down Expand Up @@ -1745,7 +1754,10 @@
"Keep going": "Keep going",
"Keep my changes": "Keep my changes",
"Keep my merge": "Keep my merge",
"Keep parent {0}": "Keep parent {0}",
"Keep stale branches": "Keep stale branches",
"Keep the branch that was merged in": "Keep the branch that was merged in",
"Keep the branch this was merged into": "Keep the branch this was merged into",
"Keep the commit, rewrite its message.": "Keep the commit, rewrite its message.",
"Keep them": "Keep them",
"Keep this commit as it is.": "Keep this commit as it is.",
Expand Down Expand Up @@ -2838,6 +2850,7 @@
"Revert conflicts": "Revert conflicts",
"Revert in progress": "Revert in progress",
"Revert stopped": "Revert stopped",
"Revert the merge {0}": "Revert the merge {0}",
"Revert this commit": "Revert this commit",
"Revert {0} commits": "Revert {0} commits",
"Revert {0} commits?": "Revert {0} commits?",
Expand Down Expand Up @@ -3341,6 +3354,7 @@
"The file was saved but could not be staged.": "The file was saved but could not be staged.",
"The files go back to how they were before the stash was applied. The stash itself stays in ": "The files go back to how they were before the stash was applied. The stash itself stays in ",
"The first commit — there is nothing below it to reorder past.": "The first commit — there is nothing below it to reorder past.",
"The first parent — usually what you want.": "The first parent — usually what you want.",
"The first {0} of {1} commits.": "The first {0} of {1} commits.",
"The folder at {0} goes to the Trash, including anything in it that has not been committed. You can put it back straight afterwards, or from the Trash later.": "The folder at {0} goes to the Trash, including anything in it that has not been committed. You can put it back straight afterwards, or from the Trash later.",
"The folder {0} is not there any more — it was moved or deleted.": "The folder {0} is not there any more — it was moved or deleted.",
Expand Down Expand Up @@ -3490,6 +3504,8 @@
"This log is larger than 8 MB — showing the most recent output. Download for the full text.": "This log is larger than 8 MB — showing the most recent output. Download for the full text.",
"This machine": "This machine",
"This marks every notification in your inbox as read on GitHub.": "This marks every notification in your inbox as read on GitHub.",
"This merge has {0} parents. Which one should be kept as the mainline?": "This merge has {0} parents. Which one should be kept as the mainline?",
"This merge has {0} parents. Which one should its changes be taken against?": "This merge has {0} parents. Which one should its changes be taken against?",
"This notification has no openable subject.": "This notification has no openable subject.",
"This organization has no repositories you can see.": "This organization has no repositories you can see.",
"This organization has no teams visible to you.": "This organization has no teams visible to you.",
Expand Down Expand Up @@ -4477,6 +4493,7 @@
"{0} has no GitHub remote to be pushed to.": "{0} has no GitHub remote to be pushed to.",
"{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.",
"{0} has no commits that {1} doesn't.": "{0} has no commits that {1} doesn't.",
"{0} has no parent {1} to take the merge against.": "{0} has no parent {1} to take the merge against.",
"{0} has no pull request #{1}.": "{0} has no pull request #{1}.",
"{0} has no text to merge here.": "{0} has no text to merge here.",
"{0} has no tracked files at HEAD.": "{0} has no tracked files at HEAD.",
Expand Down
Loading
Loading