fix: Unblock cloud branch picker during slow remote load#2269
Merged
charlesvien merged 2 commits intoMay 21, 2026
Conversation
Member
Author
This was referenced May 20, 2026
4dbc9e1 to
99460f7
Compare
0596858 to
49afa1d
Compare
This was referenced May 20, 2026
99460f7 to
b5ecbfb
Compare
49afa1d to
286cab6
Compare
286cab6 to
a9452b8
Compare
b5ecbfb to
8298610
Compare
a9452b8 to
22da025
Compare
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/git-interaction/components/BranchSelector.test.tsx:61-103
Tests 2 and 3 test the same `showUseInputBranchAction` visibility condition with different `cloudSearchQuery` values (one that matches an existing branch, one that doesn't). Per the team's preference for parameterised tests, these could be merged into a single `it.each` case.
```suggestion
it.each([
{ cloudSearchQuery: "brand-new-branch", expectVisible: true },
{ cloudSearchQuery: "main", expectVisible: false },
])(
"shows the typed-name action only when input does not match an existing branch ($cloudSearchQuery)",
async ({ cloudSearchQuery, expectVisible }) => {
const user = userEvent.setup();
renderInTheme(
<BranchSelector
repoPath="owner/repo"
currentBranch={null}
workspaceMode="cloud"
cloudBranches={["main", "feature-a"]}
cloudBranchesLoading={false}
cloudSearchQuery={cloudSearchQuery}
onBranchSelect={vi.fn()}
onCloudSearchChange={vi.fn()}
/>,
);
await user.click(screen.getByRole("combobox", { name: "Branch" }));
if (expectVisible) {
expect(
await screen.findByText(`Use "${cloudSearchQuery}" as branch name`),
).toBeInTheDocument();
} else {
expect(
screen.queryByText(new RegExp(`Use "${cloudSearchQuery}" as branch name`)),
).not.toBeInTheDocument();
}
},
);
```
Reviews (1): Last reviewed commit: "address branch picker review feedback" | Re-trigger Greptile |
e5384e1 to
942f2bf
Compare
64a785b to
41013d4
Compare
942f2bf to
2011089
Compare
41013d4 to
50e7887
Compare
jonathanlab
approved these changes
May 21, 2026
50e7887 to
93652e1
Compare
2011089 to
ba3d833
Compare
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
Cloud branch picker was disabled while the slow GitHub remote was loading, blocking users from typing a known branch name and forcing them to wait on a request that often takes seconds.
Closes #1984
Changes
How did you test this?
Manually
Publish to changelog?
no