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.

Cover keyboard access to retained delivery activity

pulse-triage[bot]8baed6c848e2
diff --git a/frontend-modern/src/features/alerts/AlertDeliveryLogCard.test.tsx b/frontend-modern/src/features/alerts/AlertDeliveryLogCard.test.tsx
index d1c009e2e6..d397c201ba 100644
--- a/frontend-modern/src/features/alerts/AlertDeliveryLogCard.test.tsx
+++ b/frontend-modern/src/features/alerts/AlertDeliveryLogCard.test.tsx
@@ -74,6 +74,76 @@ describe('AlertDeliveryLogCard', () => {
expect(screen.getByText(/HTTP 401 Unauthorized/)).toBeInTheDocument();
});
+ it('makes recent delivery activity a named keyboard scroll target', () => {
+ render(() => (
+ <AlertDeliveryLogCard
+ log={log}
+ unavailable={false}
+ refreshing={false}
+ onRefresh={vi.fn()}
+ webhooks={webhooks}
+ />
+ ));
+
+ const activity = screen.getByRole('list');
+ expect(activity).toHaveAccessibleName('Recent delivery activity');
+ expect(activity).toHaveAttribute('tabindex', '0');
+ activity.focus();
+ expect(activity).toHaveFocus();
+ });
+
+ it('retains the keyboard scroll target when fresh attempts replace loaded rows', () => {
+ const [currentLog, setCurrentLog] = createSignal<NotificationDeliveryLog>(log);
+ render(() => (
+ <AlertDeliveryLogCard
+ log={currentLog()}
+ unavailable={false}
+ refreshing={false}
+ onRefresh={vi.fn()}
+ webhooks={webhooks}
+ />
+ ));
+ const activity = screen.getByRole('list');
+ activity.focus();
+ expect(activity).toHaveFocus();
+
+ setCurrentLog({ ...log, entries: [log.entries[1]] });
+ expect(screen.getByRole('list')).toBe(activity);
+ expect(activity).toHaveFocus();
+ expect(activity).toHaveAccessibleName('Recent delivery activity');
+ expect(screen.getAllByRole('listitem')).toHaveLength(1);
+ });
+
+ it('keeps independently readable held activity reachable by keyboard', () => {
+ render(() => (
+ <AlertDeliveryLogCard
+ log={null}
+ unavailable={true}
+ refreshing={false}
+ onRefresh={vi.fn()}
+ webhooks={webhooks}
+ heldEvents={[
+ {
+ id: 25,
+ occurredAt: '2026-10-26T10:00:00Z',
+ type: 'notification_suppressed',
+ alertId: 'held-keyboard-evidence',
+ reason: 'flapping',
+ },
+ ]}
+ />
+ ));
+
+ expect(screen.getByRole('alert')).toHaveTextContent(/could not read the delivery log/);
+ const activity = screen.getByRole('list');
+ expect(activity).toHaveAccessibleName('Recent delivery activity');
+ expect(activity).toHaveAttribute('tabindex', '0');
+ activity.focus();
+ expect(activity).toHaveFocus();
+ expect(screen.getAllByRole('listitem')).toHaveLength(1);
+ expect(screen.getByText('held-keyboard-evidence')).toBeInTheDocument();
+ });
+
it('says test sends are not listed so their absence is not read as failure', () => {
render(() => (
<AlertDeliveryLogCard