Skip to content

fix(ui): modal and right panel reopen immediately after close - #32124

Merged
Rohit0301 merged 4 commits into
2.0from
port-pr-32097-to-2.0
Aug 27, 2026
Merged

Rohit0301 merged 4 commits into
2.0from
port-pr-32097-to-2.0

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Port of #32097 to 2.0

Describe your changes

Closing the view modal (Context Center Memories) or the document preview panel (Context Center Documents) caused it to immediately reopen. A useEffect that handles URL-driven panel opening had the open-state variable (isViewModalOpen / previewFile) in its dependency array. When the user closed the panel, that variable changed, re-triggering the effect. At that moment searchParams still held the URL param (router navigation hadn't rendered yet), so the guard condition passed and the modal/panel reopened.

Fix: remove the open-state variable from each effect's dependency array so the effect only fires on searchParams changes (URL navigation), not on modal/panel state changes.

Type of change

  • Bug fix

High-level design

N/A — small change, identical to #32097.

Tests

Playwright (UI) tests

  • Added Playwright regression assertions (same as fix(ui): modal and right panel reopen immediately after close #32097).
    • ContextCenterMemories.spec.ts — expect(dialog).not.toBeVisible() + expect(page).not.toHaveURL(/memory=/) after cancel click
    • ContextCenterDocument.spec.ts — panel.waitFor({ state: 'hidden' }) before the existing not.toBeVisible() assertion

Greptile Summary

This PR prevents Context Center document previews and memory modals from reopening immediately after close by removing local open state from URL-driven effect dependencies.

  • Adds Playwright assertions covering modal closure and URL cleanup.
  • Adds HelmetProvider to the Data Marketplace test renderer.

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/ContextCenterPage/ContextCenterDocumentsPage/ContextCenterDocumentsPage.tsx Removes preview state from the URL-driven effect dependencies so closing the panel does not immediately trigger reopening.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx Removes modal-open state from the URL-driven effect dependencies so closing the memory dialog does not immediately trigger reopening.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterDocument.spec.ts Waits explicitly for the document preview panel to become hidden after closing it.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterMemories.spec.ts Verifies that cancellation closes the memory dialog and removes the memory query parameter.
openmetadata-ui/src/main/resources/ui/src/pages/DataMarketplacePage/DataMarketplacePage.component.test.tsx Wraps the tested page with the required asynchronous Helmet context provider.

Reviews (4): Last reviewed commit: "Merge branch '2.0' into port-pr-32097-to..." | Re-trigger Greptile

Port of #32097 to the 2.0 branch.

Closing the view modal (memories) or preview panel (documents) triggered
a useEffect re-run because the open-state variable was in the dependency
array. At that moment searchParams still held the URL param, so the guard
passed and the modal/panel reopened.

Fix: remove isViewModalOpen / previewFile from the dependency arrays so
these effects only fire on URL (searchParams) changes.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@Rohit0301
Rohit0301 requested a review from a team as a code owner August 26, 2026 17:22
@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 26, 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!

@Rohit0301 Rohit0301 self-assigned this Aug 26, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ ESLint + Prettier + Organise Imports (src)

One or more source files have linting or formatting issues.

❌ Core Components - I18n Sync

Core-components t() keys, locale files, or language-set are out of sync. Run yarn check-i18n-all locally.

❌ Tailwind Audit

Hardcoded Tailwind values found. Use a design-system utility (run yarn tw-audit:report for the token each value maps to).

❌ Antd + Less Deprecation Guard

A new antd import or new .less file was added. Use UntitledUI + Tailwind for new work.

Affected files

at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {


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

make ui-checkstyle-changed

@github-actions

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 31448c39090a3dbaa46b3fcbe1f0dd58c3622938 in Playwright run 33056111985, attempt 1.

✅ 723 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 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) 53m 17s

⏱️ Max setup 3m 9s · max shard execution 18m 4s · max shard-job elapsed before upload 21m 44s · reporting 4s

🌐 193.26 requests/attempt · 2.65 app boots/UI scenario · 19.65% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 19.65% (convergence target: at most 15%).
  • Application boot ratio was 2.65 per UI scenario (2068 boots / 779 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 134 0 0 0 0 0
🟡 Shard chromium-02 165 0 3 0 0 0
✅ Shard chromium-03 133 0 0 0 0 0
✅ Shard chromium-04 137 0 0 0 0 0
✅ Shard data-asset-rules-01 61 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 ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 3 flaky test(s) (passed on retry)
  • Features/ContextCenterMemories.spec.ts › adding a linked asset in edit mode shows entity badge on the row (shard chromium-02, 1 retry)
  • Features/ContextCenterMemories.spec.ts › typing the linked table name in the asset search returns it as a result (shard chromium-02, 1 retry)
  • Features/ContextCenterMemories.spec.ts › navigating to page 2 loads a different set of memory rows (shard chromium-02, 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

@github-actions

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 67%
67.06% (80418/119910) 51.55% (49265/95553) 52.43% (14691/28016)

@github-actions

Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@gitar-bot

gitar-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes an issue where Context Center memory modals and document preview panels would immediately reopen after closing by removing the open-state variables from the URL effect dependency arrays. No issues found.

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

@sonarqubecloud

Copy link
Copy Markdown

@Rohit0301
Rohit0301 merged commit 506d3cf into 2.0 Aug 27, 2026
86 of 89 checks passed
@Rohit0301
Rohit0301 deleted the port-pr-32097-to-2.0 branch August 27, 2026 10:32

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants