Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
db865e3
Short-circuit detail HEAD requests
cursoragent Jun 3, 2026
f378689
Merge branch 'main' into cursor/OUT-3812-cursor-automated-triage-resp…
priosshrsth Jun 11, 2026
88bc4a6
Merge branch 'main' into cursor/OUT-3812-cursor-automated-triage-resp…
priosshrsth Jun 15, 2026
1539f5a
remove proxy test
priosshrsth Jun 15, 2026
77a098a
feat(notifications): extend grouped email system to support IU recipi…
arpandhakal Jun 30, 2026
c50428e
test(notifications): add IU grouped email buffer coverage
arpandhakal Jun 30, 2026
02b33c8
fix(notifications): buffer ReassignedToIU emails via grouped queue
arpandhakal Jun 30, 2026
636b366
refactor(notifications): use conditional spread for grouped email rec…
arpandhakal Jul 2, 2026
5f29eaf
fix(notifications): send grouped emails from the real actor, not an a…
arpandhakal Jul 2, 2026
196c38d
fix(notifications): add missing ReassignedToIU email template
arpandhakal Jul 2, 2026
ab585da
refactor(notifications): simplify grouped email buffer API per review
arpandhakal Jul 3, 2026
1c04407
Merge pull request #1362 from assemblycom/OUT-3925-extend-grouped-ema…
arpandhakal Jul 3, 2026
85ddb6f
Merge branch 'main' into feature/iu-email
arpandhakal Jul 3, 2026
f1d6966
feat(notifications): send task-marked-as-done emails to IUs
arpandhakal Jul 3, 2026
8403c94
refactor(notifications): make create() route all completion actions t…
arpandhakal Jul 6, 2026
1734717
Merge branch 'feature/iu-email' into OUT-3928-send-task-marked-as-don…
arpandhakal Jul 6, 2026
005a42f
Merge pull request #1372 from assemblycom/OUT-3928-send-task-marked-a…
arpandhakal Jul 6, 2026
4868e8b
feat(notifications): send comment & reply email notifications to IUs
arpandhakal Jul 6, 2026
a3893dc
refactor(notifications): make createBulkNotification isRecipientIu re…
arpandhakal Jul 6, 2026
37d9fda
Merge pull request #1376 from assemblycom/OUT-3927-send-comment-email…
arpandhakal Jul 6, 2026
cc6a6d2
feat(notifications): gate IU notifications via platform notification …
arpandhakal Jul 8, 2026
a716d21
refactor(notifications): interim IU gating + buffer replies; address …
arpandhakal Jul 8, 2026
68b151f
fix(notifications): break CommentToIU so it doesn't fall through to d…
arpandhakal Jul 8, 2026
49955e8
chore(notifications): log createNotification payload during email flush
arpandhakal Jul 8, 2026
b64baa5
fix(notifications): treat a suppressed notification as a no-op
arpandhakal Jul 8, 2026
88ada0c
chore(notifications): ship IU notifications ungated for now
arpandhakal Jul 8, 2026
c45d8c3
Merge branch 'main' into cursor/OUT-3812-cursor-automated-triage-resp…
arpandhakal Jul 13, 2026
b0f2a5e
Merge pull request #1286 from assemblycom/cursor/OUT-3812-cursor-auto…
arpandhakal Jul 13, 2026
299f10d
Merge branch 'main' of https://github.com/assemblycom/tasks-app into …
arpandhakal Jul 13, 2026
bdf377a
Merge branch 'feature/iu-email' of https://github.com/assemblycom/tas…
arpandhakal Jul 13, 2026
74c7b39
fix(OUT-3929): applied requested changes
arpandhakal Jul 13, 2026
e2174de
Merge pull request #1378 from assemblycom/OUT-3929-per-category-iu-no…
arpandhakal Jul 13, 2026
fb3face
Merge pull request #1370 from assemblycom/feature/iu-email
arpandhakal Jul 14, 2026
b69b89d
Merge branch 'production' into main
arpandhakal Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions src/app/api/notification/notification.helpers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NotificationTaskActions } from '@api/core/types/tasks'
import { WorkspaceResponse } from '@/types/common'
import { getReminderEmailDetails } from './notification.helpers'
import { TaskReminderType } from '@prisma/client'
import { getEmailDetails, getReminderEmailDetails } from './notification.helpers'
import { Task, TaskReminderType } from '@prisma/client'

const workspace: WorkspaceResponse = {
id: 'ws_1',
Expand Down Expand Up @@ -76,3 +77,34 @@ describe('getReminderEmailDetails', () => {
expect(htmlBody).not.toContain('<img src=x')
})
})

describe('getEmailDetails', () => {
// Actions that email an IU recipient must have a template here, or the grouped
// buffer silently skips them (in-product fires but no email is ever flushed).
it.each([
NotificationTaskActions.Assigned,
NotificationTaskActions.ReassignedToIU,
NotificationTaskActions.Completed,
NotificationTaskActions.CompletedByIU,
NotificationTaskActions.CompletedByCompanyMember,
NotificationTaskActions.CompletedForCompanyByIU,
])('defines an email template for IU-recipient action %s', (action) => {
const details = getEmailDetails(workspace, 'Arpan Two')[action]
expect(details).toBeDefined()
expect(details?.subject).toBeTruthy()
expect(details?.body).toBeTruthy()
})

it.each([
NotificationTaskActions.Completed,
NotificationTaskActions.CompletedByIU,
NotificationTaskActions.CompletedByCompanyMember,
NotificationTaskActions.CompletedForCompanyByIU,
])('uses the task-marked-as-done copy for completion action %s', (action) => {
const details = getEmailDetails(workspace, 'Casey Client', task as unknown as Task)[action]
expect(details?.subject).toBe('Task marked as done')
expect(details?.header).toBe('A task has been completed')
expect(details?.body).toContain('has been marked as done by Casey Client')
expect(details?.title).toBe('View task')
})
})
26 changes: 19 additions & 7 deletions src/app/api/notification/notification.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ export const getEmailDetails = (
}
: undefined

const completedDetail = {
subject: 'Task marked as done',
header: 'A task has been completed',
title: 'View task',
body: `The task ‘${task?.title}’ has been marked as done by ${actionUser}.\n\nTo see details about the task, open it below.`,
ctaParams,
}

return {
[NotificationTaskActions.Assigned]: {
subject: 'A task was assigned to you',
Expand All @@ -181,13 +189,10 @@ export const getEmailDetails = (
title: 'View task',
ctaParams,
},
//! Currently disable all IU email notifications
// [NotificationTaskActions.Completed]: {
// title: 'A client completed a task',
// subject: 'A client completed a task',
// header: 'A client completed a task',
// body: `A new task was completed by ${actionUser}. You are receiving this notification because you have access to the client.`,
// },
[NotificationTaskActions.Completed]: completedDetail,
[NotificationTaskActions.CompletedByIU]: completedDetail,
[NotificationTaskActions.CompletedByCompanyMember]: completedDetail,
[NotificationTaskActions.CompletedForCompanyByIU]: completedDetail,
[NotificationTaskActions.Commented]: {
subject: 'Comment was added',
header: 'Comment was added',
Expand All @@ -202,6 +207,13 @@ export const getEmailDetails = (
title: 'View task',
ctaParams,
},
[NotificationTaskActions.ReassignedToIU]: {
subject: 'A task was reassigned to you',
header: 'A task was reassigned to you',
title: 'View task',
body: `The task ‘${task?.title}’ was reassigned to you by ${actionUser}. To see details about the task open it below.`,
ctaParams,
},
[NotificationTaskActions.ReassignedToClient]: {
subject: 'A task was reassigned to you',
header: 'A task was reassigned to you',
Expand Down
Loading
Loading