feat: extract ObservabilityRouterClassBase for extensible data quality and observability routing#27212
feat: extract ObservabilityRouterClassBase for extensible data quality and observability routing#27212ShaileshParmar11 merged 27 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces an ObservabilityRouterClassBase utility to centralize route generation for Data Quality and Observability Alerts pages, and migrates multiple components/tests to use it (likely to support embedded/Collate-specific routing overrides).
Changes:
- Added
ObservabilityRouterClassBasesingleton + unit tests for its base routing behavior. - Updated Data Quality and Observability Alerts UI navigation to use the new router abstraction.
- Updated Data Quality chart widget tests to mock the new router module instead of
RouterUtils.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.ts | Adds router class + default singleton to generate observability/data-quality paths. |
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.test.ts | Unit tests for base router behavior (embedded mode no-op + path generation). |
| openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx | Switches edit/add navigation to the new router abstraction. |
| openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx | Switches tab navigation path building to the new router abstraction. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx | Switches sub-tab navigation to use the new router abstraction. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx | Updates breadcrumb URL generation to use the new router abstraction. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx | Updates redirectPath destinations to use the new router abstraction. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/StatusByDimensionCardWidget/StatusByDimensionCardWidget.component.tsx | Updates widget redirectPath to use the new router abstraction. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.test.tsx | Updates mocks/assertions to target the new router module. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.component.tsx | Uses the new router abstraction for navigation on segment click. |
Comments suppressed due to low confidence (1)
openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx:34
getDataQualityPagePathis still imported fromRouterUtilsbut is no longer used after switching toObservabilityRouterClassBase.getDataQualityPagePath(...). This will triggerno-unused-vars/TypeScript lint errors; remove the unused import (or revert to using it).
import {
getDataQualityPagePath,
getTestCaseDetailPagePath,
getTestSuitePath,
} from '../../utils/RouterUtils';
🟡 Playwright Results — all passed (18 flaky)✅ 3693 passed · ❌ 0 failed · 🟡 18 flaky · ⏭️ 89 skipped
🟡 18 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 |
There was a problem hiding this comment.
Pull request overview
Introduces a new ObservabilityRouterClassBase singleton (following the existing ClassBase pattern) to centralize route generation for Data Quality and Observability Alerts navigation, enabling downstream overrides (e.g., Collate embedded mode) to remap these paths.
Changes:
- Added
ObservabilityRouterClassBasesingleton with routing helpers and base embedded-mode stubs. - Refactored Data Quality and Observability Alerts UI navigation to use the new router instance.
- Updated chart widget test mocking to target the new router module.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.ts | Adds the new router ClassBase + exported singleton instance for observability/data-quality routes. |
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.test.ts | Adds unit tests for the new router methods. |
| openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx | Switches add/edit navigation to use observabilityRouterClassBase paths. |
| openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx | Routes tab navigation through observabilityRouterClassBase.getDataQualityPagePath(). |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx | Routes sub-tab navigation through the new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx | Uses the new router instance for breadcrumb URL generation. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx | Updates redirect links to use observabilityRouterClassBase for Data Quality paths. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/StatusByDimensionCardWidget/StatusByDimensionCardWidget.component.tsx | Updates redirect path generation to go through the router singleton. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.component.tsx | Updates navigation to Test Suites to use the router singleton. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.test.tsx | Updates Jest mock to mock the new router module and validate calls. |
… navigation and data quality paths
…penMetadata into supporting-PR-DO
…kEntityImportPage, and TestSuiteDetailsPage
There was a problem hiding this comment.
Pull request overview
This PR introduces an ObservabilityRouterClassBase singleton (following the existing *ClassBase pattern) to centralize route generation for Data Quality and Observability Alerts pages, enabling Collate overrides to remap paths in embedded contexts. It then migrates relevant UI navigation code and updates/creates unit tests to use the new router instance.
Changes:
- Added
ObservabilityRouterClassBasesingleton + base methods for Data Quality and Observability Alerts routing. - Updated multiple Data Quality / Observability pages and widgets to use
observabilityRouterClassBaseinstead of directRouterUtilscalls. - Added a new unit test suite for the router and updated an existing chart widget test mock.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.ts | New router singleton wrapper around existing routing utilities/constants. |
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.test.ts | Adds tests for router methods and singleton behavior. |
| openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx | Updates breadcrumb route generation to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx | Updates post-delete navigation and breadcrumbs to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx | Updates add/edit/details navigation to go through new router instance. |
| openmetadata-ui/src/main/resources/ui/src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx | Updates Data Quality breadcrumb paths to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx | Updates tab navigation to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.tsx | Routes observability edit/details navigation through the new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx | Updates sub-tab navigation to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx | Updates breadcrumb URL to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx | Updates redirectPath pathname generation to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/StatusByDimensionCardWidget/StatusByDimensionCardWidget.component.tsx | Updates redirectPath pathname generation to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.component.tsx | Updates click navigation to use new router instance. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.test.tsx | Updates Jest mock to target the new router module. |
… ObservabilityRouterClassBase
…gePieChartWidget test
Code Review ✅ Approved 1 resolved / 1 findingsObservabilityRouterClassBase extraction improves routing extensibility. The naming convention violation was resolved by correcting the PascalCase import. ✅ 1 resolved✅ Quality: Instance imported with PascalCase, breaking codebase convention
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
There was a problem hiding this comment.
Pull request overview
This PR introduces a new ObservabilityRouterClassBase singleton (following the existing *ClassBase pattern) to centralize route generation for Data Quality and Observability Alerts pages, enabling downstream overrides (e.g., AskCollate embedded routing) without touching feature components.
Changes:
- Added
ObservabilityRouterClassBase+ unit tests to encapsulate Data Quality + Observability Alerts route helpers and embedded-mode hooks. - Refactored Data Quality and Observability Alerts-related pages/components to use
observabilityRouterClassBaseinstead of directRouterUtils/ROUTEScalls. - Updated a chart widget unit test to mock the new router module and adjusted
AlertDetailsPagehook dependency arrays to usenavigate.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.ts | Adds router singleton wrapping Data Quality + Observability Alerts route generation. |
| openmetadata-ui/src/main/resources/ui/src/utils/ObservabilityRouterClassBase.test.ts | Adds unit tests validating base routing behavior and singleton export. |
| openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteIngestionPage/TestSuiteIngestionPage.tsx | Switches breadcrumb base URL to router singleton. |
| openmetadata-ui/src/main/resources/ui/src/pages/TestSuiteDetailsPage/TestSuiteDetailsPage.component.tsx | Uses router singleton for navigation + breadcrumb URLs back to Data Quality tabs. |
| openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx | Routes details/edit/add via router singleton; tightens descriptionTableObject typing. |
| openmetadata-ui/src/main/resources/ui/src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx | Updates Data Quality breadcrumb destinations via router singleton. |
| openmetadata-ui/src/main/resources/ui/src/pages/DataQuality/DataQualityPage.tsx | Uses router singleton for tab-change navigation. |
| openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.tsx | Uses router singleton for observability edit/details paths; fixes hook deps to track navigate state. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestSuite/TestSuiteList/TestSuites.component.tsx | Uses router singleton for sub-tab navigation routing. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCases/TestCases.component.tsx | Uses router singleton for Data Quality breadcrumb URL. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/DataQualityDashboard/DataQualityDashboard.component.tsx | Uses router singleton for dashboard widget redirect links. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/StatusByDimensionCardWidget/StatusByDimensionCardWidget.component.tsx | Uses router singleton for widget redirect link. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.component.tsx | Uses router singleton for segment-click navigation. |
| openmetadata-ui/src/main/resources/ui/src/components/DataQuality/ChartWidgets/DataAssetsCoveragePieChartWidget/DataAssetsCoveragePieChartWidget.test.tsx | Updates mocks/assertions to target the new router singleton module. |
|



Summary
ObservabilityRouterClassBase— a singleton instance (following the existing ClassBase pattern) that centralizes route generation for Data Quality and Observability Alerts pages.ObservabilityRouterClassCollate) to remap navigation paths when pages are embedded inside AskCollate.RouterUtilsfunction calls.Architecture
ObservabilityRouterClassBasefollows the same singleton instance + ClassBase/ClassCollate pattern used throughout the codebase (e.g.,DataQualityClassBase,LogsClassBase). It exports a singleton instance as the default export and the class as a named export for extension.Changes
ObservabilityRouterClassBase.tsgetDataQualityPagePath,getObservabilityAlertsEditPath,getAddObservabilityAlertsPath,setEmbeddedMode,isEmbeddedModeObservabilityRouterClassBase.test.tsDataQualityPageobservabilityRouterClassBase.getDataQualityPagePathObservabilityAlertsPageobservabilityRouterClassBasemethodsDataQualityDashboardobservabilityRouterClassBaseStatusByDimensionCardWidgetobservabilityRouterClassBaseDataAssetsCoveragePieChartWidgetobservabilityRouterClassBaseTestCases.componentobservabilityRouterClassBaseTestSuites.componentobservabilityRouterClassBaseDataAssetsCoveragePieChartWidget.testjest.requireMock)Test plan
ObservabilityRouterClassBase.test.ts— all 7 unit tests passDataAssetsCoveragePieChartWidget.test.tsx— updated mock passesSummary by Gitar
ObservabilityRouterClassBasetests to use/alert/path structure with a defaultconfigurationtab.AlertDetailsPageby replacing stalehistoryreferences withnavigateand correctly tracking dependency state.This will update automatically on new commits.