From e41e96abb2c0f678500af8db3a79a40c8e25fad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Tue, 6 Oct 2026 20:22:25 +0200 Subject: [PATCH] :bug: Fix the per-change selection toggle and its hanging test The toggle flip default was inverted: with an empty selection the first toggle left it empty instead of adding the change, and an excluded change could never be deselected, so the row checkbox was a no-op in both directions; the group paths that pass include? are unchanged. The refetch test deferred body never called inner-done, so with-mocks neither restored the mocks nor completed the test, and the whole suite hung on it; that is why the suite could not finish. AI-assisted-by: glm-5.3-flash Signed-off-by: Alvaro Tejero Cantero --- frontend/src/app/main/data/workspace/branches.cljs | 2 +- frontend/test/frontend_tests/data/workspace_branches_test.cljs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/workspace/branches.cljs b/frontend/src/app/main/data/workspace/branches.cljs index 7239edf693..21484ca2ee 100644 --- a/frontend/src/app/main/data/workspace/branches.cljs +++ b/frontend/src/app/main/data/workspace/branches.cljs @@ -412,7 +412,7 @@ (let [excluded (or excluded #{}) include? (if (some? include?) include? - (not (every? excluded change-keys)))] + (every? excluded change-keys))] (if include? (apply disj excluded change-keys) (into excluded change-keys))))))))) diff --git a/frontend/test/frontend_tests/data/workspace_branches_test.cljs b/frontend/test/frontend_tests/data/workspace_branches_test.cljs index a87cecca61..d07bf69b8c 100644 --- a/frontend/test/frontend_tests/data/workspace_branches_test.cljs +++ b/frontend/test/frontend_tests/data/workspace_branches_test.cljs @@ -187,7 +187,8 @@ (t/testing "the other direction starts the selection over" (ptk/emit! store (dwb/fetch-branch-diff (:id branch) :main->branch)) (t/is (= #{} (get-in @store [:workspace-branch-diff :excluded])))) - (rx/dispose! store))) + (rx/dispose! store)) + (done')) done)))) (t/deftest the-selection-travels-with-the-merge-and-update-calls