Skip to content

Fix: explicit pathname on Explore navigate() calls to stop random redirects - #31632

Open
shrabantipaul-collate wants to merge 12 commits into
mainfrom
fix/explore-navigate-relative-path-race
Open

Fix: explicit pathname on Explore navigate() calls to stop random redirects#31632
shrabantipaul-collate wants to merge 12 commits into
mainfrom
fix/explore-navigate-relative-path-race

Conversation

@shrabantipaul-collate

@shrabantipaul-collate shrabantipaul-collate commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-08-17.at.5.46.13.PM.mov

Describe your changes:

Users interacting with the Explore page — applying a filter, changing sort, clicking a browse-estate tree node, toggling "show deleted" — were intermittently and silently dropped onto a completely unrelated page (e.g. landing on /glossary or /context-center/dashboard?browsePath=... instead of staying on Explore).

Root cause. Five handlers in ExplorePageV1handleSortValueChange, handleSortOrderChange, handleQuickFilterChange, handleTreeSelect, handleShowDeletedChange — call navigate({ search: ... }) with no pathname. In React Router v6 that's a relative navigation, resolved against the router's current route-match context rather than window.location.pathname at the literal moment of the call. That route-match context is React state updated through the router's own commit cycle, and can still reflect a previous route for a brief window after a pushState fires elsewhere in the app (e.g. a sidebar navigation). When one of these handlers fires inside that window, its search params get merged onto whatever page is currently resolved — not Explore — producing URLs like /glossary?quickFilter=... or /context-center/dashboard?browsePath=... and silently navigating the user away.

Confirmed via history.pushState/popstate instrumentation in the browser console: captured stack traces showing the exact ExploreTreeExplorePageV1 handler chain firing synchronously on a real user click, with navigate()'s implicit relative-merge landing on an unrelated page's pathname.

One handler in the same file, handleSearchIndexChange, was already unaffected — it calls navigate(getExplorePath({...})), and getExplorePath builds a full absolute path from ROUTES.EXPLORE_WITH_TAB, so it's never subject to relative resolution.

Changes

  • ExplorePageV1.component.tsx — pass an explicit pathname: location.pathname (already available via useCustomLocation()) on all 5 vulnerable navigate({ search: ... }) calls, matching the safe pattern handleSearchIndexChange already used. Added location.pathname to the useCallback deps for the two memoized handlers (handleQuickFilterChange, handleTreeSelect) so they don't go stale if pathname changes independently of parsedSearch.

This removes the dependency on relative-navigation resolution entirely rather than trying to fix the timing race itself.

Type of change:

  • Bug fix

Checklist:

  • I have read the CONTRIBUTING document.
  • All new and existing tests passed.

Tests

  • eslint on the changed file: 0 errors, same 5 pre-existing react-hooks/exhaustive-deps warnings as before this change (confirmed via git stash diff — none introduced by this patch).
  • Manual repro on a local build and on a hosted environment: captured history.pushState/popstate console traces reproducing the bug via a Domain quick-filter clear (landed on /glossary) and a browse-estate tree click (landed on /context-center/dashboard?browsePath=...), both while intentionally racing against another navigation.

🤖 Generated with Claude Code

Greptile Summary

The PR completes the Explore navigation fix by constructing handler targets from canonical Explore routes rather than the potentially stale router pathname.

  • Adds getExploreTabPath as a location-independent route helper.
  • Updates five filter, sort, tree-selection, and deleted-state handlers to navigate explicitly within Explore.
  • Adds regression coverage for tabbed and bare Explore targets.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/pages/ExplorePage/ExplorePageV1.component.tsx All five affected handlers now derive an explicit canonical Explore pathname, resolving both previously reported stale-path cases.
openmetadata-ui/src/main/resources/ui/src/pages/ExplorePage/ExplorePageV1.test.tsx Adds regression assertions that handler navigation ignores an unrelated router pathname and targets the correct Explore tab.
openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.ts Extracts a deterministic Explore-tab pathname helper and reuses it in the existing full-path builder.
openmetadata-ui/src/main/resources/ui/src/utils/RouterUtils.test.ts Verifies canonical Explore path generation and independence from the browser's current location.

Sequence Diagram

sequenceDiagram
  participant User
  participant Handler as Explore handler
  participant Routes as Canonical Explore routes
  participant Router
  User->>Handler: Change filter, sort, tree, or deleted state
  Handler->>Routes: Build /explore/:tab or /explore
  Routes-->>Handler: Absolute Explore pathname
  Handler->>Router: "navigate({ pathname, search })"
  Router-->>User: Remain on Explore with updated query
Loading

Reviews (12): Last reviewed commit: "fix(explore): use static ROUTES.EXPLORE ..." | Re-trigger Greptile

… redirects

`handleSortValueChange`, `handleSortOrderChange`, `handleQuickFilterChange`,
`handleTreeSelect`, and `handleShowDeletedChange` in ExplorePageV1 all called
`navigate({ search: ... })` with no `pathname`. That's a relative navigation
resolved against the router's current route-match context rather than
`window.location.pathname` at click time, and that context can lag a
pushState fired moments earlier elsewhere in the app. When it does, one of
these handlers ends up merging its search params onto a completely different
page's pathname instead of Explore's, producing URLs like
`/context-center/dashboard?browsePath=...` and silently dropping the user
onto whatever page happened to be current a moment before.

Passing an explicit `pathname: location.pathname` (already available via
`useCustomLocation()` in this component) removes the reliance on relative
resolution entirely, matching the pattern `handleSearchIndexChange` already
used safely via `getExplorePath()`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@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.

@github-actions github-actions Bot added the UI UI specific issues label Aug 17, 2026
@github-actions

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!

@shrabantipaul-collate shrabantipaul-collate added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Aug 17, 2026
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 66%
66.86% (79929/119540) 51.25% (48778/95161) 52.26% (14614/27963)

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — workflow failed

Validated commit 90398e2ae9c3b58df87422b9283ff7e24a9f1d2b in Playwright run 32119281270, attempt 1.

✅ 501 passed · ❌ 49 failed · 🟡 0 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ❌ unmet · 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) 56m 48s

⏱️ Max setup 3m 6s · max shard execution 23m 36s · max shard-job elapsed before upload 27m 34s · reporting 27s

🌐 216.21 requests/attempt · 2.72 app boots/UI scenario · 5.30% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 216.21 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.72 per UI scenario (1688 boots / 620 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🔴 Shard chromium-01 127 15 0 0 0 0
🔴 Shard chromium-02 115 18 0 0 0 0
🔴 Shard chromium-03 109 15 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
🔴 Shard reindex-01 0 1 0 1 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

Genuine Failures (failed on all attempts)

Pages/Entity.spec.tsCertification Add Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-01)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 
Pages/Entity.spec.tsCertification Add Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('certification.pw-tier-rabbit87692b07-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('certification.pw-tier-rabbit87692b07-checkbox')�[22m 
Pages/Entity.spec.tsTag Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('pw-classification-bear7f38f427.pw-tier-sharkfcbfe75c-checkbox')�[22m 
Pages/Entity.spec.tsGlossary Term Add, Update and Remove (shard chromium-02)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeChecked�[2m(�[22m�[2m)�[22m failed  Locator: getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox') Expected: checked Timeout: 15000ms Error: element(s) not found  Call log: �[2m  - Expect "toBeChecked" with timeout 15000ms�[22m �[2m  - waiting for getByTestId('"pw%\'03cf565a.bold553db6fa"."pw.4e05edd5%pandae12f3e0c"-checkbox')�[22m 

... and 19 more failures

📦 Download artifacts

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

…alls

Address review feedback: passing location.pathname explicitly still reads
router location state, which is the same class of value the original bug
was caused by resolving incorrectly. Extract getExploreTabPath (the same
ROUTES.EXPLORE_WITH_TAB-based construction getExplorePath already used
safely) and use it in all 5 handlers instead, so none of them depend on
the router's location/route-match context at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 9 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), 9 warning(s) across 3 changed file(s).

Count Rule
5 react-hooks/exhaustive-deps
2 @typescript-eslint/no-non-null-assertion
2 openmetadata-imports/no-lower-layer-page-imports
All findings
Location Rule Message
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:232:7 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'navigate' and 'tabsInfo'. Either include them or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:245:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:271:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:310:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'tabsInfo'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:600:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'performFetch'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.test.tsx:146:7 @typescript-eslint/no-non-null-assertion Forbidden non-null assertion.
🟡 src/pages/ExplorePage/ExplorePageV1.test.tsx:188:7 @typescript-eslint/no-non-null-assertion Forbidden non-null assertion.
🟡 src/utils/RouterUtils.ts:49: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/utils/RouterUtils.ts:50: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.

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

make ui-checkstyle-changed

Shrabanti Paul and others added 2 commits August 17, 2026 18:36
…ependence

- RouterUtils.test.ts: unit tests for getExploreTabPath, including a
  regression guard that its output does not depend on window.location.
- ExplorePageV1.test.tsx: assert the pathname on every navigate() call
  (quick filter, tree select, show-deleted, sort value, sort order) now
  matches getExploreTabPath(tab). Adds a dedicated regression test that
  sets useCustomLocation to an unrelated stale pathname
  (/context-center/dashboard) and confirms the quick-filter navigation
  still targets Explore — the exact failure mode this fix addresses.
  Also adds first-time coverage for the two sort handlers, which had none.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chirag-madlani
chirag-madlani previously approved these changes Aug 17, 2026
On the bare /explore route (no :tab segment), useRequiredParams returns
undefined for tab.  getExploreTabPath(undefined) produces '/explore/'
(trailing slash), which is a pathname change from '/explore' and fires
SearchDropdown's close-on-navigate useEffect, collapsing the filter
dropdown before checkCheckboxStatus can assert on it.

When tab is present the existing getExploreTabPath(tab) logic still
applies — it avoids the stale route-match-context race that the PR was
originally fixing.  When tab is absent there is no ambiguous context,
so location.pathname is the correct, safe fallback.

Fixes Playwright Entity spec failures: Certification Add Remove,
Tag Add/Update/Remove, Glossary Term Add/Update/Remove, and the
SearchSeparation reindex suite — all caused by the filter dropdown
closing mid-assertion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

…pathname

The previous fallback (location.pathname when tab is absent) could still
be stale if React Router's location state reflected a different page at
the moment the handler fired — the same class of race the rest of the
fix was already guarding against.

ROUTES.EXPLORE is a module-level constant ('/explore'), completely
independent of all router state, so the pathname used for bare-route
navigations is never derived from anything that can lag.

Addresses Greptile review comment on PR #31632.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gitar-bot

gitar-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes random redirect bugs on the Explore page by using explicit absolute pathnames on navigate calls and adding regression test coverage.

Options

Display: compact → Showing less information.

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

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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants