fix(ui): closing version drawer no longer appends tab to entity URL#30465
fix(ui): closing version drawer no longer appends tab to entity URL#30465Rohit0301 wants to merge 6 commits into
Conversation
The backHandler in DatabaseSchemaVersionPage, DatabaseVersionPage, and EntityVersionPage was passing the version-page tab to getEntityDetailsPath, causing the entity detail URL to include a trailing tab segment (e.g. /schema) after closing the drawer. This left the entity page without its default tab selected. Removed the tab argument so the back navigation always lands on the clean entity URL. Also adds Playwright tests covering the close-and-return flow for Table, Database, and DatabaseSchema entities. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ 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! |
✅ Playwright Results — workflow succeededValidated commit ✅ 555 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 5 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) 48m 44s ⏱️ Max setup 2m 59s · max shard execution 15m 47s · max shard-job elapsed before upload 18m 59s · reporting 4s 🌐 205.96 requests/attempt · 2.93 app boots/UI scenario · 15.63% 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 |
…on drawer tests toHaveURL exact match failed because the app appends ?showDeletedTables=false after closing the version drawer. Use a regex that checks only the pathname so query parameters don't cause false negatives. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entity FQNs contain dots which become . wildcards in an unescaped RegExp, weakening the assertion. Escape the pathname with the standard regex-escape pattern so dots and other metacharacters are matched literally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review ✅ Approved 1 resolved / 1 findingsRemoves the version-page tab argument from entity back handlers to ensure closing the version drawer returns to a clean URL, and adds corresponding Playwright test coverage. No issues found. ✅ 1 resolved✅ Edge Case: entityPathname interpolated into RegExp without escaping
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Describe your changes:
Screen.Recording.2026-07-24.at.4.25.53.PM.mov
Closing the version history drawer on Database, DatabaseSchema, and all other entity pages was navigating to a URL with a trailing tab segment (e.g.
/databaseSchema/fqn/schema) instead of the clean entity URL. This caused the entity detail page to not select its default tab. The bug was introduced in March 2024 (PR #15404) when entity-specific routes were consolidated into generic route helpers —backHandlerstarted forwarding the version-pagetabparam togetEntityDetailsPath, which was never correct.I removed the
tabargument frombackHandlerinDatabaseSchemaVersionPage,DatabaseVersionPage, andEntityVersionPageso the back navigation always lands on the clean entity URL, letting the page fall back to its own default tab.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/.../ui/playwright/for UI changes.playwright/e2e/VersionPages/EntityVersionPages.spec.tsManual testing performed
database/Another%20Hybrid%20Runner%20Redshift%202.dev.../versions/0.1/schema/schemaand the default Tables tab was selectedUI screen recording / screenshots:
Not applicable.
Checklist:
Greptile Summary
Fixes version-drawer close navigation to return to clean entity URLs.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failures remain.
Important Files Changed
Reviews (6): Last reviewed commit: "Merge branch 'main' into version-drawer-..." | Re-trigger Greptile