Skip to content

[2.1] Fixes #36393: Sort the task list newest or oldest first, and merge a user's tasks in that order - #36512

Merged
harsh-vador merged 1 commit into
2.1from
backport/36439-to-2.1
Oct 29, 2026
Merged

harsh-vador merged 1 commit into
2.1from
backport/36439-to-2.1

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #36393

Backport of #36439 to 2.1. The diff is the same as #36439's, and it cherry-picked cleanly. It depends on the sortOrder param of the task list endpoints, which #36453 already brought to 2.1.

  1. Sort menu on the Inbox task list. An icon button after the Type filter opens Sort by → Newest first / Oldest first, with a tooltip naming the current order. The choice is sent to the server as sortOrder, so the order holds across "Load more". It is also part of the list's cache key.
  2. A user's Tasks tab merges in the server's order. The profile Tasks tab builds "assigned to or created by" from two list calls. The merge now orders by (createdAt, id) in the chosen direction. Before, it assumed the old name order: pages came out oldest first, "Load more" showed a task or two at a time, and a task could appear twice.

With Group: Type, groups keep their urgency order and the sort applies within each group. The sort scope is recorded in ADR:2026-10-28-inbox-task-list-sorts-only-by-creation-time, which this PR carries over.

4-inbox-oldest-first 1-inbox-newest-first 3-sort-menu 2-sort-tooltip

Type of change:

  • Bug fix
  • New feature

Tests:

Unit tests

On this branch: npx jest src/components/discovery/personal-space/InboxPage passes 43 suites, 742 tests. eslint on the changed files is clean, tsc reports no errors in InboxPage/ or tasksAPI.ts, and check_decision_records.py is clean.

Backend integration tests

NOT NEEDED: UI-only change. The backend half is #36453.

Ingestion integration tests

N/A: no ingestion changes.

Playwright (UI) tests

Not re-run on 2.1. Checked by hand on #36439 against a server with the sortOrder endpoints.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.

🤖 Generated with Claude Code

…user's tasks in that order (#36439)

* 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)
@harsh-vador
harsh-vador requested a review from a team as a code owner October 29, 2026 06:17
@harsh-vador
harsh-vador requested review from Rohit0301 and removed request for a team October 29, 2026 06:17
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@harsh-vador harsh-vador added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Oct 29, 2026
@harsh-vador harsh-vador self-assigned this Oct 29, 2026
@gitar-bot

gitar-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Sending sortOrder through paginated task lists and merging assigned and created results by creation time could show tasks out of order or repeat them.

Adds a Newest/Oldest first sort control to the Inbox task list, sent to the server as sortOrder and included in the cache key, and fixes the profile Tasks tab merge to order by (createdAt, id) in the chosen direction so pagination no longer duplicates or misorders tasks. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 80%
80.13% (132334/165143) 66.68% (46829/70227) 69.77% (26575/38087)

@sonarqubecloud

Copy link
Copy Markdown

@harsh-vador
harsh-vador merged commit 6da5247 into 2.1 Oct 29, 2026
103 of 106 checks passed
@harsh-vador
harsh-vador deleted the backport/36439-to-2.1 branch October 29, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants