Repository navigation
Fixes #36393: Sort the task list newest or oldest first, and merge a user's tasks in that order - #36439
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🚦 Removed from the merge queue —
|
The task list endpoints now page by (createdAt, id), newest first (#36395). The user Tasks tab merges its assigned and created lists with a comparator that still assumed (name, id) ascending, so it showed the oldest tasks first and held back most of each page.
Adds a Sort by menu (Newest first / Oldest first) beside the Inbox task filters. The choice is sent as the list endpoints' sortOrder, so the order holds across cursor pages, and the profile Tasks tab merges its assigned and created sources in the same order.
95602b4 to
a1250dd
Compare
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Changing Inbox task sorting and pagination merges could misorder or omit user tasks if client comparison diverges from server ordering. Adds a Newest/Oldest first sort menu to the Inbox task list and fixes the user Tasks tab merge to follow the server's createdAt/id order, so "Load more" and cross-source ordering stay correct. The sort scope is now recorded in the decision record ✅ 1 closed✅ Quality: Task list sort scope is decided in the PR body but never recorded
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
…user's tasks in that order (#36439) (#36512) * fix(ui): merge a user's tasks newest first, matching the task list order The task list endpoints now page by (createdAt, id), newest first (#36395). The user Tasks tab merges its assigned and created lists with a comparator that still assumed (name, id) ascending, so it showed the oldest tasks first and held back most of each page. * feat(ui): sort the task list newest or oldest first Adds a Sort by menu (Newest first / Oldest first) beside the Inbox task filters. The choice is sent as the list endpoints' sortOrder, so the order holds across cursor pages, and the profile Tasks tab merges its assigned and created sources in the same order. * docs(decisions): record that the Inbox task list sorts only by creation time (cherry picked from commit bb41b64)



Fixes #36393
Describe your changes:
#36395 made the task list endpoints page by
(createdAt, id), newest first, with asortOrder=asc|descparam. This PR does two things on top of it.1. A user's Tasks tab merges in the server's order. The backend ANDs its filters, so
useUserTasksbuilds "assigned to or created by the user" from two list calls and merges them. The merge comparator still assumed(name, id)ascending. Against the new server order it:The comparator now orders by
createdAt, thenid, the same keyset and tie-break the server uses, in whichever direction was asked for.2. A sort menu on the task list. An icon button after the Type filter opens Sort by → Newest first / Oldest first. Its tooltip names the current order ("Sort: Newest first").
sortOrder, so the order holds across cursor pages. It is also part of the list's cache key.ActivityToolbarMenugains aniconOnlytrigger. The trigger text becomes its tooltip and accessible name.label.newest-first/label.oldest-first, translated in every locale.With Group: Type the groups keep their urgency order and the sort applies within each group. With Group: None the list is fully in date order.
Recently updated, priority and assignee sorts are left out. They need server-side keysets, and product agreed to add them when customers ask.
The sort scope and how it combines with grouping are recorded in ADR:2026-10-28-inbox-task-list-sorts-only-by-creation-time.
Type of change:
Tests:
useUserTasks.test.ts: the merge tests use newest-first server pages. New tests cover two tasks created in the same millisecond (ordered by id) and an oldest-first merge that holds back a task the other source's next page may precede.InboxTaskListToolbar,ActivityToolbarMenuandTasksTabtests cover the sort trigger's name, the choice reaching the server assortOrder, and its cache key.InboxPagesuites pass (720 tests). ESLint and Prettier are clean,tscreports nothing in the changed files, andyarn ui-checkstyle:changedreports 0 errors.sortOrder=ascand reorders the Inbox.Checklist:
Fixes <issue-number>: <short explanation>🤖 Generated with Claude Code