From 43aba1ef113c549786742d4a918abfde48138cb2 Mon Sep 17 00:00:00 2001 From: 777genius Date: Thu, 7 May 2026 01:57:33 +0300 Subject: [PATCH] fix(team): stabilize frontend ci checks --- src/main/services/infrastructure/NotificationManager.ts | 5 ++++- src/renderer/utils/pathNormalize.ts | 1 + .../services/team/TeamMemberRuntimeAdvisoryService.test.ts | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/services/infrastructure/NotificationManager.ts b/src/main/services/infrastructure/NotificationManager.ts index 1d6633e4..7b3bad30 100644 --- a/src/main/services/infrastructure/NotificationManager.ts +++ b/src/main/services/infrastructure/NotificationManager.ts @@ -826,6 +826,9 @@ export class NotificationManager extends EventEmitter { .catch(() => undefined) .then(() => writeNotificationsFileAtomically(notificationsPath, data)) .catch((error) => { + if ((error as NodeJS.ErrnoException).code === 'ENOENT') { + return; + } logger.error('Error saving notifications:', error); }); } @@ -1031,7 +1034,7 @@ export class NotificationManager extends EventEmitter { ): void { const NotificationClass = getNotificationClass(); if (!NotificationClass || !this.isNativeNotificationSupported()) { - logger.warn('[team-toast] native notifications not supported — skipping'); + logger.debug('[team-toast] native notifications not supported - skipping'); return; } diff --git a/src/renderer/utils/pathNormalize.ts b/src/renderer/utils/pathNormalize.ts index 5144f6b1..168fc2fd 100644 --- a/src/renderer/utils/pathNormalize.ts +++ b/src/renderer/utils/pathNormalize.ts @@ -85,6 +85,7 @@ export function buildTaskCountsByOwner( for (const task of tasks) { const owner = task.owner?.trim(); if (!owner || isTeamTaskDeleted(task)) continue; + if (getTeamTaskWorkflowColumn(task) === 'review') continue; const key = owner.toLowerCase(); const counts = map.get(key) ?? { pending: 0, inProgress: 0, completed: 0 }; map.set(key, incrementTaskStatus(counts, task)); diff --git a/test/main/services/team/TeamMemberRuntimeAdvisoryService.test.ts b/test/main/services/team/TeamMemberRuntimeAdvisoryService.test.ts index d474d23e..09c8a2f9 100644 --- a/test/main/services/team/TeamMemberRuntimeAdvisoryService.test.ts +++ b/test/main/services/team/TeamMemberRuntimeAdvisoryService.test.ts @@ -655,9 +655,8 @@ describe('TeamMemberRuntimeAdvisoryService', () => { const firstRequest = service.getMemberAdvisories('signal-ops', [buildMember('Alice')]); const secondRequest = service.getMemberAdvisories('signal-ops', [buildMember('Alice')]); - await Promise.resolve(); - expect(logsFinder.findMemberLogs).toHaveBeenCalledTimes(1); + await vi.waitFor(() => expect(logsFinder.findMemberLogs).toHaveBeenCalledTimes(1)); gate.resolve(); const [first, second] = await Promise.all([firstRequest, secondRequest]);