Skip to content

Commit ae5309b

Browse files
committed
✨ feat(ui): surface notification-delivery-failed audit entries (#282)
- AuditView action filter includes notification-delivery-failed - NotificationBell rings for delivery failures alongside other alerts - audit-helpers maps the action to the xmark icon
1 parent c31f78e commit ae5309b

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed

ui/src/components/NotificationBell.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const BELL_ACTIONS = [
1414
'update-available',
1515
'update-applied',
1616
'update-failed',
17+
'notification-delivery-failed',
1718
'security-alert',
1819
'agent-disconnect',
1920
];

ui/src/utils/audit-helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export function actionIcon(action: string): string {
3434
if (action.includes('update-available')) return 'updates';
3535
if (action.includes('update-applied')) return 'check';
3636
if (action.includes('update-failed')) return 'xmark';
37+
if (action.includes('notification-delivery-failed')) return 'xmark';
3738
if (action.includes('security-alert')) return 'security';
3839
if (action.includes('agent-disconnect')) return 'network';
3940
if (action.includes('rollback') || action === 'auto-rollback') return 'restart';

ui/src/views/AuditView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const actionTypes = [
2121
'update-available',
2222
'update-applied',
2323
'update-failed',
24+
'notification-delivery-failed',
2425
'container-update',
2526
'security-alert',
2627
'agent-disconnect',

ui/tests/components/NotificationBell.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ describe('NotificationBell', () => {
8888
'update-available',
8989
'update-applied',
9090
'update-failed',
91+
'notification-delivery-failed',
9192
'security-alert',
9293
'agent-disconnect',
9394
],
@@ -162,6 +163,7 @@ describe('NotificationBell', () => {
162163
'update-available',
163164
'update-applied',
164165
'update-failed',
166+
'notification-delivery-failed',
165167
'security-alert',
166168
'agent-disconnect',
167169
],

ui/tests/utils/audit-helpers.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ describe('audit-helpers', () => {
5656
['update-available', 'updates'],
5757
['update-applied', 'check'],
5858
['update-failed', 'xmark'],
59+
['notification-delivery-failed', 'xmark'],
5960
['security-alert', 'security'],
6061
['agent-disconnect', 'network'],
6162
['rollback', 'restart'],

ui/tests/views/AuditView.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,27 @@ describe('AuditView', () => {
214214
expect((wrapper.find('select').element as HTMLSelectElement).value).toBe('container-update');
215215
});
216216

217+
it('accepts notification-delivery-failed as a valid action filter from route query', async () => {
218+
mockRoute.query = {
219+
action: 'notification-delivery-failed',
220+
};
221+
mockGetAuditLog.mockResolvedValue({
222+
entries: [makeEntry({ action: 'notification-delivery-failed', status: 'error' })],
223+
total: 1,
224+
});
225+
226+
const wrapper = await mountAuditView();
227+
228+
expect(mockGetAuditLog).toHaveBeenCalledWith({
229+
page: 1,
230+
limit: 50,
231+
action: 'notification-delivery-failed',
232+
});
233+
expect((wrapper.find('select').element as HTMLSelectElement).value).toBe(
234+
'notification-delivery-failed',
235+
);
236+
});
237+
217238
it('loads using route query date range filters', async () => {
218239
mockRoute.query = {
219240
from: '2026-01-01',

0 commit comments

Comments
 (0)