diff --git a/components/email/email-composer.tsx b/components/email/email-composer.tsx index ccdb1bc3..9d612259 100644 --- a/components/email/email-composer.tsx +++ b/components/email/email-composer.tsx @@ -647,6 +647,11 @@ export function EmailComposer({ if (nextHtml !== currentHtml) { editor.commands.setContent(nextHtml, { emitUpdate: true }); } + // Intentionally keyed to the signature-relevant fields plus the internal + // prev*Ref guards above; depending on the whole `signatureIdentity` object + // would re-run on unrelated identity-field changes and re-splice the + // signature into the live editor. + // eslint-disable-next-line react-hooks/exhaustive-deps }, [signatureIdentity?.id, signatureIdentity?.htmlSignature, signatureIdentity?.textSignature, signatureSeparatorEnabled, signaturePosition, mode, plainTextMode]); useEffect(() => { diff --git a/components/email/email-viewer.tsx b/components/email/email-viewer.tsx index c18a19d3..239c86f8 100644 --- a/components/email/email-viewer.tsx +++ b/components/email/email-viewer.tsx @@ -1331,6 +1331,10 @@ export function EmailViewer({ }, markAsReadDelay); return () => clearTimeout(timeout); + // Keyed to email id + $seen only: depending on the whole `email` object + // would reset the mark-as-read delay timer whenever any unrelated email + // field updates (e.g. a background re-fetch). + // eslint-disable-next-line react-hooks/exhaustive-deps }, [email?.id, email?.keywords?.$seen, onMarkAsRead]); // Reset external content permission and quick reply when email changes @@ -2260,6 +2264,11 @@ export function EmailViewer({ })); return [...jmapAttachments, ...tnefExtracted, ...embeddedExtracted]; + // The memo derives only from `email.attachments` (findCalendarAttachment + // scans that array); depending on the whole `email` object would rebuild the + // attachment list — and its downstream layout measurement — on every email + // field change. + // eslint-disable-next-line react-hooks/exhaustive-deps }, [email?.attachments, smimeDecryptedAttachments, tnefHtml, tnefText, tnefAttachments, embeddedEmailUnwrapped, embeddedEmailAttachments, calendarInvitationParsingEnabled, hideInlineImageAttachments]); // Measure attachment chips in the below-header row to determine how many fit @@ -2968,7 +2977,7 @@ export function EmailViewer({ ${wordHtmlCSS} ${darkModeCSS}
${effectiveEmailContent.html}