Skip to content

Comments

feat: include user about section in meeting brief AI generation#1223

Merged
elie222 merged 2 commits intomainfrom
feat/meeting-brief-about-section
Jan 7, 2026
Merged

feat: include user about section in meeting brief AI generation#1223
elie222 merged 2 commits intomainfrom
feat/meeting-brief-about-section

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Jan 7, 2026

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).

  • Use getUserInfoPrompt helper to include user email, name, and about in the prompt
  • Update buildPrompt to accept full emailAccount object instead of just timezone
  • Fix pre-existing type issue in tests (missing internalTeamMembers)

🤖 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:13px
Loading

Integrate the user's 'about' section into AI-generated meeting briefs by updating the buildPrompt function to accept the full emailAccount object, which includes user email, name, and about information, and utilizing the getUserInfoPrompt helper to embed this context directly into the AI prompt.

Latest Contributors(1)
UserCommitDate
elie222feat-show-internal-tea...January 05, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

Summary by CodeRabbit

  • Refactor

    • Meeting briefs now embed personalized user information and build prompts using full account details instead of just timezone.
  • Tests

    • Updated tests and fixtures to use mock account objects and the new briefing data shape (including internal team members) to match the revised prompt flow.

✏️ Tip: You can customize this high-level summary in your review settings.

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>
@vercel
Copy link

vercel bot commented Jan 7, 2026

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

Project Deployment Review Updated (UTC)
inbox-zero Ready Ready Preview Jan 7, 2026 9:27am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Refactors meeting briefing prompt generation to accept an EmailAccountWithAI object (instead of a timezone string), threads emailAccount.timezone into guest context, and embeds a user_info block via a new getUserInfoPrompt helper; tests updated accordingly.

Changes

Cohort / File(s) Summary
Prompt generation refactor
apps/web/utils/ai/meeting-briefs/generate-briefing.ts
Changed buildPrompt signature to accept EmailAccountWithAI; added getUserInfoPrompt import; prompt now inserts getUserInfoPrompt({ emailAccount }) and reads timezone from emailAccount.timezone; updated aiGenerateMeetingBriefing to pass the email account.
Tests updated to new account shape
apps/web/utils/ai/meeting-briefs/generate-briefing.test.ts, apps/web/__tests__/ai-meeting-briefing.test.ts
Mocked getUserInfoPrompt; tests now pass EmailAccountWithAI mock objects (including timezone or null) to buildPrompt; adjusted briefing test data to include internalTeamMembers: [] and related shape changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • baz-reviewer

Poem

🐰 I stitched the prompt with care and cheer,
An email account now hops right here,
Timezones tucked and user facts to share,
Briefings bloom with context rare,
Hoppity help for meetings near! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: including user information (about section) in the meeting brief AI generation prompt by refactoring buildPrompt to use the full emailAccount object.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 252f933 and 19c6b3c.

📒 Files selected for processing (1)
  • apps/web/__tests__/ai-meeting-briefing.test.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/web/tests/ai-meeting-briefing.test.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). (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

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" });
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 7, 2026

Choose a reason for hiding this comment

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

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>
Fix with Cubic

@elie222 elie222 merged commit f11a425 into main Jan 7, 2026
17 checks passed
@elie222 elie222 deleted the feat/meeting-brief-about-section branch January 7, 2026 12:06
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