fix(alerting): fix breadcrumb for Alert Activity page

- Use conditional navId based on feature flag (alert-activity for V2, alert-alerts for legacy)
- Remove pageNav.text to avoid extra breadcrumb level
- Use renderTitle instead to set page title without affecting breadcrumb
- Fixes breadcrumb showing 'Page not found > Alerts' to 'Alerting > Alert Activity'
This commit is contained in:
Alejandro Fraenkel
2026-01-08 12:43:24 +01:00
parent a59df66e21
commit 2432756be8
@@ -3,20 +3,22 @@ import { UrlSyncContextProvider } from '@grafana/scenes';
import { withErrorBoundary } from '@grafana/ui';
import { AlertingPageWrapper } from '../components/AlertingPageWrapper';
import { shouldUseAlertingNavigationV2 } from '../featureToggles';
import { TriageScene, triageScene } from './scene/TriageScene';
export const TriagePage = () => {
const useV2Nav = shouldUseAlertingNavigationV2();
const navId = useV2Nav ? 'alert-activity' : 'alert-alerts';
return (
<AlertingPageWrapper
navId="alert-alerts"
navId={navId}
subTitle={t(
'alerting.pages.triage.subtitle',
'See what is currently alerting and explore historical data to investigate current or past issues.'
)}
pageNav={{
text: t('alerting.pages.triage.title', 'Alerts'),
}}
renderTitle={() => t('alerting.pages.triage.title', 'Alert Activity')}
>
<UrlSyncContextProvider scene={triageScene} updateUrlOnInit={true} createBrowserHistorySteps={true}>
<TriageScene key={triageScene.state.key} />