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

7242 error when displaying message threads with a large number of participants #7251

Conversation

bosiraphael
Copy link
Contributor

Closes #7242

Copy link
Contributor

@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

This pull request addresses an issue where message threads with a large number of participants were causing errors in the email thread display. The changes focus on improving the handling of email thread participants and ensuring the 'from' sender is always available.

Key changes include:

  • Added a new EmailThreadMessageWithSender type in EmailThreadMessageWithSender.ts to ensure each message has an associated sender
  • Modified useRightDrawerEmailThread.ts to fetch message senders separately and filter out messages without senders
  • Updated RightDrawerEmailThread.tsx to simplify message rendering logic and add a sender prop to EmailThreadMessage components
  • Adjusted EmailThreadMessageParticipant.ts to include additional fields for better identification and typing
  • Updated fetchAllThreadMessagesOperationSignatureFactory.ts to simplify the messageParticipants field in the GraphQL query

These changes should resolve the crash that occurred when the 'from' recipient couldn't be found in the list of participants, improving the stability of the email thread display feature.

8 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

Comment on lines +158 to +160
if (!sender) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Log missing senders for debugging purposes

@bosiraphael bosiraphael merged commit 3d5ecc9 into main Sep 25, 2024
8 of 13 checks passed
@bosiraphael bosiraphael deleted the 7242-error-when-displaying-message-threads-with-a-large-number-of-participants branch September 25, 2024 14:53
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.

Error when displaying message threads with a large number of participants
2 participants