Summary
In AI app mode, links built by ObservabilityRouterClassBase send you to the classic observability routes. After your first click inside the app, you leave the AI /observability/* pages.
Steps to reproduce
- Log in as admin to the OSS UI and switch to AI mode (profile menu → interface mode AI).
sessionStorage.omAppMode now has mode "ai".
- Open
/observability/data-quality. The AI Data Quality page loads.
- Click the Test Cases tab. The URL changes to
/data-quality/test-cases and the /observability prefix is gone.
- Open a test case from the list. The link is
/test-case/<fqn>/test-case-results, so the classic IncidentManagerDetailPage loads inside the AI shell. The AI page is components/observability/TestCaseDetail/TestCaseDetail.tsx, and it is only routed at /observability/test-case/:fqn[/:tab].
Expected: the tab and the test case stay on /observability/data-quality/test-cases and /observability/test-case/<fqn>/test-case-results.
Actual: you land on classic routes, and anything that only exists on the AI page is missing (for example the Run now button).
Root cause
src/utils/ObservabilityRouterClassBase.ts always returns classic paths, whatever the app mode. Only Collate's override (ObservabilityRouterClassCollate) adds the /observability prefix, and it does so only in its embedded mode. #31911 moved the AI shell into OSS but did not move this prefixing, so OSS AI mode falls back to classic routes.
Affected callers include components/observability/DataQuality/DataQualityPage.tsx (tab navigation), the table in DataQualityTab.tsx used by the AI Test Cases tab, the breadcrumb in components/observability/TestCaseDetail/TestCaseDetail.tsx, and FailedTestCaseSampleData.component.tsx.
Fix
isEmbeddedMode() now returns true when useAppModeStore.currentMode === AI_APP_MODE || isAppModeSessionActive(). This is the same check AppRouter uses to render the AI shell.
- In that mode, these methods add the
/observability prefix: getDataQualityPagePath, getIncidentManagerPath, getTestSuitePath, getTestCaseDetailPagePath, getTestCaseVersionPath and getTestCaseDimensionsDetailPagePath. The test case incident task path is covered too, because it goes through getTestCaseDetailPagePath. Each prefixed path was checked against the routes in ObservabilityModule/observability.module.tsx.
- The alert paths already start with
/observability, so they are unchanged. The add and edit alert pages have no route of their own in AI mode, so the shell's classic fallback still serves them.
- Collate compatibility: Collate's override still adds the prefix on top of
super. To avoid /observability/observability/..., the base class skips the prefix for any path method a subclass overrides.
- Direct classic URLs opened in AI mode (for example a bookmarked
/test-case/<fqn>) are not redirected. They still render through the shell's classic fallback, like every other classic route.
Follow-ups
Tests
- Unit tests in
src/utils/ObservabilityRouterClassBase.test.ts cover classic and AI mode, the app-mode session predicate, unchanged alert paths, and no double prefix when a subclass overrides a method.
- A new Playwright test in
playwright/e2e/Features/DataQuality/TestCaseDetailsPage.spec.ts starts on the AI Data Quality page, opens the Test Cases tab, searches, and clicks a test case. It asserts that the page lands on /observability/test-case/.../test-case-results and that the AI detail page renders. Without the fix, it fails with /data-quality/test-cases.
Summary
In AI app mode, links built by
ObservabilityRouterClassBasesend you to the classic observability routes. After your first click inside the app, you leave the AI/observability/*pages.Steps to reproduce
sessionStorage.omAppModenow has mode"ai"./observability/data-quality. The AI Data Quality page loads./data-quality/test-casesand the/observabilityprefix is gone./test-case/<fqn>/test-case-results, so the classicIncidentManagerDetailPageloads inside the AI shell. The AI page iscomponents/observability/TestCaseDetail/TestCaseDetail.tsx, and it is only routed at/observability/test-case/:fqn[/:tab].Expected: the tab and the test case stay on
/observability/data-quality/test-casesand/observability/test-case/<fqn>/test-case-results.Actual: you land on classic routes, and anything that only exists on the AI page is missing (for example the Run now button).
Root cause
src/utils/ObservabilityRouterClassBase.tsalways returns classic paths, whatever the app mode. Only Collate's override (ObservabilityRouterClassCollate) adds the/observabilityprefix, and it does so only in its embedded mode. #31911 moved the AI shell into OSS but did not move this prefixing, so OSS AI mode falls back to classic routes.Affected callers include
components/observability/DataQuality/DataQualityPage.tsx(tab navigation), the table inDataQualityTab.tsxused by the AI Test Cases tab, the breadcrumb incomponents/observability/TestCaseDetail/TestCaseDetail.tsx, andFailedTestCaseSampleData.component.tsx.Fix
isEmbeddedMode()now returns true whenuseAppModeStore.currentMode === AI_APP_MODE || isAppModeSessionActive(). This is the same checkAppRouteruses to render the AI shell./observabilityprefix:getDataQualityPagePath,getIncidentManagerPath,getTestSuitePath,getTestCaseDetailPagePath,getTestCaseVersionPathandgetTestCaseDimensionsDetailPagePath. The test case incident task path is covered too, because it goes throughgetTestCaseDetailPagePath. Each prefixed path was checked against the routes inObservabilityModule/observability.module.tsx./observability, so they are unchanged. The add and edit alert pages have no route of their own in AI mode, so the shell's classic fallback still serves them.super. To avoid/observability/observability/..., the base class skips the prefix for any path method a subclass overrides./test-case/<fqn>) are not redirected. They still render through the shell's classic fallback, like every other classic route.Follow-ups
ObservabilityRouterClassCollate, because OSSisEmbeddedMode()now matchesisAskCollateExperienceActive(). Remove the path overrides, then remove the override check inwithAppModePrefix.RouterUtilsand skip the router class, so they can still leave AI mode. Examples:DimensionalityTab.tsx,ContractQualityCard.component.tsx,EntityUtilClassBase/EntityLinkUtilsfor test case entity links, andTaskNavigationUtils.ts.Tests
src/utils/ObservabilityRouterClassBase.test.tscover classic and AI mode, the app-mode session predicate, unchanged alert paths, and no double prefix when a subclass overrides a method.playwright/e2e/Features/DataQuality/TestCaseDetailsPage.spec.tsstarts on the AI Data Quality page, opens the Test Cases tab, searches, and clicks a test case. It asserts that the page lands on/observability/test-case/.../test-case-resultsand that the AI detail page renders. Without the fix, it fails with/data-quality/test-cases.