Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): a branch picked right after opening the picker no longer waits for its status read #33877

MergedYuruzuu(GitHub profile, opens in a new tab)merged 2 commits intomain fromrefs/pull/33877/headmerged by juliusmarminge 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
@@ -125,7 +125,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, {
@@ -562,7 +562,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
@@ -467,6 +467,67 @@
​