Conversation
WalkthroughIntroduces a dontReplyTo set of known non-actionable sender addresses and adds a new guard in shouldGenerateDraft to return false when the latest message’s sender matches that set. The guard is positioned after automated-content heuristics and before the 7‑day recency check. No public API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Trigger as Trigger
participant TWU as thread-workflow-utils
participant Store as Message Store
Trigger->>TWU: shouldGenerateDraft(threadId)
TWU->>Store: getLatestMessage(threadId)
Store-->>TWU: latestMessage(sender, content, ts)
rect rgba(230,240,255,0.6)
note over TWU: Automated-content heuristics
TWU->>TWU: if automated content -> return false
end
rect rgba(240,255,230,0.6)
note over TWU: New guard: dontReplyTo set
TWU->>TWU: if sender in dontReplyTo -> return false
end
TWU->>TWU: if older than 7 days -> return false
TWU->>TWU: other existing checks...
TWU-->>Trigger: boolean (should generate draft)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/server/src/thread-workflow-utils/index.ts (1)
31-34: Trim inputs before lowercasing – optional robustness boostWe ran a project-wide scan for any
email: ' …'patterns and found no existing cases with leading whitespace. That said, proactively trimming before calling.toLowerCase()guards against future provider quirks.• File: apps/server/src/thread-workflow-utils/index.ts (Lines 31–34)
• Current code:const senderEmail = latestMessage.sender?.email?.toLowerCase() || ''; const subject = latestMessage.subject?.toLowerCase() || ''; const decodedBody = latestMessage.decodedBody?.toLowerCase() || '';• Suggested (optional) refactor:
const senderEmail = (latestMessage.sender?.email ?? '').trim().toLowerCase(); const subject = (latestMessage.subject ?? '').trim().toLowerCase(); const decodedBody = (latestMessage.decodedBody ?? '').trim().toLowerCase();This extra trim is purely preventative—no failures detected today, but it future-proofs our normalization logic.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/server/src/thread-workflow-utils/index.ts(2 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{css,js,ts,jsx,tsx,mdx}
📄 CodeRabbit inference engine (.cursor/rules/tailwind-css-v4.mdc)
**/*.{css,js,ts,jsx,tsx,mdx}: Chain variants together for composable variants (e.g.,group-has-data-potato:opacity-100).
Use new variants such asstarting,not-*,inert,nth-*,in-*,open(for:popover-open), and**for all descendants.
Do not use deprecated utilities likebg-opacity-*,text-opacity-*,border-opacity-*, anddivide-opacity-*; use the new syntax (e.g.,bg-black/50).
Use renamed utilities:shadow-smis nowshadow-xs,shadowis nowshadow-sm,drop-shadow-smis nowdrop-shadow-xs,drop-shadowis nowdrop-shadow-sm,blur-smis nowblur-xs,bluris nowblur-sm,rounded-smis nowrounded-xs,roundedis nowrounded-sm,outline-noneis nowoutline-hidden.
Usebg-(--brand-color)syntax for CSS variables in arbitrary values instead ofbg-[--brand-color].
Stacked variants now apply left-to-right instead of right-to-left.
Files:
apps/server/src/thread-workflow-utils/index.ts
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes
Limit lines to 100 characters
Semicolons are required
Files:
apps/server/src/thread-workflow-utils/index.ts
**/*.{js,jsx,ts,tsx,css}
📄 CodeRabbit inference engine (AGENT.md)
Use Prettier with sort-imports and Tailwind plugins
Files:
apps/server/src/thread-workflow-utils/index.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENT.md)
Enable TypeScript strict mode
Files:
apps/server/src/thread-workflow-utils/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: cubic · AI code reviewer

Skip draft generation for no-reply email addresses
Description
Added a check to prevent generating draft replies for messages from no-reply email addresses. This change introduces a set of common no-reply email addresses (like no-reply@gmail.com, notifications@github.com, etc.) and skips draft generation when the sender's email matches any of these addresses.
Type of Change
Areas Affected
Summary by CodeRabbit