Skip to content

Fix client company resolution for grouped notification emails - #1384

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/por-21055-cursor-automated-triage-response-0a8f
Draft

Fix client company resolution for grouped notification emails#1384
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/por-21055-cursor-automated-triage-response-0a8f

Conversation

@cursor

@cursor cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Resolve recipientCompanyId before sending client-targeted grouped emails, grouped reminder emails, and reminder emails.
  • Enrich replayed grouped-email individual snapshots with the row/client company before calling Copilot notifications.
  • Add focused unit coverage for missing-company fallback and grouped reminder payload construction.

Testing Criteria

  • yarn test src/jobs/notifications/send-grouped-email.test.ts src/jobs/notifications/send-grouped-reminder-email.test.ts src/jobs/notifications/send-reminder-email.test.ts src/jobs/notifications/flush-grouped-email.test.ts src/app/api/notification/notification.service.test.ts src/jobs/notifications/send-task-reminders.test.ts --runInBand
  • TESTCONTAINERS_HOST_OVERRIDE=127.0.0.1 yarn test:integration src/jobs/notifications/flush-grouped-email.integration.test.ts --runInBand
  • yarn lint:check
  • yarn tsc currently fails on the pre-existing SVG module declaration errors in src/icons/index.ts; no new type errors from this change were shown before that existing failure.

Notes

  • Linear/Sentry direct reads were unavailable in this automation environment: Linear MCP returned 401 and Sentry MCP requires auth. The issue title matches Copilot notification group-channel failures reached through Tasks notification jobs.
  • The first integration attempt needed Docker daemon/socket setup in the VM, and then TESTCONTAINERS_HOST_OVERRIDE=127.0.0.1 because Testcontainers otherwise wrote a non-local 172.18.0.1 URL that the test guard refuses.

Impact & Surface Area of Change

  • Notification jobs that send client-targeted email-only Copilot notifications: grouped activity emails, grouped reminder emails, single reminder emails, and grouped-email single-event replay.
  • Copilot client lookup is only added when a caller or stored snapshot lacks recipientCompanyId; existing payloads with a company id do not perform the extra lookup.
Open in Web View Automation 

Co-authored-by: Neil Raina <makeitraina@users.noreply.github.com>
@linear-code

linear-code Bot commented Jul 9, 2026

Copy link
Copy Markdown

POR-21055

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tasks-app Ready Ready Preview, Comment Jul 9, 2026 6:34pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant