Conversation
Bug Report
Comments? Email us. |
WalkthroughThis update removes trailing whitespace from specific lines in the AI chat prompt definition and modifies the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Server
participant DraftGenerator
User->>Server: Trigger automatic draft generation
Server->>DraftGenerator: Call generateAutomaticDraft()
DraftGenerator->>DraftGenerator: Generate content with newlines
DraftGenerator->>DraftGenerator: Replace \n with <br>
DraftGenerator-->>Server: Return formatted draft content
Server-->>User: Deliver HTML-formatted draft
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ 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 comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
ad3036e to
b3ae4b9
Compare
Bug Report
Comments? Email us. |
Bug ReportInconsistent formatting instructions in the StyledEmailAssistantSystemPrompt|Medium|User requests an email with multiple paragraphs and bullet points.|The Comments? Email us. |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
apps/server/src/lib/prompts.ts(3 hunks)apps/server/src/thread-workflow-utils/index.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes for strings
Limit lines to 100 characters in length
Semicolons are required at the end of statements
Files:
apps/server/src/lib/prompts.tsapps/server/src/thread-workflow-utils/index.ts
**/*.{js,jsx,ts,tsx,css,scss}
📄 CodeRabbit Inference Engine (AGENT.md)
Use Prettier with sort-imports and Tailwind plugins for code formatting
Files:
apps/server/src/lib/prompts.tsapps/server/src/thread-workflow-utils/index.ts
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
Enable TypeScript strict mode
Files:
apps/server/src/lib/prompts.tsapps/server/src/thread-workflow-utils/index.ts
**/*.{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/lib/prompts.tsapps/server/src/thread-workflow-utils/index.ts
🧠 Learnings (2)
📚 Learning: in the prompt management system, users should be allowed to save empty prompts as this gives them th...
Learnt from: retrogtx
PR: Mail-0/Zero#1354
File: apps/mail/components/ui/prompts-dialog.tsx:148-159
Timestamp: 2025-06-20T05:34:41.297Z
Learning: In the prompt management system, users should be allowed to save empty prompts as this gives them the choice to disable certain AI functionality or start fresh. Validation should not prevent empty prompts from being saved.
Applied to files:
apps/server/src/lib/prompts.ts
📚 Learning: in apps/server/src/lib/driver/google.ts, the normalization of "draft" to "drafts" in the count() met...
Learnt from: retrogtx
PR: Mail-0/Zero#1734
File: apps/server/src/lib/driver/google.ts:211-221
Timestamp: 2025-07-15T06:46:33.349Z
Learning: In apps/server/src/lib/driver/google.ts, the normalization of "draft" to "drafts" in the count() method is necessary because the navigation item in apps/mail/config/navigation.ts has id: 'drafts' (plural) while the Google API returns "draft" (singular). The nav-main.tsx component matches stats by comparing stat.label with item.id, so the backend must return "drafts" for the draft counter badge to appear in the sidebar.
Applied to files:
apps/server/src/thread-workflow-utils/index.ts
🔇 Additional comments (1)
apps/server/src/lib/prompts.ts (1)
338-338: Outstanding move removing that trailing whitespace, my friend!These changes are like optimizing rocket fuel efficiency - small but crucial improvements. The cleanup eliminates unnecessary whitespace in the system prompt, which is exactly the kind of precision engineering we need for consistent AI behavior.
Also applies to: 354-354, 538-538
There was a problem hiding this comment.
cubic analysis
No issues found across 2 files. Review in cubic
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
apps/server/src/lib/prompts.ts(3 hunks)apps/server/src/thread-workflow-utils/index.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes for strings
Limit lines to 100 characters in length
Semicolons are required at the end of statements
Files:
apps/server/src/thread-workflow-utils/index.tsapps/server/src/lib/prompts.ts
**/*.{js,jsx,ts,tsx,css,scss}
📄 CodeRabbit Inference Engine (AGENT.md)
Use Prettier with sort-imports and Tailwind plugins for code formatting
Files:
apps/server/src/thread-workflow-utils/index.tsapps/server/src/lib/prompts.ts
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
Enable TypeScript strict mode
Files:
apps/server/src/thread-workflow-utils/index.tsapps/server/src/lib/prompts.ts
**/*.{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.tsapps/server/src/lib/prompts.ts
🧠 Learnings (3)
📚 Learning: in apps/server/src/lib/driver/google.ts, the normalization of "draft" to "drafts" in the count() met...
Learnt from: retrogtx
PR: Mail-0/Zero#1734
File: apps/server/src/lib/driver/google.ts:211-221
Timestamp: 2025-07-15T06:46:33.349Z
Learning: In apps/server/src/lib/driver/google.ts, the normalization of "draft" to "drafts" in the count() method is necessary because the navigation item in apps/mail/config/navigation.ts has id: 'drafts' (plural) while the Google API returns "draft" (singular). The nav-main.tsx component matches stats by comparing stat.label with item.id, so the backend must return "drafts" for the draft counter badge to appear in the sidebar.
Applied to files:
apps/server/src/thread-workflow-utils/index.ts
📚 Learning: in the prompt management system, users should be allowed to save empty prompts as this gives them th...
Learnt from: retrogtx
PR: Mail-0/Zero#1354
File: apps/mail/components/ui/prompts-dialog.tsx:148-159
Timestamp: 2025-06-20T05:34:41.297Z
Learning: In the prompt management system, users should be allowed to save empty prompts as this gives them the choice to disable certain AI functionality or start fresh. Validation should not prevent empty prompts from being saved.
Applied to files:
apps/server/src/lib/prompts.ts
📚 Learning: applies to **/*.{js,jsx,ts,tsx} : limit lines to 100 characters in length...
Learnt from: CR
PR: Mail-0/Zero#0
File: AGENT.md:0-0
Timestamp: 2025-08-03T20:41:43.899Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Limit lines to 100 characters in length
Applied to files:
apps/server/src/lib/prompts.ts
🔇 Additional comments (1)
apps/server/src/lib/prompts.ts (1)
338-338: Excellent whitespace cleanup!These trailing whitespace removals are precisely the kind of attention to detail that separates great code from mediocre code. Like removing unnecessary mass from a rocket - every bit of efficiency matters. The prompt functionality remains intact while the code becomes cleaner.
Also applies to: 354-354, 538-538
Merge activity
|

Update Email Assistant to use HTML formatting
Description
This PR updates the Email Assistant system prompt to generate emails with proper HTML formatting instead of plain text.
Summary by CodeRabbit
Bug Fixes
<br>tags.Style