Detail Bug Report
https://app.detail.dev/org_3377c26d-da48-4ccd-b83a-22c542f4fe83/bugs/bug_b55b6202-007d-490f-aa2e-bf52a1e9f162
Introduced in #31911 by @karanh37 on Aug 29, 2026
Summary
- Context:
SubPanel.tsx and SubRail.tsx are the expanded/collapsed views of the ai-shell sub-nav. The collapsed sub-rail is the default sub-mode surface (subCollapsed initialises to true, Sidebar.tsx:57-58).
- Bug: The collapsible-sub-rail builder in
Sidebar.tsx:159 wires onClick: () => item.path && navigate(item.path) for every rail item and never calls emitIntent. SubRail.tsx:57-76 renders items without an href (where item.href is item.path) as a plain <button onClick={item.onClick}> with data-testid="ask-sub-rail-item-<key>". For the two intent-only SubNavItems in observability.module.tsx (add-test-case, add-bundle-suite), item.path is undefined and item.intent is set but never read — so the visible CTA renders as a labeled, aria-labelled, clickable chip that performs no action when clicked.
- Actual vs. expected: Clicking
+ Add Test Case (or + Add Bundle Suite) in the collapsed sub-rail should open the corresponding create drawer — the route layout registers useIntent listeners for exactly that (ObservabilityLayout.tsx:37-46). Instead the chip does nothing: no drawer, no navigation, no feedback. A clickable chip that performs no action is a defect.
- Impact: The defect only manifests in AI app mode for users who are seeing the collapsed sub-rail (default state, persisted per-browser via
localStorage). For that cohort, the two Observability create CTAs in the sub-rail are dead controls; other create affordances on the page may still exist depending on the active Data Quality tab.
Code with Bug
openmetadata-ui/src/main/resources/ui/src/components/platform/ai-shell/Sidebar/Sidebar.tsx
const railItem: RailItem = {
key: item.key,
icon,
activeIcon: item.railActiveIcon ?? item.activeIcon,
label: t(item.railLabelKey ?? item.labelKey),
href: item.path,
onClick: () => item.path && navigate(item.path), // <-- BUG 🔴 ignores item.intent; intent-only items have no path so click is a no-op
isActive: activeKey === item.key,
};
openmetadata-ui/src/main/resources/ui/src/components/platform/ai-shell/Sidebar/SubRail.tsx
<button aria-label={item.label} className={itemClassName}
data-testid={`ask-sub-rail-item-${item.key}`} type="button"
onClick={item.onClick}>
<Icon height={20} width={20} />
</button>
Explanation
Two Observability sub-nav items are defined as intent-only actions (no path) in openmetadata-ui/src/main/resources/ui/src/components/observability/ObservabilityModule/observability.module.tsx:
{
key: 'add-test-case',
icon: Plus,
labelKey: 'label.add-test-case',
emphasized: true,
intent: Intent.AddTestCase,
},
{
key: 'add-bundle-suite',
icon: Plus,
labelKey: 'label.add-bundle-suite',
emphasized: true,
intent: Intent.AddBundleSuite,
requiredPermission: {
resource: ResourceEntity.TEST_SUITE,
operation: Operation.Create,
},
},
In the expanded view, SubPanel.tsx handles these correctly by emitting item.intent before attempting navigation. In the collapsed rail, Sidebar.tsx only navigates when item.path exists, so intent-only items attach an onClick that always short-circuits and does nothing. ObservabilityLayout.tsx already registers useIntent listeners that open the corresponding drawers, so wiring the rail click to emit the intent fixes the broken behavior.
Codebase Inconsistency
openmetadata-ui/src/main/resources/ui/src/components/platform/ai-shell/Sidebar/SubPanel.tsx (reference behavior):
const handleItemClick = useCallback(
(item: SubNavItem) => {
if (item.intent) {
emitIntent(item.intent);
return;
}
if (item.path) {
navigate(item.path);
}
},
[navigate]
);
This shows the intended click semantics for the same SubNavItem data model; the rail should behave consistently.
Recommended Fix
Update the sub-rail item builder in Sidebar.tsx to mirror SubPanel’s click behavior by emitting item.intent when present, otherwise navigating to item.path. Also mirror SubPanel’s requiredPermission filtering for parity; without it, enabling intent emission would open the Bundle Suite drawer for users who lack TEST_SUITE.Create (the drawer itself does not re-check that permission).
History
This bug was introduced in commit 2807684. The port that created the OSS AI-mode Sidebar wrote the sub-rail click handler as () => item.path && navigate(item.path) (no intent branch), making intent-only items a silent no-op in the collapsed rail.
Detail Bug Report
https://app.detail.dev/org_3377c26d-da48-4ccd-b83a-22c542f4fe83/bugs/bug_b55b6202-007d-490f-aa2e-bf52a1e9f162
Introduced in #31911 by @karanh37 on Aug 29, 2026
Summary
SubPanel.tsxandSubRail.tsxare the expanded/collapsed views of the ai-shell sub-nav. The collapsed sub-rail is the default sub-mode surface (subCollapsedinitialises totrue,Sidebar.tsx:57-58).Sidebar.tsx:159wiresonClick: () => item.path && navigate(item.path)for every rail item and never callsemitIntent.SubRail.tsx:57-76renders items without anhref(whereitem.hrefisitem.path) as a plain<button onClick={item.onClick}>withdata-testid="ask-sub-rail-item-<key>". For the two intent-onlySubNavItems inobservability.module.tsx(add-test-case,add-bundle-suite),item.pathisundefinedanditem.intentis set but never read — so the visible CTA renders as a labeled, aria-labelled, clickable chip that performs no action when clicked.+ Add Test Case(or+ Add Bundle Suite) in the collapsed sub-rail should open the corresponding create drawer — the route layout registersuseIntentlisteners for exactly that (ObservabilityLayout.tsx:37-46). Instead the chip does nothing: no drawer, no navigation, no feedback. A clickable chip that performs no action is a defect.localStorage). For that cohort, the two Observability create CTAs in the sub-rail are dead controls; other create affordances on the page may still exist depending on the active Data Quality tab.Code with Bug
openmetadata-ui/src/main/resources/ui/src/components/platform/ai-shell/Sidebar/Sidebar.tsxopenmetadata-ui/src/main/resources/ui/src/components/platform/ai-shell/Sidebar/SubRail.tsxExplanation
Two Observability sub-nav items are defined as intent-only actions (no
path) inopenmetadata-ui/src/main/resources/ui/src/components/observability/ObservabilityModule/observability.module.tsx:In the expanded view,
SubPanel.tsxhandles these correctly by emittingitem.intentbefore attempting navigation. In the collapsed rail,Sidebar.tsxonly navigates whenitem.pathexists, so intent-only items attach anonClickthat always short-circuits and does nothing.ObservabilityLayout.tsxalready registersuseIntentlisteners that open the corresponding drawers, so wiring the rail click to emit the intent fixes the broken behavior.Codebase Inconsistency
openmetadata-ui/src/main/resources/ui/src/components/platform/ai-shell/Sidebar/SubPanel.tsx(reference behavior):This shows the intended click semantics for the same
SubNavItemdata model; the rail should behave consistently.Recommended Fix
Update the sub-rail item builder in
Sidebar.tsxto mirrorSubPanel’s click behavior by emittingitem.intentwhen present, otherwise navigating toitem.path. Also mirrorSubPanel’srequiredPermissionfiltering for parity; without it, enabling intent emission would open the Bundle Suite drawer for users who lackTEST_SUITE.Create(the drawer itself does not re-check that permission).History
This bug was introduced in commit 2807684. The port that created the OSS AI-mode Sidebar wrote the sub-rail click handler as
() => item.path && navigate(item.path)(no intent branch), making intent-only items a silent no-op in the collapsed rail.