Skip to content

Support multi-column sort in the Dags list table - #72558

Open
Andrushika wants to merge 1 commit into
apache:mainfrom
Andrushika:multisort-dags-list
Open

Support multi-column sort in the Dags list table#72558
Andrushika wants to merge 1 commit into
apache:mainfrom
Andrushika:multisort-dags-list

Conversation

@Andrushika

Copy link
Copy Markdown
Contributor

Why

Sorting the Dags list by latest run puts Dags without any run in reverse alphabetical order. The backend already accepts several order_by values since #53408, but the Dags list only sent the first one.

What

Send every sort from the table state as order_by, and write all of them to the URL. Shift-click on a column header adds a secondary sort.

Card view still has a single sort dropdown, so there is no way to set a secondary sort there. But a sort set in table view can still apply after switching to card view. I plan to add a secondary sort control to card view in a follow-up PR.

2026-09-05.6.43.53.mov

closes: #46383


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5.1)

Generated-by: Claude Code (Fable 5.1) following the guidelines

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Sep 5, 2026
Comment on lines +32 to +39
const isSameSorting = (sorting: SortingState, defaultSorting: SortingState | undefined) =>
defaultSorting?.length === sorting.length &&
sorting.every((sort, index) => {
const defaultSort = defaultSorting[index];

return defaultSort?.id === sort.id && defaultSort.desc === sort.desc;
});

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.

This keeps the existing behavior on main: when the sort equals the one remembered in localStorage, the sort param is dropped from the URL. I think the query param should always sync with the sort that is actually applied, so a shared link shows the same order. If reviewers agree, I would like to change that in a follow-up PR.

@Andrushika Andrushika changed the title UI: Support multi-column sort in the Dags list table Support multi-column sort in the Dags list table Sep 5, 2026
Sorting by latest run with a single criterion leaves Dags without runs in
reverse alphabetical order, because the backend applies the primary key
tiebreak in the same direction as the primary sort. The backend already
accepts several order_by values, but the Dags list only sent the first one
and the URL serializer dropped every sort but the last.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AIP-84 | Add multisort to dags list request

1 participant