Skip to content

[2.0] Backport #38410 - #38960

Open
ShaileshParmar11 wants to merge 1 commit into
2.0from
ShaileshParmar11/clear-all-paging-2.0
Open

ShaileshParmar11 wants to merge 1 commit into
2.0from
ShaileshParmar11/clear-all-paging-2.0

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #38410 (295f502d4ae) to 2.0.

What it fixes

In the Incident Manager, clicking Clear all on a later page of a filtered list kept currentPage, cursorType and cursorValue in the URL, so the user stayed on page N of a different (unfiltered) result set.

Why this is a hand port, not a clean cherry-pick

2.0's hook differs from main: clearAllFilters called updateFilters, which spreads the cleared filters over the whole current query, so the paging params survived. The cherry-pick conflicted, and 2.0's IncidentManager.test.tsx has no Clear all test to extend. So this PR:

  • changes clearAllFilters in useIncidentFilters.ts to navigate with omit(allParams, [...filter params, 'currentPage', 'cursorType', 'cursorValue']), the same shape as clearFilters on main. It still clears the assignee owner refs. It keeps key/title as 2.0 did before, so the only behaviour change is the dropped paging params.
  • adds one test to useIncidentFilters.test.ts that asserts the resulting query is exactly other=z&pageSize=15. The test fails on unfixed 2.0 (received currentPage=5&cursorType=after&cursorValue=foo&other=z&pageSize=15).

Related

Tests (local, Node 22, 2.0 dependencies)

  • npx jest src/components/IncidentManager: 8 suites, 103/103 passed
  • Same run on this branch merged with [2.0] Backport #35147, #38945 #38946: 9 suites, 117/117 passed
  • ESLint and Prettier clean on the 2 changed files

🤖 Generated with Claude Code

Backport of #38410 (295f502) to 2.0. On 2.0, clearAllFilters merged
the cleared filters into the current query, so currentPage, cursorType
and cursorValue survived Clear all. It now omits them along with the
filter params, matching clearFilters on main.

(cherry picked from commit 295f502)
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner November 27, 2026 10:04
@ShaileshParmar11
ShaileshParmar11 requested review from harsh-vador and removed request for a team November 27, 2026 10:04
@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.

@gitar-bot

gitar-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Clearing Incident Manager filters now removes pagination cursors, so users return to the unfiltered result set instead of remaining on an invalid page.

Fixes the Incident Manager so clicking Clear all on a later page of a filtered list drops the stale currentPage, cursorType and cursorValue params from the URL, instead of staying on page N of an unfiltered result set. 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

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant