diff --git a/app/src/components/settings/SettingsHome.tsx b/app/src/components/settings/SettingsHome.tsx index 364fe686f..66a6b526b 100644 --- a/app/src/components/settings/SettingsHome.tsx +++ b/app/src/components/settings/SettingsHome.tsx @@ -186,23 +186,6 @@ const SettingsHome = () => { onClick: () => navigateToSettings('notifications'), dangerous: false, }, - { - id: 'notification-routing', - title: 'Notification Routing', - description: 'AI importance scoring and orchestrator escalation for integration alerts', - icon: ( - - - - ), - onClick: () => navigateToSettings('notification-routing'), - dangerous: false, - }, { id: 'restart-tour', title: 'Restart Tour', diff --git a/app/src/components/settings/hooks/__tests__/useSettingsNavigation.test.tsx b/app/src/components/settings/hooks/__tests__/useSettingsNavigation.test.tsx new file mode 100644 index 000000000..d6fce1fc2 --- /dev/null +++ b/app/src/components/settings/hooks/__tests__/useSettingsNavigation.test.tsx @@ -0,0 +1,30 @@ +import { screen } from '@testing-library/react'; +import { describe, expect, test } from 'vitest'; + +import { renderWithProviders } from '../../../../test/test-utils'; +import { useSettingsNavigation } from '../useSettingsNavigation'; + +/** Renders breadcrumb labels so we can assert on the hook output. */ +const BreadcrumbProbe = () => { + const { breadcrumbs } = useSettingsNavigation(); + return
{breadcrumbs.map(b => b.label).join(' > ')}
; +}; + +describe('useSettingsNavigation breadcrumbs', () => { + test('notification-routing returns Settings > Developer Options', () => { + renderWithProviders(, { + initialEntries: ['/settings/notification-routing'], + }); + expect(screen.getByTestId('breadcrumbs')).toHaveTextContent('Settings > Developer Options'); + }); + + test('notifications returns Settings (top-level)', () => { + renderWithProviders(, { initialEntries: ['/settings/notifications'] }); + expect(screen.getByTestId('breadcrumbs')).toHaveTextContent('Settings'); + }); + + test('developer-options returns Settings (section page)', () => { + renderWithProviders(, { initialEntries: ['/settings/developer-options'] }); + expect(screen.getByTestId('breadcrumbs')).toHaveTextContent('Settings'); + }); +}); diff --git a/app/src/components/settings/hooks/useSettingsNavigation.ts b/app/src/components/settings/hooks/useSettingsNavigation.ts index 9af56622a..b4adbbfa7 100644 --- a/app/src/components/settings/hooks/useSettingsNavigation.ts +++ b/app/src/components/settings/hooks/useSettingsNavigation.ts @@ -214,15 +214,15 @@ export const useSettingsNavigation = (): SettingsNavigationHook => { case 'memory-debug': case 'intelligence': case 'webhooks-triggers': + case 'notification-routing': return [settingsCrumb, developerCrumb]; // Developer options section page case 'developer-options': return [settingsCrumb]; - // Notifications panels sit at the top level of Settings. + // Notifications panel sits at the top level of Settings. case 'notifications': - case 'notification-routing': return [settingsCrumb]; case 'home': diff --git a/app/src/components/settings/panels/DeveloperOptionsPanel.tsx b/app/src/components/settings/panels/DeveloperOptionsPanel.tsx index 271f6755a..6b97491f0 100644 --- a/app/src/components/settings/panels/DeveloperOptionsPanel.tsx +++ b/app/src/components/settings/panels/DeveloperOptionsPanel.tsx @@ -152,6 +152,22 @@ const developerItems = [ ), }, + { + id: 'notification-routing', + title: 'Notification Routing', + description: 'AI importance scoring and orchestrator escalation for integration alerts', + route: 'notification-routing', + icon: ( + + + + ), + }, { id: 'webhooks-triggers', title: 'ComposeIO Triggers', diff --git a/app/src/pages/Settings.tsx b/app/src/pages/Settings.tsx index 86b7a3564..ab42a5151 100644 --- a/app/src/pages/Settings.tsx +++ b/app/src/pages/Settings.tsx @@ -275,15 +275,15 @@ const Settings = () => { )} /> )} /> )} /> - )} - /> )} /> {/* AI & Models leaf panels */} )} /> {/* Developer Options */} )} /> + )} + /> )} /> )} /> )} />