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.

Say delivery is turned off, not never turned on

rcourtman4a13c6544342
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index fae13d57b2..42f98ca2c7 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -294,6 +294,18 @@ alerts, which keeps the 2026-07-18 boundary between detection and delivery.
rejects state words in the label in every locale, and spec 01 finds the switch
by the new name.
+### The paused banner claims only that delivery is off
+
+Pending notification delivery (`pending_review`) covers both a fresh install
+and someone switching delivery off, because `deactivate` writes the same state.
+The config cannot tell them apart: `activationTime` can arrive in an imported
+config without local activation, and the activation API can enable delivery
+without recording one. So the paused banner's cause for pending delivery
+(`alerts.delivery.paused.reason.notActivated`) reads "Notification delivery is
+turned off." in every locale, instead of claiming it was never turned on.
+`OverviewTab.emptystate.test.tsx` renders both histories through the real
+activation store and hook.
+
### Retained guest observations are not alert evidence
Guest memory marked `last-known`, `unavailable` or an unknown observation state
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index b209c13036..3be8530484 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -8877,6 +8877,13 @@ separate status copy such as a banner. The Alerts overview **Send
notifications** switch follows this (`alerts.activation.switchLabel`), and
`i18n.test.ts` rejects state words in that label in every locale.
+### Status copy claims only what the state proves
+
+When one stored state covers several histories, its copy states only what that
+state proves now. The alerts paused banner says notification delivery "is
+turned off", not that it "has not been turned on for this install yet",
+because the same pending state follows a deliberate switch-off.
+
### Alert overview rows place Investigate by the shared breakpoint
`AlertOverviewAlertCard` reads the shared `useBreakpoint()` hook to decide
diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.md
index 07d4b3780c..1792e8ad36 100644
--- a/docs/release-control/v6/internal/subsystems/security-privacy.md
+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md
@@ -627,6 +627,10 @@ delivery (email, webhooks, Apprise); detection and the in-product alert view
continue, and the paused banner and toast say so. No payload, destination or
delivery behaviour changes.
+The Alerts paused banner describes pending notification delivery as turned off
+rather than never turned on, since switching delivery off stores the same
+state. Delivery, payloads and destinations are unchanged.
+
Docker and Podman container CPU normalization may expose numeric raw per-core
CPU percent, normalized capacity percent, and reporting host CPU count in
resource or alert metadata. Those fields are operational usage telemetry only;
diff --git a/frontend-modern/browser-verification/78aa298ba2abebc7.json b/frontend-modern/browser-verification/78aa298ba2abebc7.json
new file mode 100644
index 0000000000..2bd0c918a5
--- /dev/null
+++ b/frontend-modern/browser-verification/78aa298ba2abebc7.json
@@ -0,0 +1,42 @@
+{
+ "version": 1,
+ "base_sha": "3609f86ac5374d2b0fda7f51b7db5fd2d3b04dc4",
+ "verified_at": "2026-10-16T10:40:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/features/alerts/useAlertDeliveryPausedReason.ts",
+ "frontend-modern/src/i18n/messages.de.ts",
+ "frontend-modern/src/i18n/messages.es.ts",
+ "frontend-modern/src/i18n/messages.ts"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/features/alerts/useAlertDeliveryPausedReason.ts": "47a647560dff001e69003b0356b728eaf06f14ecb9a04dc746b98669da30c50d",
+ "frontend-modern/src/i18n/messages.de.ts": "aeab016eda192d6c9d5d3f387a46357b0d3c7b04bf9b02875d4dd4dd24000b64",
+ "frontend-modern/src/i18n/messages.es.ts": "32a6a10f40f736b632269967a2fe53c77938e044e55b7f2e89d0e83e7f8da228",
+ "frontend-modern/src/i18n/messages.ts": "cc24dd61ef5a365ca9808adc76a0f20efc5a292c924869d6e7fa8f03474e7c7e"
+ },
+ "routes": [
+ "/alerts/overview",
+ "/alerts/notifications"
+ ],
+ "viewports": [
+ {
+ "width": 1024,
+ "height": 768
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "Before (main): after delivery was turned on (activationTime 10:28) and switched off again, the paused banner said \"Notification delivery has not been turned on for this install yet\"",
+ "After, same stack and state (pending_review): the Alerts overview banner reads \"Notification delivery is turned off. Pulse is still detecting the alerts below, but nobody is being notified about them.\"",
+ "After: the Notifications tab banner reads \"Notification delivery is turned off.\" followed by the unchanged destinations and test-send caveat",
+ "At 375px the overview banner fits the page (card 341px wide, scrollWidth 375)"
+ ],
+ "interactions": [
+ "Signed in to a private mock stack whose delivery had been turned on and off; read the config activation state and both banners from the DOM",
+ "Resized to the mobile preset and measured the banner and page width"
+ ]
+}
diff --git a/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx b/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx
index b1df95e286..5c9b70513f 100644
--- a/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx
+++ b/frontend-modern/src/features/alerts/__tests__/OverviewTab.emptystate.test.tsx
@@ -7,8 +7,10 @@ vi.mock('@solidjs/router', () => ({
A: (props: Record<string, unknown>) => props.children,
}));
+const getConfigMock = vi.hoisted(() => vi.fn());
+
vi.mock('@/api/alerts', () => ({
- AlertsAPI: {},
+ AlertsAPI: { getConfig: getConfigMock },
}));
vi.mock('@/stores/notifications', () => ({
@@ -24,6 +26,7 @@ vi.mock('@/components/Alerts/InvestigateAlertButton', () => ({
}));
import { OverviewTab } from '../OverviewTab';
+import { useAlertsActivation } from '@/stores/alertsActivation';
function defaultProps(overrides: Record<string, unknown> = {}) {
return {
@@ -90,3 +93,27 @@ describe('OverviewTab empty state', () => {
expect(screen.queryByText('Alerting is paused')).not.toBeInTheDocument();
});
});
+
+// Runs last: it loads the shared activation store, which the empty-state tests
+// above rely on staying unloaded.
+describe('OverviewTab delivery paused banner', () => {
+ afterEach(() => {
+ cleanup();
+ });
+
+ it.each([
+ ['a fresh install', { enabled: true, activationState: 'pending_review' }],
+ [
+ 'an install whose delivery was switched off',
+ { enabled: true, activationState: 'pending_review', activationTime: '2026-10-01T09:00:00Z' },
+ ],
+ ])('says only that delivery is off for %s', async (_case, config) => {
+ getConfigMock.mockResolvedValue(config);
+ await useAlertsActivation().refreshConfig();
+
+ render(() => <OverviewTab {...defaultProps()} />);
+
+ expect(screen.getByText(/Notification delivery is turned off\./)).toBeInTheDocument();
+ expect(screen.queryByText(/for this install yet/)).not.toBeInTheDocument();
+ });
+});
diff --git a/frontend-modern/src/features/alerts/useAlertDeliveryPausedReason.ts b/frontend-modern/src/features/alerts/useAlertDeliveryPausedReason.ts
index 424fe4557d..0301d8a20f 100644
--- a/frontend-modern/src/features/alerts/useAlertDeliveryPausedReason.ts
+++ b/frontend-modern/src/features/alerts/useAlertDeliveryPausedReason.ts
@@ -29,6 +29,9 @@ export function useAlertDeliveryPausedReason(): AlertDeliveryPausedState {
if (!alertsActivation.detectionEnabled()) {
return 'detection_off';
}
+ // Pending covers a fresh install and someone switching delivery off; the
+ // config cannot tell which (an import can carry another install's
+ // activation time), so the banner only says delivery is off.
return alertsActivation.activationState() === 'snoozed' ? 'snoozed' : 'not_activated';
});
diff --git a/frontend-modern/src/i18n/__tests__/i18n.test.ts b/frontend-modern/src/i18n/__tests__/i18n.test.ts
index 061974b305..1bf230f411 100644
--- a/frontend-modern/src/i18n/__tests__/i18n.test.ts
+++ b/frontend-modern/src/i18n/__tests__/i18n.test.ts
@@ -451,6 +451,19 @@ describe('i18n foundation', () => {
}
});
+ // Switching delivery off stores the same pending state as a fresh install,
+ // so the paused banner may say delivery is off but never that it was never on.
+ it('describes pending notification delivery as off, not as never turned on', () => {
+ expect(I18N_MESSAGES.en['alerts.delivery.paused.reason.notActivated']).toBe(
+ 'Notification delivery is turned off.',
+ );
+ for (const locale of ['en', 'de', 'es'] as const) {
+ expect(I18N_MESSAGES[locale]['alerts.delivery.paused.reason.notActivated']).not.toMatch(
+ /yet|noch nicht|aún no/i,
+ );
+ }
+ });
+
it('keeps external notification delivery distinct from alert detection', () => {
// The delivery switch has one name in every state, so an off switch is
// never labelled with a word that reads as its opposite.
diff --git a/frontend-modern/src/i18n/messages.de.ts b/frontend-modern/src/i18n/messages.de.ts
index 9baf288301..3fe98f736f 100644
--- a/frontend-modern/src/i18n/messages.de.ts
+++ b/frontend-modern/src/i18n/messages.de.ts
@@ -137,7 +137,7 @@ export const DE_MESSAGE_OVERRIDES = {
'alerts.delivery.paused.reason.snoozed':
'Die Zustellung von Benachrichtigungen ist zurueckgestellt.',
'alerts.delivery.paused.reason.notActivated':
- 'Die Zustellung von Benachrichtigungen wurde fuer diese Installation noch nicht eingeschaltet.',
+ 'Die Zustellung von Benachrichtigungen ist ausgeschaltet.',
'alerts.delivery.paused.consequence.destinations':
'Pulse erkennt weiterhin Warnmeldungen, sendet aber keine davon an die Ziele unten. Testnachrichten umgehen die Pause, ein erfolgreicher Test bedeutet also nicht, dass echte Warnmeldungen ankommen.',
'alerts.delivery.paused.consequence.destinationsDetectionOff':
diff --git a/frontend-modern/src/i18n/messages.es.ts b/frontend-modern/src/i18n/messages.es.ts
index 2b13eaebde..a17a3a0d99 100644
--- a/frontend-modern/src/i18n/messages.es.ts
+++ b/frontend-modern/src/i18n/messages.es.ts
@@ -130,8 +130,7 @@ export const ES_MESSAGE_OVERRIDES = {
'alerts.delivery.paused.reason.detectionOff':
'Las alertas están desactivadas en la configuración de alertas.',
'alerts.delivery.paused.reason.snoozed': 'El envío de notificaciones está pospuesto.',
- 'alerts.delivery.paused.reason.notActivated':
- 'El envío de notificaciones aún no se ha activado en esta instalación.',
+ 'alerts.delivery.paused.reason.notActivated': 'El envío de notificaciones está desactivado.',
'alerts.delivery.paused.consequence.destinations':
'Pulse sigue detectando alertas, pero ninguna se enviará a los destinos de abajo. Los mensajes de prueba omiten la pausa, así que una prueba correcta no significa que las alertas reales lleguen.',
'alerts.delivery.paused.consequence.destinationsDetectionOff':
diff --git a/frontend-modern/src/i18n/messages.ts b/frontend-modern/src/i18n/messages.ts
index eb6db8785f..06ae585998 100644
--- a/frontend-modern/src/i18n/messages.ts
+++ b/frontend-modern/src/i18n/messages.ts
@@ -231,8 +231,7 @@ export const EN_MESSAGES = {
'alerts.delivery.paused.reason.detectionOff':
'Alerts are switched off in the alert configuration.',
'alerts.delivery.paused.reason.snoozed': 'Notification delivery is snoozed.',
- 'alerts.delivery.paused.reason.notActivated':
- 'Notification delivery has not been turned on for this install yet.',
+ 'alerts.delivery.paused.reason.notActivated': 'Notification delivery is turned off.',
'alerts.delivery.paused.consequence.destinations':
'Pulse is still detecting alerts, but none of them will be sent to the destinations below. Test messages bypass the pause, so a successful test does not mean live alerts are getting through.',
'alerts.delivery.paused.consequence.destinationsDetectionOff':
diff --git a/frontend-modern/src/utils/__tests__/alertDestinationsPresentation.test.ts b/frontend-modern/src/utils/__tests__/alertDestinationsPresentation.test.ts
index a1eafd9511..3a6049c838 100644
--- a/frontend-modern/src/utils/__tests__/alertDestinationsPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/alertDestinationsPresentation.test.ts
@@ -1,4 +1,5 @@
import { describe, expect, it } from 'vitest';
+import { DEFAULT_LOCALE, setActiveLocale } from '@/i18n';
import {
ALERT_DESTINATION_ALL_SEVERITIES_LABEL,
ALERT_DESTINATION_CRITICAL_ONLY_LABEL,
@@ -332,12 +333,21 @@ describe('alert destinations delivery paused copy', () => {
expect(getAlertDestinationsDeliveryPausedDescription('detection_off', 'overview')).toBe(
'Alerts are switched off in the alert configuration. Pulse is not raising new alerts while they are switched off, so nobody is being notified.',
);
+ // Pending delivery covers a fresh install and a deliberate switch-off, so
+ // the cause claims only that delivery is off, never that it was never on.
expect(getAlertDestinationsDeliveryPausedDescription('not_activated', 'overview')).toBe(
- 'Notification delivery has not been turned on for this install yet. Pulse is still detecting the alerts below, but nobody is being notified about them.',
+ 'Notification delivery is turned off. Pulse is still detecting the alerts below, but nobody is being notified about them.',
);
expect(getAlertDestinationsDeliveryPausedDescription('snoozed')).toContain('snoozed');
expect(getAlertDestinationsDeliveryPausedDescription('not_activated')).toContain(
- 'has not been turned on for this install yet',
+ 'Notification delivery is turned off.',
);
+ for (const locale of ['de', 'es'] as const) {
+ setActiveLocale(locale);
+ expect(getAlertDestinationsDeliveryPausedDescription('not_activated')).not.toMatch(
+ /noch nicht|aún no/,
+ );
+ }
+ setActiveLocale(DEFAULT_LOCALE);
});
});