Skip to content

fix: correct ordering on revisions selector on hardware page#1937

Open
gustavobtflores wants to merge 1 commit into
kernelci:mainfrom
gustavobtflores:fix/revision-selector-ordering
Open

fix: correct ordering on revisions selector on hardware page#1937
gustavobtflores wants to merge 1 commit into
kernelci:mainfrom
gustavobtflores:fix/revision-selector-ordering

Conversation

@gustavobtflores

Copy link
Copy Markdown
Contributor

Fixes inconsistent ordering in the hardware page revision selector by sorting trees, branches, and revisions in the hardware selectors API response before returning them to the frontend.

How to test

  1. Open the hardware page.
  2. Open the revision selector dropdown.
  3. Confirm trees appear in alphabetical order, branches are grouped and ordered consistently, and revisions within each branch show newest commits first.

@gustavobtflores gustavobtflores self-assigned this Jun 12, 2026
@gustavobtflores gustavobtflores added the Backend Most or all of the changes for this issue will be in the backend code. label Jun 12, 2026
}
)

for tree in trees:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: because the difference might be negligible, but with this, we might want to remove the order by on the database query

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordering in the query is different from what we want (newest-first) and is needed for the DISTINCT ON, we could move all the ordering to the query, but it would increase complexity a little

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Most or all of the changes for this issue will be in the backend code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants