feat: include user about section in meeting brief AI generation#1223
feat: include user about section in meeting brief AI generation#1223
Conversation
Add user context (email, name, about) to the prompt when generating meeting briefs, following the existing pattern used elsewhere. - Import and use getUserInfoPrompt helper - Update buildPrompt to accept full emailAccount object - Update tests with mock emailAccount and snapshots 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughRefactors meeting briefing prompt generation to accept an Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ 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). (2)
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. Comment |
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="apps/web/__tests__/ai-meeting-briefing.test.ts">
<violation number="1" location="apps/web/__tests__/ai-meeting-briefing.test.ts:54">
P2: The `getEmailAccount` helper doesn't apply the `timezone` override - it's hardcoded to `null`. Both `mockEmailAccount` and `mockEmailAccountNoTz` will have `timezone: null`, so tests expecting a timezone won't actually validate timezone handling. The helper in `apps/web/__tests__/helpers.ts` needs to be updated to use `timezone: overrides.timezone ?? null`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| } | ||
|
|
||
| describe("buildPrompt", () => { | ||
| const mockEmailAccount = getEmailAccount({ timezone: "America/New_York" }); |
There was a problem hiding this comment.
P2: The getEmailAccount helper doesn't apply the timezone override - it's hardcoded to null. Both mockEmailAccount and mockEmailAccountNoTz will have timezone: null, so tests expecting a timezone won't actually validate timezone handling. The helper in apps/web/__tests__/helpers.ts needs to be updated to use timezone: overrides.timezone ?? null.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/__tests__/ai-meeting-briefing.test.ts, line 54:
<comment>The `getEmailAccount` helper doesn't apply the `timezone` override - it's hardcoded to `null`. Both `mockEmailAccount` and `mockEmailAccountNoTz` will have `timezone: null`, so tests expecting a timezone won't actually validate timezone handling. The helper in `apps/web/__tests__/helpers.ts` needs to be updated to use `timezone: overrides.timezone ?? null`.</comment>
<file context>
@@ -51,9 +51,12 @@ function getMeetingBriefingData(
}
describe("buildPrompt", () => {
+ const mockEmailAccount = getEmailAccount({ timezone: "America/New_York" });
+ const mockEmailAccountNoTz = getEmailAccount({ timezone: null });
+
</file context>
User description
Summary
Include user's about section when generating meeting briefs with AI, providing the AI with helpful context about the user (similar to how it's done in other AI features like rule selection and email drafts).
getUserInfoPrompthelper to include user email, name, and about in the promptbuildPromptto accept fullemailAccountobject instead of just timezoneinternalTeamMembers)🤖 Generated with Claude Code
Generated description
Below is a concise technical summary of the changes proposed in this PR:
graph LR aiGenerateMeetingBriefing_("aiGenerateMeetingBriefing"):::modified buildPrompt_("buildPrompt"):::modified GET_USER_INFO_PROMPT_("GET_USER_INFO_PROMPT"):::added aiGenerateMeetingBriefing_ -- "Now passes full EmailAccountWithAI (including timezone) to buildPrompt" --> buildPrompt_ buildPrompt_ -- "Prepends user's profile/timezone via getUserInfoPrompt" --> GET_USER_INFO_PROMPT_ classDef added stroke:#15AA7A classDef removed stroke:#CD5270 classDef modified stroke:#EDAC4C linkStyle default stroke:#CBD5E1,font-size:13pxIntegrate the user's 'about' section into AI-generated meeting briefs by updating the
buildPromptfunction to accept the fullemailAccountobject, which includes user email, name, and about information, and utilizing thegetUserInfoPrompthelper to embed this context directly into the AI prompt.Latest Contributors(1)
Summary by CodeRabbit
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.