Skip to content

AI app mode: observability links fall back to classic Data Quality / test case pages #33502

Description

@ShaileshParmar11

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

  1. Log in as admin to the OSS UI and switch to AI mode (profile menu → interface mode AI). sessionStorage.omAppMode now has mode "ai".
  2. Open /observability/data-quality. The AI Data Quality page loads.
  3. Click the Test Cases tab. The URL changes to /data-quality/test-cases and the /observability prefix is gone.
  4. 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

  • Collate: simplify ObservabilityRouterClassCollate, because OSS isEmbeddedMode() now matches isAskCollateExperienceActive(). Remove the path overrides, then remove the override check in withAppModePrefix.
  • Some callers build classic paths straight from RouterUtils and skip the router class, so they can still leave AI mode. Examples: DimensionalityTab.tsx, ContractQualityCard.component.tsx, EntityUtilClassBase / EntityLinkUtils for test case entity links, and TaskNavigationUtils.ts.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

UIUI specific issuesbugSomething isn't workingdata quality

Type

No type

Projects

  • Status
    Release Backlog 🚧

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions