Fixes 33256: Preserve ontology graph across Studio modes - #33257
Fixes 33256: Preserve ontology graph across Studio modes#33257harshach wants to merge 2 commits into
Conversation
❌ 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 |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated 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 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 |
Code Review ✅ ApprovedPreserves the ontology graph across Studio mode switches (Query/AI navigation) by keeping the explorer mounted while other surfaces are active, eliminating unnecessary catalog refetches. Comprehensive test coverage includes unit, integration, and Playwright tests with 70 passing tests and 95.95% line coverage on the modified component. No issues found. OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|
| Count | Rule |
|---|---|
| 1 | openmetadata-imports/no-internal-barrel-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/pages/OntologyExplorerPage/OntologyExplorerPage.tsx:27:1 |
openmetadata-imports/no-internal-barrel-imports |
Import the internal module directly instead of its index barrel so unrelated siblings do not enter the bundle graph. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
|
✅ Playwright Results — workflow succeededValidated commit ✅ 607 passed · ❌ 0 failed · 🟡 0 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) 46m 41s ⏱️ Max setup 5m 46s · max shard execution 17m 9s · max shard-job elapsed before upload 20m 27s · reporting 4s 🌐 219.93 requests/attempt · 2.07 app boots/UI scenario · 5.93% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |



Describe your changes:
Fixes #33256
Keep the loaded Ontology Studio explorer mounted across Query/AI navigation so the recorded View → Edit → Query → Edit → View sequence preserves the graph, search and counts without refetching the catalog; retain existing refresh behavior after Model workbench changes and library installations.
Type of change:
High-level design:
N/A — small, four-file fix: a stable, hidden/inaccessible explorer container while other read-only Studio surfaces are active, without a new cache or API changes.
Tests:
Use cases covered
Unit and frontend integration tests
OntologyExplorerPage.test.tsx: component lifetime and search preservationOntologyExplorerPage.integration.test.tsx: real explorer, data hook and graph builders with API/canvas boundaries mockedOntologyExplorerPage.tsx: 95.95% line coverageBackend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Features/OntologyStudio.spec.ts: 8/8 passing against this checkout's Vite server and local backendManual testing performed
Browser-driven replay on
127.0.0.1:3000, verified to serve this checkout, with 260 synthetic terms and 112 relations: the recorded sequence preserved the graph and counts, with catalog request count unchanged after the fix versus 21 additional requests before it.Additional checks
UI screen recording / screenshots:
TODO: attach the locally captured synthetic-data screenshots (
.context/ontology-before-switch.png,.context/ontology-edit-local.png); keeping this PR in draft until the required visual evidence is uploaded.Checklist:
Fixes <issue-number>: <short explanation>Fixes #33256