Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(notifs): ignore document_mention type notifs (#1620)
Seamusdef8d62f7e2c
diff --git a/js/app/packages/notifications/notification-platform.ts b/js/app/packages/notifications/notification-platform.tsindex de76d26b47..39f937089d 100644--- a/js/app/packages/notifications/notification-platform.ts+++ b/js/app/packages/notifications/notification-platform.ts@@ -80,6 +80,11 @@ export async function maybeHandlePlatformNotification(notificationInterface: PlatformNotificationState,splitLayoutManager: SplitManager) {+ // Ignore document_mention notifications - they should not show as browser notifications+ if (notification.notification_metadata.tag === 'document_mention') {+ return;+ }+const platformNotificationData = await toPlatformNotificationData(notification,DefaultUserNameResolver,diff --git a/js/app/packages/notifications/notification-stacking.ts b/js/app/packages/notifications/notification-stacking.tsindex 04aeb88234..9a78610efb 100644--- a/js/app/packages/notifications/notification-stacking.ts+++ b/js/app/packages/notifications/notification-stacking.ts@@ -42,6 +42,11 @@ export function getThreadId(group: NotificationStack): string {export function stackNotifications(notifications: UnifiedNotification[]): NotificationStack[] {+ // Do no stack and document_mention type notifications+ const filteredNotifications = notifications.filter(+ (n) => n.notification_metadata.tag !== 'document_mention'+ );+const isChannelMention = (n: UnifiedNotification) =>n.notification_metadata.tag === 'channel_mention';const isChannelMessageSend = (n: UnifiedNotification) =>@@ -51,7 +56,7 @@ export function stackNotifications(// Collect mention messageIds for shadowingconst mentionedMsgIds = new Set(- notifications+ filteredNotifications.filter(isChannelMention).flatMap((n) =>n.notification_metadata.tag === 'channel_mention'@@ -71,14 +76,14 @@ export function stackNotifications(};// Partition by type- const mentions = notifications.filter(isChannelMention);- const newMsgs = notifications+ const mentions = filteredNotifications.filter(isChannelMention);+ const newMsgs = filteredNotifications.filter(isChannelMessageSend).filter((n) => !isShadowed(n));- const replies = notifications+ const replies = filteredNotifications.filter(isChannelMessageReply).filter((n) => !isShadowed(n));- const others = notifications.filter(+ const others = filteredNotifications.filter((n) =>!isChannelMention(n) &&!isChannelMessageSend(n) &&