Merge Request for branch is not shown if MR is closed or merged

Checklist

Summary

I often switch between the primary branch and any branches I was working on. If the branch has been merged through a MR, the extension behaves like there never was a merge request. Only opened merge requests seem to be considered by the extension.

Steps to reproduce

  1. Open a project
  2. Checkout a branch with an associated merge request, or create one
  3. Merge or close the MR
  4. Refresh the extension state

What is the current bug behavior?

No Merge Request is shown, and the "Create MR" button is shown in the bottom status bar.

What is the expected correct behavior?

The merged MR should be shown, assuming that no newer MR exists.

Relevant logs and/or screenshots

Screenshot_2026-01-13_at_14.47.17

Status bar when no MR is available, and also when MR is merged/closed.

Possible fixes

https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/f27c1dc6300f9f84da7e790566ecb58d42035a14/src/desktop/gitlab/api/get_open_merge_requests_for_branch.ts#L11