fix: keep worktree creation spinner visible while loading

The new-worktree button spinner was hidden when the cursor left the
project row. Force visibility when the mutation is pending so users
see the loading state throughout creation.
This commit is contained in:
Mohamed Boudra
2026-04-14 19:43:08 +07:00
parent d1702e8a40
commit 8651c334c7
@@ -808,7 +808,12 @@ function ProjectHeaderRow({
<NewWorktreeButton
displayName={displayName}
onPress={() => createWorktreeMutation.mutate()}
visible={isHovered || platformIsNative || isMobileBreakpoint}
visible={
isHovered ||
platformIsNative ||
isMobileBreakpoint ||
createWorktreeMutation.isPending
}
loading={createWorktreeMutation.isPending}
showShortcutHint={isProjectActive}
testID={`sidebar-project-new-worktree-${project.projectKey}`}