Skip to content

Fixes #32632: reset Impact Analysis pagination to page 1 on search/quick-filter change - #32699

Merged
Rohit0301 merged 7 commits into
mainfrom
detail/bug-fix/fixes-32632-reset-impact-analysis-pagination-to-pa-78f44a
Sep 10, 2026
Merged

Rohit0301 merged 7 commits into
mainfrom
detail/bug-fix/fixes-32632-reset-impact-analysis-pagination-to-pa-78f44a

Conversation

@detail-app

@detail-app detail-app Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Detail bug report: View on Detail

Describe your changes:

Fixes #32632

I worked on the Impact Analysis table's pagination reset behavior because on any page ≥ 2, typing in the search box, changing a quick filter, or clicking "Clear all" did not reset currentPage to 1 before refetching. The next fetch then used a stale from = (currentPage - 1) * pageSize past the now-narrower result set, rendering an empty NoDataPlaceholder (and at the default pageSize=50 the pager/footer vanished entirely, leaving no in-component way to recover the filtered view).

Root cause: the search box and quick filters were wired straight to the state setters (setSearchValue, setSelectedQuickFilters) with no handlePageChange(1), unlike the impact-level and direction handlers which already reset the page. The column-level branch had the same defect at its in-memory nodes.slice(...) step. Introduced when #25353 rewired onSearchValueChange={setSearchValue} for both impact levels without adding the reset.

Type of change:

  • Bug fix

High-level design:

N/A — small change. The reset is committed synchronously in the same handler as the filter state change (not a separate useEffect, which would race the existing fetch effect and dispatch a stale-from request first).

  • LineageTable.tsx: add handlePageReset (handlePageChange(1)) and handleSearchValueChange (handlePageReset() then setSearchValue(value)); pass onSearchValueChange={handleSearchValueChange} (was raw setSearchValue) and new onPageReset={handlePageReset} to CustomControlsComponent. The single handler serves both Table-level (server-paged from/size) and Column-level (in-memory slice) impact modes.
  • CustomControls.component.tsx: add optional onPageReset?: () => void; handleQuickFiltersValueSelect calls it before setSelectedQuickFilters; the Clear-all button calls a new handleClearAllClick (handleClearAllFilters() + onPageReset?()). handleClearAllFilters stays pure (still used by handleTabChange, so tab switches do not reset the page). The optional prop keeps the Lineage graph view (which omits it) unaffected.

Tests:

Use cases covered

  • On page ≥ 2, changing the search term resets to page 1 of the narrowed set (Table-level and Column-level).
  • On page ≥ 2, selecting/changing a quick filter resets to page 1 of the narrowed set.
  • On page ≥ 2, clicking "Clear all" resets to page 1 of the un-narrowed set.
  • Tab change (lineage ↔ impact_analysis) does not trigger a page reset.
  • The Lineage graph view (which omits the new optional onPageReset prop) still renders and is unaffected.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files added/updated:
    • openmetadata-ui/src/main/resources/ui/src/components/LineageTable/LineageTable.test.tsx — 3 new tests under describe('pagination reset on filter/search change'): search-change reset for Table-level and Column-level, and onPageReset wiring.
    • openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/CustomControls.test.tsx — 3 new tests under describe('onPageReset - quick filter pagination reset'): quick-filter-select reset, Clear-all reset, and tab-change no-reset (decoupling guard).
  • Coverage on changed classes: Jest reports 62/62 passing (Test Suites: 2 passed, 2 total). Verified the 5 assertions fail on the un-fixed source (stashed the source, kept the tests → 5 failed, 57 passed) and pass with the fix, so they genuinely guard the behavior.

Backend integration tests

  • Not applicable (no backend API changes). The fix is UI-only; the backend's getLineageByEntityCount from/size handling is unchanged.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable — no new Playwright spec added in this PR. The existing ImpactAnalysis.spec.ts is unchanged by this fix and continues to compile/run (verified playwright test --list reports 26 tests, exit 0). The bug's precondition (page ≥ 2 at pageSize=50) requires >50 within-depth lineage entities, which the suite's fixtures (~6 nodes) don't reach, so the existing E2E does not cover the failing path; the regression is guarded by the Jest unit tests above.

Manual testing performed

No manual UI walkthrough was run in this session — it requires a running server stack. Attempts to stand one up are summarized under "Tests that could not be run" below.

UI screen recording / screenshots:

Not applicable. (The change is a behavioral fix to pagination reset, with no visible layout change; the empty-state recovery is covered by the unit tests above. A recording against a live stack with >50 within-depth lineage entities would be a useful follow-up but wasn't produced here.)

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #32632 above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. — N/A (no schema changes)
  • For UI changes: I attached a screen recording and/or screenshots above. — N/A (behavioral fix, no visible layout change)
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

Routine checks: unit tests (62/62), broad Lineage/paging/TableV2 regression (37 suites, 763 tests), ESLint (0 errors, 15 pre-existing warnings), Prettier (clean), and tsc --noEmit (no new errors in the changed files — the one LineageTable.tsx dataSource TS2322 is pre-existing on origin/main) all pass.

Tests that could not be run: the Playwright E2E suite (ImpactAnalysis.spec.ts) and a manual UI walkthrough both require a running OpenMetadata server on localhost:8585. I attempted to unblock the E2E: installed the Chromium binary (npx playwright install chromium), installed the missing system libraries (npx playwright install-deps chromium, which installed libatk-1.0.so.0 etc.), and confirmed the spec compiles (playwright test --list → 26 tests, exit 0). The browser then launched but authentication hit net::ERR_CONNECTION_REFUSED at http://localhost:8585/signin. I next tried docker compose pull for the quickstart stack: Elasticsearch pulled, but docker.getcollate.io/openmetadata/server:1.12.0-SNAPSHOT returned manifest unknown (the SNAPSHOT image is not published), so the server stack could not be stood up. Building the server image from source via a full Maven build was the only remaining unblock and was not attempted. The runtime behavior the E2E would check is covered by the Jest suites above.


Automatic Fixes PRs can be configured here.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 6e91a615feb67f916929c8d38915bf2a7de10778 in Playwright run 34475857760, attempt 1.

✅ 4501 passed · ❌ 0 failed · 🟡 6 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 58m 41s

⏱️ Max setup 4m 52s · max shard execution 24m 47s · max shard-job elapsed before upload 27m 51s · reporting 13s

🌐 218.25 requests/attempt · 2.31 app boots/UI scenario · 44.99% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 44.99% (convergence target: at most 15%).
  • Browser traffic was 218.25 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.31 per UI scenario (10960 boots / 4752 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 130 0 0 0 0 0
✅ Shard chromium-01 141 0 0 0 0 0
🟡 Shard chromium-02 147 0 1 1 0 0
✅ Shard chromium-03 130 0 0 0 0 0
✅ Shard chromium-04 158 0 0 0 0 0
✅ Shard chromium-05 156 0 0 0 0 0
✅ Shard chromium-06 147 0 0 0 0 0
🟡 Shard chromium-07 180 0 1 0 0 0
✅ Shard chromium-08 162 0 0 0 0 0
✅ Shard chromium-09 199 0 0 0 0 0
✅ Shard chromium-10 192 0 0 0 0 0
✅ Shard chromium-11 157 0 0 0 0 0
✅ Shard chromium-12 124 0 0 0 0 0
✅ Shard chromium-13 157 0 0 0 0 0
✅ Shard chromium-14 151 0 0 0 0 0
🟡 Shard chromium-15 187 0 1 0 0 0
🟡 Shard chromium-16 124 0 2 0 0 0
✅ Shard chromium-17 154 0 0 0 0 0
✅ Shard chromium-18 165 0 0 0 0 0
✅ Shard chromium-19 175 0 0 0 0 0
✅ Shard chromium-20 126 0 0 0 0 0
🟡 Shard chromium-21 138 0 1 0 0 0
✅ Shard chromium-22 168 0 0 0 0 0
✅ Shard chromium-23 175 0 0 0 0 0
✅ Shard chromium-24 164 0 0 0 0 0
✅ Shard chromium-25 165 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 76 0 0 0 0 0
✅ Shard import-export-02 41 0 0 0 0 0
✅ Shard import-export-03 33 0 0 0 0 0
✅ Shard ingestion-01 45 0 0 0 0 0
✅ Shard ingestion-02 50 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 6 flaky test(s) (passed on retry)
  • Pages/ExplorePageRightPanel.spec.ts › validates visible/hidden tabs and tab content for database (shard chromium-02, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for dashboardDataModel -> mlModel (shard chromium-07, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should show online status badge on user profile for active users (shard chromium-15, 1 retry)
  • Features/GlobalPageSize.spec.ts › Page size should persist across different pages (shard chromium-16, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Api Endpoint (shard chromium-16, 1 retry)
  • Pages/TasksUIFlow.spec.ts › Create and reject tag task for Dashboard via UI (shard chromium-21, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@detail-app detail-app Bot added the safe to test Add this label to run secure Github workflows on PRs label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 70%
70.66% (95845/135642) 55.26% (56839/102850) 56.61% (18950/33472)

Rohit0301 and others added 4 commits September 10, 2026 15:41
…32632)

Add two E2E tests to Pagination.spec.ts that guard the fix introduced in
#32632 (reset Impact Analysis pagination to page 1 on search/quick-filter
change):

- "should reset Impact Analysis table pagination to page 1 on search change"
- "should reset Impact Analysis table pagination to page 1 on quick filter
  change"

Both tests create 16 downstream TableClass entities (exceeding PAGE_SIZE_BASE=15)
so two pages are reachable via ?pageSize=15 in the URL. Each test navigates to
page 2, then triggers the filter/search, and asserts the page-indicator resets
to "1 of X".

Also adds skipUrlParamCheck option to testCompletePaginationWithSearch utility
for callers where search state lives in component state rather than the URL.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 758 → 758
- 0 added, 0 removed, 22 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/constant/config.ts
  openmetadata-ui/src/main/resources/ui/playwright/constant/service.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DashboardServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DatabaseServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/MessagingServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/lineage.ts
  … and 12 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 14 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 14 warning(s) across 3 changed file(s).

Count Rule
11 react-hooks/exhaustive-deps
2 openmetadata-imports/no-lower-layer-page-imports
1 openmetadata-ui-patterns/no-raw-title-attribute
All findings
Location Rule Message
🟡 src/components/Entity/EntityLineage/CustomControls.component.tsx:59:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/Entity/EntityLineage/CustomControls.component.tsx:196:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'selectedQuickFilters' and 'setSelectedQuickFilters'. Either include them or remove the dependency array.
🟡 src/components/Entity/EntityLineage/CustomControls.component.tsx:284:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/components/Entity/EntityLineage/CustomControls.component.tsx:526:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'handleClearAllClick'. Either include it or remove the dependency array.
🟡 src/components/Entity/EntityLineage/CustomControls.test.tsx:89:12 openmetadata-ui-patterns/no-raw-title-attribute Use from @openmetadata/ui-core-components instead of raw title="" attributes for consistent tooltip behavior.
🟡 src/components/LineageTable/LineageTable.tsx:56:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/LineageTable/LineageTable.tsx:477:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array.
🟡 src/components/LineageTable/LineageTable.tsx:600:6 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'handlePagingChange', 'setColumnLineageNodes', 'setFilterNodes', 'setLineagePagingInfo', and 'setLoading'. Eith
🟡 src/components/LineageTable/LineageTable.tsx:620:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'updateEntityData'. Either include it or remove the dependency array.
🟡 src/components/LineageTable/LineageTable.tsx:691:6 react-hooks/exhaustive-deps React Hook useMemo has an unnecessary dependency: 'lineagePagingInfo'. Either exclude it or remove the dependency array.
🟡 src/components/LineageTable/LineageTable.tsx:837:5 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'entityType'. Either include it or remove the dependency array.
🟡 src/components/LineageTable/LineageTable.tsx:911:5 react-hooks/exhaustive-deps React Hook useMemo has an unnecessary dependency: 'lineageDirection'. Either exclude it or remove the dependency array.
🟡 src/components/LineageTable/LineageTable.tsx:935:6 react-hooks/exhaustive-deps React Hook useEffect has missing dependencies: 'selectedQuickFilters' and 'setSelectedQuickFilters'. Either include them or remove the dependency array.
🟡 src/components/LineageTable/LineageTable.tsx:986:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'handlePageChange'. Either include it or remove the dependency array.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Detail Bug] Impact Analysis: filtering/search on page >1 can show empty lineage table and hide pagination

3 participants