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.

Name the notification switch the same in both states

rcourtmanaae71f50e25a
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
index ced4188f9f..d5e48de124 100644
--- a/docs/TROUBLESHOOTING.md
+++ b/docs/TROUBLESHOOTING.md
@@ -1128,8 +1128,8 @@ or audit data to clear the warning.
#### Pause and cancellation limits
-In **Alerts → Notifications**, global **Notifications paused** is not a
-store-and-forward hold. Monitoring continues, but pausing clears buffered alert
+Turning off the global **Send notifications** switch on the Alerts overview is
+not a store-and-forward hold. Monitoring continues, but pausing clears buffered alert
groups and cancels pending queue deliveries for email, webhooks and Apprise,
including recovery deliveries. **Turning delivery back on does not replay those
cancelled deliveries.** Retained terminal failures are separate: pausing does
diff --git a/docs/WEBHOOKS.md b/docs/WEBHOOKS.md
index 318158d2bd..a35faaa155 100644
--- a/docs/WEBHOOKS.md
+++ b/docs/WEBHOOKS.md
@@ -159,8 +159,8 @@ batch retries to diagnose rate limiting. A receiver can see a duplicate if an
earlier request was accepted but Pulse did not receive its response; preserve
[receiver deduplication](#receiver-correlation-and-deduplication).
-Global **Notifications paused** cancels pending alert deliveries and clears
-buffered groups; turning delivery back on does not replay those cancelled
+Turning off the global **Send notifications** switch cancels pending alert
+deliveries and clears buffered groups; turning delivery back on does not replay those cancelled
items. This differs from scheduled quiet-hours holds. Disabling or removing a
destination can block queued work, but **does not recall a request already in
flight**, revoke a provider credential or delete the receiver's copy. Follow
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.md
index 48a7978c05..fae13d57b2 100644
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@ -279,6 +279,21 @@ the visible label (`AlertHistoryItemActions.test.tsx`,
`AlertHistoryMobileList.test.tsx`, `InvestigateAlertButton.test.tsx`,
`alertIncidentPresentation.test.ts`).
+### The delivery switch has one name
+
+The Alerts overview header switch for external notification delivery is
+labelled **Send notifications** in every state
+(`alerts.activation.switchLabel`, English, German and Spanish), and that
+visible label is the checkbox's accessible name. It used to read
+"Notifications enabled" or "Notifications paused" depending on its own
+position, so an off switch beside "Notifications paused" read as "pausing is
+off". The switch position alone now carries the state. The delivery-paused
+banner and the pause toast still say Pulse keeps detecting and showing active
+alerts, which keeps the 2026-07-18 boundary between detection and delivery.
+`Alerts.readOnly.test.tsx` pins the stable name in both states, `i18n.test.ts`
+rejects state words in the label in every locale, and spec 01 finds the switch
+by the new name.
+
### 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 feacf66b51..f47a34cc31 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -8858,6 +8858,16 @@ variable when it holds the opposite, and the generic failure only when the
state cannot be read. The setup wizard's usage-statistics opt-out follows
this, and catalog copy keeps the variable name untranslated (`i18n.test.ts`).
+### A switch keeps one name in every state
+
+A toggle's visible label names the setting, not its current state, and that
+label is the control's accessible name. A label that flips with the switch
+("Notifications paused" beside an off switch) reads as the opposite of the
+truth. State goes in the switch position and, where it needs explaining, in
+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.
+
### 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 c03ed7ca4a..07d4b3780c 100644
--- a/docs/release-control/v6/internal/subsystems/security-privacy.md
+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md
@@ -620,6 +620,13 @@ off, tells the operator to set `PULSE_TELEMETRY=false` and restart
because removing the variable would restore the default (on), and keeps the
generic failure only when it cannot tell. It never claims statistics are off without reading that they are.
+The Alerts overview control for external notification delivery is labelled
+**Send notifications** in every state, so an off switch is never described
+with a word that reads as "on". Turning it off still pauses only outbound
+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.
+
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/145dc4d1b763d009.json b/frontend-modern/browser-verification/145dc4d1b763d009.json
new file mode 100644
index 0000000000..20a1dfa4b6
--- /dev/null
+++ b/frontend-modern/browser-verification/145dc4d1b763d009.json
@@ -0,0 +1,44 @@
+{
+ "version": 1,
+ "base_sha": "5fbceb4c5ac48789b3e71f6a3840fe1b23d0e323",
+ "verified_at": "2026-10-16T09:40:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/i18n/messages.de.ts",
+ "frontend-modern/src/i18n/messages.es.ts",
+ "frontend-modern/src/i18n/messages.ts",
+ "frontend-modern/src/pages/Alerts.tsx",
+ "frontend-modern/src/utils/alertActivationPresentation.ts"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/i18n/messages.de.ts": "f4d0d111e10e10ece75b1a417ac2123eaf2045d258642b5de831950df7ec3a88",
+ "frontend-modern/src/i18n/messages.es.ts": "a066bd5289ae2a37e982fa8e37c1fecaeb779c430476ec854f56a1e5c0249f35",
+ "frontend-modern/src/i18n/messages.ts": "a7e459dbabb02187410ecf7204c4e2ef52acf972a3e1bc397d32cd17364f2c9e",
+ "frontend-modern/src/pages/Alerts.tsx": "b4d0cd119d5da684ffc3ad8d7a6d316dcf91fe9a0096a3ee69a6a35cbf74a533",
+ "frontend-modern/src/utils/alertActivationPresentation.ts": "15405135319b557fa93a0a301476e71dc0a69c4defee967537b46dddbdac22b8"
+ },
+ "routes": [
+ "/alerts/overview"
+ ],
+ "viewports": [
+ {
+ "width": 1024,
+ "height": 768
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "Before (main): the Alerts overview header showed \"Notifications paused\" beside an off switch, which reads as \"paused: no\", while the banner below said notifications were paused",
+ "After, delivery off: the header reads \"Send notifications\" beside an off switch; the paused banner still explains that Pulse keeps detecting alerts",
+ "After, delivery on: same label, switch on, paused banner gone",
+ "At 375px the label and switch fit in the header row and the page has no sideways scroll (scrollWidth 375)"
+ ],
+ "interactions": [
+ "Signed in to a private mock stack and opened Alerts overview; read the checkbox label association (labels: Send notifications) and checked state from the DOM",
+ "Clicked the label text to turn delivery on, confirmed the switch checked and the banner gone, clicked again to turn it off and saw the pause toast",
+ "Resized to the mobile preset and measured the header control and page width"
+ ]
+}
diff --git a/frontend-modern/public/docs/TROUBLESHOOTING.md b/frontend-modern/public/docs/TROUBLESHOOTING.md
index ced4188f9f..d5e48de124 100644
--- a/frontend-modern/public/docs/TROUBLESHOOTING.md
+++ b/frontend-modern/public/docs/TROUBLESHOOTING.md
@@ -1128,8 +1128,8 @@ or audit data to clear the warning.
#### Pause and cancellation limits
-In **Alerts → Notifications**, global **Notifications paused** is not a
-store-and-forward hold. Monitoring continues, but pausing clears buffered alert
+Turning off the global **Send notifications** switch on the Alerts overview is
+not a store-and-forward hold. Monitoring continues, but pausing clears buffered alert
groups and cancels pending queue deliveries for email, webhooks and Apprise,
including recovery deliveries. **Turning delivery back on does not replay those
cancelled deliveries.** Retained terminal failures are separate: pausing does
diff --git a/frontend-modern/public/docs/WEBHOOKS.md b/frontend-modern/public/docs/WEBHOOKS.md
index 318158d2bd..a35faaa155 100644
--- a/frontend-modern/public/docs/WEBHOOKS.md
+++ b/frontend-modern/public/docs/WEBHOOKS.md
@@ -159,8 +159,8 @@ batch retries to diagnose rate limiting. A receiver can see a duplicate if an
earlier request was accepted but Pulse did not receive its response; preserve
[receiver deduplication](#receiver-correlation-and-deduplication).
-Global **Notifications paused** cancels pending alert deliveries and clears
-buffered groups; turning delivery back on does not replay those cancelled
+Turning off the global **Send notifications** switch cancels pending alert
+deliveries and clears buffered groups; turning delivery back on does not replay those cancelled
items. This differs from scheduled quiet-hours holds. Disabling or removing a
destination can block queued work, but **does not recall a request already in
flight**, revoke a provider credential or delete the receiver's copy. Follow
diff --git a/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts b/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts
index f29d24c043..5773422d76 100644
--- a/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts
+++ b/frontend-modern/src/features/alerts/__tests__/alertsLocalization.guardrails.test.ts
@@ -26,6 +26,7 @@ const migratedAlertsSurfaceSources = [
const migratedAlertsOverviewCopy = [
'Notifications enabled',
'Notifications paused',
+ 'Send notifications',
'Alerts navigation',
'Toggle external notifications',
'Active Alerts',
@@ -71,7 +72,7 @@ describe('alerts overview localization guardrails', () => {
}
}
- expect(alertsPageSource).toContain('alerts.nav.toggleAlerts');
+ expect(alertsPageSource).toContain('alertActivationPresentation().label');
expect(activeAlertsSectionSource).toContain('getAlertOverviewActiveSectionTitle');
expect(activeAlertsSectionSource).toContain('getAlertOverviewGroupDisclosureLabel');
expect(alertCardSource).toContain('getAlertOverviewPrimaryActionLabel');
diff --git a/frontend-modern/src/i18n/__tests__/i18n.test.ts b/frontend-modern/src/i18n/__tests__/i18n.test.ts
index 3bd67acd5a..061974b305 100644
--- a/frontend-modern/src/i18n/__tests__/i18n.test.ts
+++ b/frontend-modern/src/i18n/__tests__/i18n.test.ts
@@ -452,22 +452,22 @@ describe('i18n foundation', () => {
});
it('keeps external notification delivery distinct from alert detection', () => {
- expect(I18N_MESSAGES.en['alerts.activation.label.enabled']).toBe('Notifications enabled');
- expect(I18N_MESSAGES.en['alerts.activation.label.disabled']).toBe('Notifications paused');
+ // The delivery switch has one name in every state, so an off switch is
+ // never labelled with a word that reads as its opposite.
+ expect(I18N_MESSAGES.en['alerts.activation.switchLabel']).toBe('Send notifications');
+ for (const locale of ['en', 'de', 'es'] as const) {
+ expect(I18N_MESSAGES[locale]['alerts.activation.switchLabel']).not.toMatch(
+ /paus|enabled|aktiviert|activad/i,
+ );
+ }
expect(I18N_MESSAGES.en['alerts.activation.toast.deactivated']).toContain(
'keep detecting and showing active alerts',
);
- expect(I18N_MESSAGES.de['alerts.activation.label.enabled']).toBe(
- 'Benachrichtigungen aktiviert',
- );
- expect(I18N_MESSAGES.de['alerts.activation.label.disabled']).toBe(
- 'Benachrichtigungen pausiert',
- );
+ expect(I18N_MESSAGES.de['alerts.activation.switchLabel']).toBe('Benachrichtigungen senden');
expect(I18N_MESSAGES.de['alerts.activation.toast.deactivated']).toContain('weiterhin');
- expect(I18N_MESSAGES.es['alerts.activation.label.enabled']).toBe('Notificaciones activadas');
- expect(I18N_MESSAGES.es['alerts.activation.label.disabled']).toBe('Notificaciones pausadas');
+ expect(I18N_MESSAGES.es['alerts.activation.switchLabel']).toBe('Enviar notificaciones');
expect(I18N_MESSAGES.es['alerts.activation.toast.deactivated']).toContain('seguira');
});
diff --git a/frontend-modern/src/i18n/messages.de.ts b/frontend-modern/src/i18n/messages.de.ts
index 8bb3e45f06..9baf288301 100644
--- a/frontend-modern/src/i18n/messages.de.ts
+++ b/frontend-modern/src/i18n/messages.de.ts
@@ -7,8 +7,7 @@ export const DE_MESSAGE_OVERRIDES = {
'pricing.handoff.link.pulseAccount': 'weiter zu Pulse Account',
'pricing.handoff.title.publicPricing': 'Weiterleitung zu den Preisen',
'pricing.handoff.title.pulseAccount': 'Weiterleitung zu Pulse Account',
- 'alerts.activation.label.enabled': 'Benachrichtigungen aktiviert',
- 'alerts.activation.label.disabled': 'Benachrichtigungen pausiert',
+ 'alerts.activation.switchLabel': 'Benachrichtigungen senden',
'alerts.activation.toast.activated':
'Benachrichtigungen aktiviert. Sie erhalten jetzt Hinweise, wenn Probleme erkannt werden.',
'alerts.activation.toast.activateFailed':
@@ -59,7 +58,6 @@ export const DE_MESSAGE_OVERRIDES = {
'alerts.nav.collapseSidebar': 'Seitenleiste einklappen',
'alerts.nav.expandSidebar': 'Seitenleiste ausklappen',
'alerts.nav.title': 'Warnmeldungen',
- 'alerts.nav.toggleAlerts': 'Externe Benachrichtigungen umschalten',
'alerts.overview.action.acknowledge': 'Bestaetigen',
'alerts.overview.action.acknowledgeAll': 'Alle bestaetigen ({count})',
'alerts.overview.action.acknowledging': 'Wird bestaetigt...',
diff --git a/frontend-modern/src/i18n/messages.es.ts b/frontend-modern/src/i18n/messages.es.ts
index d2eed9e69c..2b13eaebde 100644
--- a/frontend-modern/src/i18n/messages.es.ts
+++ b/frontend-modern/src/i18n/messages.es.ts
@@ -7,8 +7,7 @@ export const ES_MESSAGE_OVERRIDES = {
'pricing.handoff.link.pulseAccount': 'continua a Pulse Account',
'pricing.handoff.title.publicPricing': 'Redirigiendo a precios',
'pricing.handoff.title.pulseAccount': 'Redirigiendo a Pulse Account',
- 'alerts.activation.label.enabled': 'Notificaciones activadas',
- 'alerts.activation.label.disabled': 'Notificaciones pausadas',
+ 'alerts.activation.switchLabel': 'Enviar notificaciones',
'alerts.activation.toast.activated':
'Notificaciones activadas. Ahora recibiras avisos cuando se detecten problemas.',
'alerts.activation.toast.activateFailed':
@@ -58,7 +57,6 @@ export const ES_MESSAGE_OVERRIDES = {
'alerts.nav.collapseSidebar': 'Contraer barra lateral',
'alerts.nav.expandSidebar': 'Expandir barra lateral',
'alerts.nav.title': 'Alertas',
- 'alerts.nav.toggleAlerts': 'Alternar notificaciones externas',
'alerts.overview.action.acknowledge': 'Reconocer',
'alerts.overview.action.acknowledgeAll': 'Reconocer todas ({count})',
'alerts.overview.action.acknowledging': 'Reconociendo...',
diff --git a/frontend-modern/src/i18n/messages.ts b/frontend-modern/src/i18n/messages.ts
index 5ce7559b72..eb6db8785f 100644
--- a/frontend-modern/src/i18n/messages.ts
+++ b/frontend-modern/src/i18n/messages.ts
@@ -114,8 +114,7 @@ export const EN_MESSAGES = {
'Pulse sends a small daily usage summary showing which releases are deployed and which features and platforms are in use, so development effort goes where Pulse is actually used. It holds counts and on/off flags with a rotating pseudonymous install ID, never hostnames, credentials, IP addresses, or anything you type. It is never sold, shared, or used for advertising, and it is not linked to a Pulse account or license. It is on by default. You choose on the next step and can change it at any time in Settings.',
'setup.welcome.telemetryNotice.title': 'Usage statistics',
'setup.wizard.ariaLabel': 'Pulse Setup Wizard',
- 'alerts.activation.label.enabled': 'Notifications enabled',
- 'alerts.activation.label.disabled': 'Notifications paused',
+ 'alerts.activation.switchLabel': 'Send notifications',
'alerts.activation.toast.activated':
"Notifications enabled. You'll now receive notifications when issues are detected.",
'alerts.activation.toast.activateFailed': 'Unable to enable notifications. Please try again.',
@@ -161,7 +160,6 @@ export const EN_MESSAGES = {
'alerts.nav.collapseSidebar': 'Collapse sidebar',
'alerts.nav.expandSidebar': 'Expand sidebar',
'alerts.nav.title': 'Alerts',
- 'alerts.nav.toggleAlerts': 'Toggle external notifications',
'alerts.overview.action.acknowledge': 'Acknowledge',
'alerts.overview.action.acknowledgeAll': 'Acknowledge all ({count})',
'alerts.overview.action.acknowledging': 'Acknowledging...',
@@ -748,8 +746,7 @@ export const FIRST_SESSION_MONITORING_MIGRATED_MESSAGE_KEYS = [
] as const satisfies readonly I18nMessageKey[];
export const ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS = [
- 'alerts.activation.label.enabled',
- 'alerts.activation.label.disabled',
+ 'alerts.activation.switchLabel',
'alerts.activation.toast.activated',
'alerts.activation.toast.activateFailed',
'alerts.activation.toast.deactivated',
@@ -790,7 +787,6 @@ export const ALERTS_OVERVIEW_MIGRATED_MESSAGE_KEYS = [
'alerts.nav.collapseSidebar',
'alerts.nav.expandSidebar',
'alerts.nav.title',
- 'alerts.nav.toggleAlerts',
'alerts.overview.action.acknowledge',
'alerts.overview.action.acknowledgeAll',
'alerts.overview.action.acknowledging',
diff --git a/frontend-modern/src/pages/Alerts.tsx b/frontend-modern/src/pages/Alerts.tsx
index d7d2123510..90c5733959 100644
--- a/frontend-modern/src/pages/Alerts.tsx
+++ b/frontend-modern/src/pages/Alerts.tsx
@@ -238,12 +238,11 @@ export function Alerts() {
description={headerMeta().description}
actions={
<Show when={activeTab() === 'overview' && !readOnlySession()}>
- <div class="flex items-center gap-3">
- <span class={`text-sm font-medium ${alertActivationPresentation().labelClass}`}>
+ <label class="flex cursor-pointer items-center gap-3">
+ <span class="text-sm font-medium text-base-content">
{alertActivationPresentation().label}
</span>
- <label class="relative inline-flex items-center cursor-pointer">
- <span class="sr-only">{t('alerts.nav.toggleAlerts')}</span>
+ <span class="relative inline-flex items-center">
<input
type="checkbox"
class="sr-only peer"
@@ -257,11 +256,11 @@ export function Alerts() {
}
}}
/>
- <div class={alertActivationPresentation().trackClass}>
+ <span class={alertActivationPresentation().trackClass}>
<span class={alertActivationPresentation().thumbClass} />
- </div>
- </label>
- </div>
+ </span>
+ </span>
+ </label>
</Show>
}
/>
diff --git a/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx b/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx
index ad3e4b038a..3a475dfd88 100644
--- a/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx
+++ b/frontend-modern/src/pages/__tests__/Alerts.readOnly.test.tsx
@@ -172,7 +172,7 @@ describe('Alerts read-only presentation', () => {
expect(screen.getByTestId('overview-tab')).toBeInTheDocument();
});
- expect(screen.queryByLabelText('Toggle external notifications')).not.toBeInTheDocument();
+ expect(screen.queryByLabelText('Send notifications')).not.toBeInTheDocument();
expect(screen.getAllByText('Overview').length).toBeGreaterThan(0);
expect(screen.getAllByText('History').length).toBeGreaterThan(0);
expect(screen.queryByText('Thresholds')).not.toBeInTheDocument();
@@ -206,7 +206,7 @@ describe('Alerts read-only presentation', () => {
await waitFor(() => {
expect(screen.getByTestId('alerts-config-surface')).toBeInTheDocument();
});
- expect(screen.queryByLabelText('Toggle external notifications')).not.toBeInTheDocument();
+ expect(screen.queryByLabelText('Send notifications')).not.toBeInTheDocument();
expect(screen.getAllByText('Thresholds').length).toBeGreaterThan(0);
expect(navigateSpy).not.toHaveBeenCalledWith('/alerts/overview', { replace: true });
});
@@ -219,10 +219,23 @@ describe('Alerts read-only presentation', () => {
expect(await screen.findByTestId('overview-tab')).toBeInTheDocument();
expect(screen.getByTestId('alerts-config-surface')).toBeInTheDocument();
- expect(screen.getByLabelText('Toggle external notifications')).not.toBeChecked();
- expect(screen.getByText('Notifications paused')).toBeInTheDocument();
+ // The switch keeps one name; its position says delivery is off. A label
+ // reading "Notifications paused" beside an off switch read as "not paused".
+ expect(screen.getByRole('checkbox', { name: 'Send notifications' })).not.toBeChecked();
+ expect(screen.queryByText('Notifications paused')).not.toBeInTheDocument();
expect(screen.getAllByText('Thresholds').length).toBeGreaterThan(0);
expect(screen.queryByText('Alerts are paused')).not.toBeInTheDocument();
expect(overviewTabSpy.mock.calls.at(-1)?.[0].alertsDisabled()).toBe(false);
});
+
+ it('names the delivery switch the same way whether it is on or off', async () => {
+ presentationPolicyIsReadOnlyMock.mockReturnValue(false);
+ activationStateMock.mockReturnValue('active');
+
+ render(() => <Alerts />);
+
+ expect(await screen.findByTestId('overview-tab')).toBeInTheDocument();
+ expect(screen.getByRole('checkbox', { name: 'Send notifications' })).toBeChecked();
+ expect(screen.queryByText('Notifications enabled')).not.toBeInTheDocument();
+ });
});
diff --git a/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts b/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts
index bfdd18eb18..4632c31fc5 100644
--- a/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts
+++ b/frontend-modern/src/utils/__tests__/alertActivationPresentation.test.ts
@@ -23,8 +23,7 @@ describe('getAlertActivationPresentation', () => {
it('returns the enabled notification presentation', () => {
expect(getAlertActivationPresentation({ isActive: true })).toEqual({
- label: 'Notifications enabled',
- labelClass: 'text-green-600 dark:text-green-400',
+ label: 'Send notifications',
trackClass: 'relative h-6 w-11 rounded-full transition bg-blue-600',
thumbClass:
'absolute top-[2px] left-[2px] h-5 w-5 rounded-full bg-white shadow-sm transition-all translate-x-5',
@@ -33,8 +32,7 @@ describe('getAlertActivationPresentation', () => {
it('returns the paused busy notification presentation', () => {
expect(getAlertActivationPresentation({ isActive: false, isBusy: true })).toEqual({
- label: 'Notifications paused',
- labelClass: 'text-muted',
+ label: 'Send notifications',
trackClass: 'relative h-6 w-11 rounded-full transition bg-surface-hover opacity-50',
thumbClass:
'absolute top-[2px] left-[2px] h-5 w-5 rounded-full bg-white shadow-sm transition-all translate-x-0',
@@ -59,12 +57,8 @@ describe('getAlertActivationPresentation', () => {
it('localizes activation labels and feedback through the active locale', () => {
setActiveLocale('es');
- expect(getAlertActivationPresentation({ isActive: true }).label).toBe(
- 'Notificaciones activadas',
- );
- expect(getAlertActivationPresentation({ isActive: false }).label).toBe(
- 'Notificaciones pausadas',
- );
+ expect(getAlertActivationPresentation({ isActive: true }).label).toBe('Enviar notificaciones');
+ expect(getAlertActivationPresentation({ isActive: false }).label).toBe('Enviar notificaciones');
expect(getAlertActivationSuccess()).toBe(
'Notificaciones activadas. Ahora recibiras avisos cuando se detecten problemas.',
);
diff --git a/frontend-modern/src/utils/alertActivationPresentation.ts b/frontend-modern/src/utils/alertActivationPresentation.ts
index 04c396fc51..68e674464c 100644
--- a/frontend-modern/src/utils/alertActivationPresentation.ts
+++ b/frontend-modern/src/utils/alertActivationPresentation.ts
@@ -7,7 +7,6 @@ export interface AlertActivationPresentationOptions {
export interface AlertActivationPresentation {
label: string;
- labelClass: string;
trackClass: string;
thumbClass: string;
}
@@ -24,8 +23,10 @@ export function getAlertActivationPresentation({
isBusy = false,
}: AlertActivationPresentationOptions): AlertActivationPresentation {
return {
- label: isActive ? t('alerts.activation.label.enabled') : t('alerts.activation.label.disabled'),
- labelClass: isActive ? 'text-green-600 dark:text-green-400' : 'text-muted',
+ // One fixed name for the setting; the switch position alone says whether
+ // delivery is on. A label that flipped to "paused" beside an off switch
+ // read as "pausing is off".
+ label: t('alerts.activation.switchLabel'),
trackClass: `relative h-6 w-11 rounded-full transition ${
isActive ? 'bg-blue-600' : 'bg-surface-hover'
}${isBusy ? ' opacity-50' : ''}`,
diff --git a/tests/integration/tests/01-core-e2e.spec.ts b/tests/integration/tests/01-core-e2e.spec.ts
index ba298c5d91..f94f97ae7f 100644
--- a/tests/integration/tests/01-core-e2e.spec.ts
+++ b/tests/integration/tests/01-core-e2e.spec.ts
@@ -39,7 +39,7 @@ test.describe.serial('Core E2E flows', () => {
await expect(page.getByRole('heading', { name: 'Alerts Overview' })).toBeVisible();
const alertsToggleOnOverview = page.getByRole('checkbox', {
- name: 'Toggle external notifications',
+ name: 'Send notifications',
});
await expect(alertsToggleOnOverview).toBeVisible();
const alertsInitiallyEnabled = await alertsToggleOnOverview.isChecked();
@@ -199,7 +199,7 @@ test.describe.serial('Core E2E flows', () => {
await page.goto('/alerts/overview');
await expect(page.getByRole('heading', { name: 'Alerts Overview' })).toBeVisible();
const toggle = page.getByRole('checkbox', {
- name: 'Toggle external notifications',
+ name: 'Send notifications',
});
await expect(toggle).toBeVisible();
await toggle.click({ force: true });
@@ -231,11 +231,11 @@ test.describe.serial('Core E2E flows', () => {
await page.goto('/alerts/overview');
await expect(page.getByRole('heading', { name: 'Alerts Overview' })).toBeVisible();
const alertsToggleRestore = page.getByRole('checkbox', {
- name: 'Toggle external notifications',
+ name: 'Send notifications',
});
await expect(alertsToggleRestore).toBeVisible();
await alertsToggleRestore.click({ force: true });
- await expect(page.getByText('Notifications paused', { exact: true })).toBeVisible();
+ await expect(alertsToggleRestore).not.toBeChecked({ timeout: 30_000 });
}
});