Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web: Broken state for deleting branch in repo that deletes on merge #3453

Closed
digitarald opened this issue Apr 5, 2022 · 2 comments · Fixed by #3468
Closed

Web: Broken state for deleting branch in repo that deletes on merge #3453

digitarald opened this issue Apr 5, 2022 · 2 comments · Fixed by #3468
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@digitarald
Copy link
Contributor

digitarald commented Apr 5, 2022

  • VSCode Version: github.dev

Steps to Reproduce:

  1. I reviewed a PR https://github.dev/microsoft/vscode/pull/146789
  2. Merged the PR and picked to delete the branch.

AR: Delete Branch is still shown, with a note that I can exit without deleting the branch. Is it deleted or not?
ER: When the branch is deleted, the UI sets to a welcome state where I can't commit or delete branches that don't exist.

image

A quick pick showed up a minute later to delete the branch, but clicking it just caused an error in the output:

[Info] PullRequestChangesTreeDataProvider> Error: Cannot resolve tree item for element 0/0:treeView.ts
[Info] GithubRepository> Unable to delete branch: HttpError: Reference does not exist

But even then the UI didn't change.


Refreshing still offers to exit without deleting the branch, but doesn't have a delete branch button anymore:

image

@alexr00
Copy link
Member

alexr00 commented Apr 6, 2022

Delete Branch is still shown, with a note that I can exit without deleting the branch. Is it deleted or not?

I took a closer look at what's the disabled buttons mean: They are disabled while we try to delete the branch. Disabled does not indicate that the branch has been deleted, rather that the operation is still happening and we don't want to you click additional buttons while we work on it.

I see that this is happening with GitHub Repositories. I think the microsoft/vscode repo has a setting on it that causes PR branches to be deleted when the PR is merged. So, what it looks like is happening here is that the branch got deleted out from under you right after merging.

This is a poor experience. I'll see what we can do to improve it.

@alexr00 alexr00 self-assigned this Apr 6, 2022
@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Apr 6, 2022
@alexr00 alexr00 changed the title Broken state for deleting branch Web: Broken state for deleting branch in repo that deletes on merge Apr 6, 2022
@alexr00 alexr00 added this to the April 2022 milestone Apr 6, 2022
@alexr00
Copy link
Member

alexr00 commented Apr 14, 2022

The new behavior follows the same pattern as in non remote-repository workspaces: after the branch is deleted you will see the default branch for the repo get checked out. In web, this means there will be a realod.

@connor4312 connor4312 added the verified Verification succeeded label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
3 participants