Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Canonicalize alert notifications route

rcourtman2470b8fb3175
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 2b64d1882f..50cc9857bb 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -42,9 +42,10 @@ operator-facing alert routing behavior for live runtime alerts.
20. `frontend-modern/src/utils/alertHistoryPresentation.ts`
21. `frontend-modern/src/utils/alertSeverityPresentation.ts`
22. `frontend-modern/src/utils/alertTabsPresentation.ts`
-23. `frontend-modern/src/utils/alertThresholdsPresentation.ts`
-24. `frontend-modern/src/utils/alertThresholdsSectionPresentation.ts`
-25. `internal/alerts/history.go`
+23. `frontend-modern/src/features/alerts/types.ts`
+24. `frontend-modern/src/utils/alertThresholdsPresentation.ts`
+25. `frontend-modern/src/utils/alertThresholdsSectionPresentation.ts`
+26. `internal/alerts/history.go`
## Shared Boundaries
@@ -180,6 +181,13 @@ The alerts page also owns its mobile tab-shell presentation directly.
disabled tab styling, but horizontal tab scrolling must route through the
shared `touch-scroll` / `scrollbar-hide` class contract instead of writing
inline overflow styles that break CSP on the public shell.
+Alert tab routing is part of that same presentation boundary.
+`frontend-modern/src/features/alerts/types.ts` owns the canonical mapping
+between visible alert tabs and URLs. The operator-facing Notifications tab
+must use `/alerts/notifications` as its canonical route because the visible
+navigation label is Notifications; `/alerts/destinations` is a legacy alias
+only and must normalize through `tabFromPath` / `pathForTab` instead of being
+reintroduced as canonical UI vocabulary.
That shared alert presentation boundary now also has explicit alerts ownership.
`frontend-modern/src/utils/alertWebhookPresentation.ts` is the canonical owner
for webhook setup copy, service labels, mention-help phrasing, custom-field
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 6b07f57a4d..ebc8b7297d 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -203,6 +203,12 @@ work extends shared components instead of creating new local variants.
mode is `Grouped`, not `Cluster`, because cluster remains a
platform/resource concept for Proxmox, Kubernetes, and similar inventory
details.
+ Settings shell search copy belongs to
+ `frontend-modern/src/utils/settingsShellPresentation.ts`. Shared settings
+ search must not display non-actionable shortcut chips such as `Any key`;
+ if the shell exposes a shortcut hint, it must name an actual key chord,
+ otherwise the hint must remain unset so the shared `SearchInput` renders no
+ shortcut chip.
2. Route new top-level settings surfaces through the canonical settings shell
instead of introducing page-local framing.
Shared shells and primitives that need websocket or dark-mode context must
diff --git a/frontend-modern/src/features/alerts/types.ts b/frontend-modern/src/features/alerts/types.ts
index 033db1b57d..06bf197411 100644
--- a/frontend-modern/src/features/alerts/types.ts
+++ b/frontend-modern/src/features/alerts/types.ts
@@ -7,7 +7,7 @@ export type AlertTab = 'overview' | 'thresholds' | 'destinations' | 'schedule' |
export const ALERT_TAB_SEGMENTS: Record<AlertTab, string> = {
overview: 'overview',
thresholds: 'thresholds',
- destinations: 'destinations',
+ destinations: 'notifications',
schedule: 'schedule',
history: 'history',
};
@@ -44,6 +44,10 @@ export const tabFromPath = (
return entry[0];
}
+ if (segment === 'destinations') {
+ return 'destinations';
+ }
+
if (segment === 'custom-rules') {
return 'thresholds';
}
diff --git a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
index 03c73203b8..66fd47b933 100644
--- a/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
+++ b/frontend-modern/src/pages/__tests__/Alerts.helpers.test.ts
@@ -270,6 +270,7 @@ describe('shared storage override migration', () => {
describe('tab path helpers', () => {
it('maps tab to path', () => {
expect(pathForTab('overview')).toBe('/alerts/overview');
+ expect(pathForTab('destinations')).toBe('/alerts/notifications');
expect(pathForTab('schedule')).toBe('/alerts/schedule');
});
@@ -279,6 +280,8 @@ describe('tab path helpers', () => {
expect(tabFromPath('/alerts/thresholds/infrastructure')).toBe('thresholds');
expect(tabFromPath('/alerts/thresholds/systems')).toBe('thresholds');
expect(tabFromPath('/alerts/thresholds/proxmox')).toBe('thresholds');
+ expect(tabFromPath('/alerts/notifications')).toBe('destinations');
+ expect(tabFromPath('/alerts/destinations')).toBe('destinations');
expect(tabFromPath('/alerts/custom-rules')).toBe('thresholds');
expect(tabFromPath('/foo/bar')).toBe('overview');
});
diff --git a/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts b/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts
index 9ecd35ee9d..672efa7f13 100644
--- a/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/settingsShellPresentation.test.ts
@@ -13,7 +13,7 @@ describe('settingsShellPresentation', () => {
navigationAriaLabel: 'Settings navigation',
navigationTitle: 'Settings',
searchPlaceholder: 'Search settings...',
- searchShortcutHint: 'Any key',
+ searchShortcutHint: undefined,
mobileBackLabel: 'Settings',
collapseSidebarLabel: 'Collapse settings navigation',
expandSidebarLabel: 'Expand settings navigation',
diff --git a/frontend-modern/src/utils/settingsShellPresentation.ts b/frontend-modern/src/utils/settingsShellPresentation.ts
index de801cd806..41a0e72fa8 100644
--- a/frontend-modern/src/utils/settingsShellPresentation.ts
+++ b/frontend-modern/src/utils/settingsShellPresentation.ts
@@ -2,7 +2,7 @@ export const SETTINGS_SHELL_COPY = {
navigationAriaLabel: 'Settings navigation',
navigationTitle: 'Settings',
searchPlaceholder: 'Search settings...',
- searchShortcutHint: 'Any key',
+ searchShortcutHint: undefined,
mobileBackLabel: 'Settings',
collapseSidebarLabel: 'Collapse settings navigation',
expandSidebarLabel: 'Expand settings navigation',