Skip to content
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

5901 refactor email and calendar auto contact creation to create them by batch #6038

Conversation

bosiraphael
Copy link
Contributor

Closes #5901

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Added @types/lodash.chunk and lodash.chunk dependencies
  • Introduced CONTACTS_CREATION_BATCH_SIZE constant
  • Deleted messaging-message-channel.listener.ts
  • Refactored create-company-and-contact.service.ts to handle batch processing
  • Updated type definitions from Contacts to Contact[] across multiple files

9 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings

Comment on lines 45 to 49
objectRecordChangedProperties(
payload.properties.before,
payload.properties.after,
).includes('isContactAutoCreationEnabled') &&
payload.properties.after.isContactAutoCreationEnabled
Copy link

Choose a reason for hiding this comment

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

🪶 style: Consider adding error handling for the case where 'objectRecordChangedProperties' fails or returns unexpected results.

@bosiraphael bosiraphael requested a review from Weiko June 26, 2024 12:50
Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

  • Added AutoCompaniesAndContactsCreationMessageChannelListener to providers
  • Introduced listener for messageChannel.updated event
  • Batched creation of companies and contacts for efficiency
  • Removed messageChannel.updated listener from messaging-import-manager-message-channel.listener.ts
  • Focused messaging-import-manager-message-channel.listener.ts on messageChannel.deleted event for cache cleaning

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

@bosiraphael bosiraphael merged commit 4f9527c into main Jun 27, 2024
16 checks passed
@bosiraphael bosiraphael deleted the 5901-refactor-email-and-calendar-auto-contact-creation-to-create-them-by-batch branch June 27, 2024 14:37
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

  • Refactored email and calendar auto-contact creation to handle batch processing.
  • Replaced useSetRecordInStore with useUpsertRecordsInStore across multiple components for better record management.
  • Introduced new hooks and components for multi-record selection and handling.
  • Added WorkspaceJoinColumn decorators to various entity fields for improved join column handling.
  • Updated GraphQL queries and mutations to support batch operations and upsert functionality.

215 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor email and calendar auto contact creation to create them by batch
3 participants