diff --git a/js/app/packages/app/component/Soup.tsx b/js/app/packages/app/component/Soup.tsx index b24900e3139..5a98af0d831 100644 --- a/js/app/packages/app/component/Soup.tsx +++ b/js/app/packages/app/component/Soup.tsx @@ -325,6 +325,19 @@ export function Soup() { }); }); + createEffectOnEntityTypeNotification( + notificationSource, + 'document', + (notification) => { + if (notification.notificationEventType === 'task_assigned') { + entityQueryClient.invalidateQueries({ + queryKey: queryKeys.all.dss, + }); + invalidateEntityNotifications(notification.entity_id); + } + } + ); + const saveViewMutation = useUpsertSavedViewMutation(); let tabsRef: HTMLDivElement | undefined; diff --git a/js/app/packages/app/component/soupFilters.ts b/js/app/packages/app/component/soupFilters.ts index d2d76f921d2..f8929a218c5 100644 --- a/js/app/packages/app/component/soupFilters.ts +++ b/js/app/packages/app/component/soupFilters.ts @@ -1,4 +1,4 @@ -import type { EntityData } from '@macro-entity'; +import { type EntityData, isTaskEntity } from '@macro-entity'; import type { APIEmailThreadPreviewMetadata } from '@service-email/generated/schemas'; import type { SoupEmailThreadPreviewMetadata } from '@service-storage/generated/schemas'; import { makePersisted } from '@solid-primitives/storage'; @@ -253,6 +253,10 @@ export const signalFilter: ClientFilter = { return hasRecentlyViewed(entity); } case 'document': { + if (isTaskEntity(entity)) { + // TODO (seamus) : filter on isCompleted + return true; + } return hasRecentlyViewed(entity); } case 'email': { diff --git a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx index 308212e435c..916469c5ffe 100644 --- a/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx +++ b/js/app/packages/macro-entity/src/components/EntityWithEverything.tsx @@ -277,6 +277,9 @@ function NotificationRow(props: { ) { return 'shared'; } + if (props.notification.notificationEventType === 'task_assigned') { + return 'assigned to you'; + } const metadata = tryToTypedNotification( props.notification