List of branches incorrectly sorted

Summary

The list of branches on the web interface (.../-/branches) appears incorrectly sorted in some cases.

Steps to reproduce

At least in my project (see below), the following happens:

  • Select the Stale tab: The order button says "Last updated", but they are ordered oldest updated first.

  • Change the order to e.g. Name: The order changes alright, but the tab gets changed to All.

Example Project

https://gitlab.com/Molcas/OpenMolcas/-/branches

What is the current bug behavior?

The order is not the one indicated by the UI button. Changing order changes tab. Changing tabs reset to (wrong) order.

What is the expected correct behavior?

The order of the branches should be the one displayed in the UI button.

Changing the order should keep the same tab selected.

Changing tab should keep the same order selected.

Output of checks

This bug happens on GitLab.com