Repository navigation
fix(ui): modal and right panel reopen immediately after close - #32124
Conversation
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]>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
❌ UI Checkstyle Failed❌ ESLint + Prettier + Organise Imports (src)One or more source files have linting or formatting issues. ❌ Core Components - I18n SyncCore-components ❌ Tailwind AuditHardcoded Tailwind values found. Use a design-system utility (run ❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
✅ Playwright Results — workflow succeededValidated commit ✅ 723 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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:
🟡 3 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review ✅ ApprovedFixes 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. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Port of #32097 to
2.0Describe your changes
Closing the view modal (Context Center Memories) or the document preview panel (Context Center Documents) caused it to immediately reopen. A
useEffectthat 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 momentsearchParamsstill 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
searchParamschanges (URL navigation), not on modal/panel state changes.Type of change
High-level design
N/A — small change, identical to #32097.
Tests
Playwright (UI) tests
ContextCenterMemories.spec.ts—expect(dialog).not.toBeVisible()+expect(page).not.toHaveURL(/memory=/)after cancel clickContextCenterDocument.spec.ts—panel.waitFor({ state: 'hidden' })before the existingnot.toBeVisible()assertionGreptile 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.
HelmetProviderto the Data Marketplace test renderer.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (4): Last reviewed commit: "Merge branch '2.0' into port-pr-32097-to..." | Re-trigger Greptile