Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): a branch switch no longer waits behind the previous PR lookup #28576

ClosedYuruzuu(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/28576/headopened View on GitHub

Showing 3 changed files with 73 additions and 2 deletions.

x
0 of 3 viewed, 3 left
5 additions and 2 deletionsapps/web/src/components/BranchToolbarBranchSelector.tsxModified
View file
@@ -126,7 +126,7 @@
const switchRef = useAtomCommand(vcsEnvironment.switchRef, {
reportFailure: false,
});
- const refreshStatus = useAtomCommand(vcsEnvironment.refreshStatus, {
+ const refreshLocalStatusForPicker = useAtomCommand(vcsEnvironment.refreshLocalStatusForPicker, {
reportFailure: false,
});
const createRefMutation = useAtomCommand(vcsEnvironment.createRef, {
@@ -508,7 +508,10 @@
const handleOpenChange = (open: boolean) => {
setIsBranchMenuOpen(open);
if (open && !isBranchMenuOpen && branchCwd !== null) {
- void refreshStatus({ environmentId, input: { cwd: branchCwd, localOnly: true } });
+ void refreshLocalStatusForPicker({
+ environmentId,
+ input: { cwd: branchCwd, localOnly: true },
+ });
if (!open) {
setBranchQuery("");
61 additions and 0 deletionspackages/client-runtime/src/state/vcs.test.tsModified
View file
@@ -282,6 +282,67 @@
​