From f2a372428c3eec315145328cfe58d44dbd22db16 Mon Sep 17 00:00:00 2001
From: Alexis <44708815+Rhombicdodecahedron@users.noreply.github.com>
Date: Thu, 26 Nov 2026 12:32:33 +0100
Subject: [PATCH] fix(vcs): select a Push dialog repository row without
unticking it (#6169)
In the multi-repository Push dialog, clicking a repository row to see its outgoing files also
unticked it, because the row's click toggled the checkbox. A click on the row or its name now
only selects it; the checkbox, or Space on the selected row, includes or excludes it.
Closes #6151
Co-authored-by: Rhombicdodecahedron <44708815+Rhombicdodecahedron@users.noreply.github.com>
---
.../vcs/__tests__/multiPushTarget.test.tsx | 23 +++++++++++++
src/features/vcs/common.module.css | 3 --
src/features/vcs/remoteUi.tsx | 34 +++++++++----------
3 files changed, 40 insertions(+), 20 deletions(-)
diff --git a/src/features/vcs/__tests__/multiPushTarget.test.tsx b/src/features/vcs/__tests__/multiPushTarget.test.tsx
index 1a7ad7b777..f6d6870bbb 100644
--- a/src/features/vcs/__tests__/multiPushTarget.test.tsx
+++ b/src/features/vcs/__tests__/multiPushTarget.test.tsx
@@ -392,6 +392,29 @@ it("lists every repository on Push all, checks those with commits, expands none
expect(mocks.ops[0]?.repo).toBe("/p/a");
});
+it("selects a repository row to show its files without unticking it; the checkbox or Space includes it", async () => {
+ await openPushDialog();
+ const box = () => screen.getByRole("checkbox", { name: "b" });
+ expect(box()).toBeChecked();
+
+ const name = screen.getByTitle("b");
+ fireEvent.mouseDown(name);
+ fireEvent.click(name);
+ expect(await screen.findByText("b.txt")).toBeInTheDocument();
+ expect(box()).toBeChecked();
+
+ fireEvent.click(box());
+ expect(box()).not.toBeChecked();
+ fireEvent.click(box());
+ expect(box()).toBeChecked();
+
+ const tree = screen.getByRole("tree", { name: "Outgoing commits" });
+ fireEvent.keyDown(tree, { key: " " });
+ expect(box()).not.toBeChecked();
+ fireEvent.keyDown(tree, { key: " " });
+ expect(box()).toBeChecked();
+});
+
it("shows only the repository Push was invoked from without a checkbox, its files shown at once", async () => {
render(