-
Notifications
You must be signed in to change notification settings - Fork 239
Calendar hotfix 2 #1293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar hotfix 2 #1293
Conversation
📝 WalkthroughWalkthroughThe participant synchronization logic in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{js,ts,tsx,rs}⚙️ CodeRabbit Configuration File
Files:
⏰ 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). (3)
🔇 Additional comments (6)
✨ 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
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic analysis
1 issue found across 1 file • Review in cubic
React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
if (participant.name) { | ||
processedNames.add(participant.name); | ||
const createdHuman = await dbCommands.upsertHuman(newHuman); | ||
await dbCommands.sessionAddParticipant(id, createdHuman.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The set that tracks existing participant emails is not updated after a successful insertion, so duplicate emails within eventParticipants can cause multiple sessionAddParticipant calls for the same human, risking database duplication errors and unnecessary work.
Prompt for AI agents
Address the following comment on apps/desktop/src/routes/app.note.$id.tsx at line 96:
<comment>The set that tracks existing participant emails is not updated after a successful insertion, so duplicate emails within eventParticipants can cause multiple sessionAddParticipant calls for the same human, risking database duplication errors and unnecessary work.</comment>
<file context>
@@ -120,15 +92,8 @@ export const Route = createFileRoute("/app/note/$id")({
linkedin_username: null,
};
- humanToAdd = await dbCommands.upsertHuman(newHuman);
- }
-
- if (humanToAdd) {
- await dbCommands.sessionAddParticipant(id, humanToAdd.id);
- addedCount++;
</file context>
Summary by cubic
Fixed participant adding logic in the calendar note view to prevent duplicate or deleted users from being re-added.