Skip to content

OUT-3904: add missing break in CommentToIU notification case - #1392

Closed
SandipBajracharya wants to merge 1 commit into
mainfrom
OUT-3904
Closed

OUT-3904: add missing break in CommentToIU notification case#1392
SandipBajracharya wants to merge 1 commit into
mainfrom
OUT-3904

Conversation

@SandipBajracharya

Copy link
Copy Markdown
Collaborator

Summary

Potential fix for TASKS-9D / OUT-3904 — a ZodError thrown from NotificationService.getNotificationParties.

The CommentToIU case in the switch (action) was missing a break, so it fell through into the default branch. default calls copilot.me() and runs z.string().parse(userInfo?.id). For tokens where me() resolves to null (no internalUserId/clientId), that parse throws the reported ZodError and crashes comment notifications — even though the CommentToIU caller only consumes recipientIds/senderCompanyId, both already set before the fallthrough.

This adds the missing break.

⚠️ Framed as a potential fix — this is the most likely trigger of the reported error, but not confirmed as the definitive root cause.

Sentry

https://copilot-platforms.sentry.io/issues/TASKS-9D

Fixes TASKS-9D — will auto-close the Sentry issue on merge.

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jul 13, 2026

Copy link
Copy Markdown

OUT-3904

@vercel

vercel Bot commented Jul 13, 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 13, 2026 11:21am

Request Review

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR stops comment notifications to internal users from entering the default notification path.

  • Adds a break after the CommentToIU recipient lookup.
  • Avoids calling copilot.me() for this recipient-resolution path.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
src/app/api/notification/notification.service.ts Adds the missing switch break after CommentToIU has resolved internal-user recipients.

Reviews (1): Last reviewed commit: "fix(OUT-3904): add missing break in Comm..." | Re-trigger Greptile

@SandipBajracharya SandipBajracharya changed the title fix(OUT-3904): add missing break in CommentToIU notification case OUT-3904: add missing break in CommentToIU notification case Jul 13, 2026
Potential fix — not confirmed as the definitive root cause.

CommentToIU fell through into the default branch, which calls copilot.me()
and parses its id. For tokens where me() resolves to null, that threw a
ZodError and crashed comment notifications. Adding the missing break stops
that fallthrough, which is the most likely trigger of the reported error.

Fixes TASKS-9D

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Deployment failed with the following error:

Deploying Serverless Functions to multiple regions is restricted to the Pro and Enterprise plans.

Learn More: https://vercel.link/multiple-function-regions

@arpandhakal arpandhakal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SandipBajracharya

Copy link
Copy Markdown
Collaborator Author

Already made the same fix by @arpandhakal in one for the feature branches.

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.

2 participants