Skip to content

Conversation

@anshuksi282-ksolves
Copy link
Contributor

Description

This PR addresses issue #60576.

Currently, the Start Date column in the Task Instances view does not toggle to a descending sort when clicked. It only toggles between unsorted and ascending. This behavior is misleading because the backend correctly supports descending sort (verified by manually adding ?sort=-start_date to the URL).

The issue was caused by the missing explicit id in the column definition, which prevented TanStack Table from correctly mapping the sorting state for the complex cell renderer used in the Start Date column.

Changes introduced:

TaskInstances.tsx: Added an explicit id: "start_date" to the column definition to ensure proper state mapping during sorting toggles.

TaskInstances.tsx: Added enableSorting: true to the Start Date column to ensure the full sorting cycle (Ascending -> Descending -> None) is active.


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

That shouldn't have any impact.

Tested on main and seems to be working.

Closing, feel free to re-open if I missed something.

@anshuksi282-ksolves
Copy link
Contributor Author

anshuksi282-ksolves commented Jan 15, 2026

Hi @pierrejeambrun, since @bbovenzi has reopened the original issue (#60576) and confirmed that there is an 'intermittent' sorting issue, could we please reopen this PR?

My change adds an explicit id to the column. In TanStack Table, when using custom cell renderers (like the Link and Time components used here), providing an explicit id is a recommended practice to ensure the sorting state remains stable and consistent. This might be exactly what's needed to fix the intermittent behavior observed.

@bbovenzi
Copy link
Contributor

I tested and id is still not the fix.

I did a different fix here: #60609

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.

3 participants