From 0a1114f71008033ebe46cfadcd3496cc48704882 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Mon, 27 Jul 2026 20:38:02 +1200 Subject: [PATCH] fix: fall back to a real tab title for subject-less Pro forward-as-attachment buildForwardAsAttachmentPayload intentionally returns an empty subject for a subject-less email (matching normal Forward's composer-subject behavior, fixed in 3bfa73f3), but this handler was reusing that same empty string as the Pro compose tab's title. handleForward, right above it, already computes its title with a fallback (email.subject || t('email_composer.new_message')) before prefixing - mirror that instead of reusing payload.subject for the title. Caught by GitHub Copilot's automated PR review. --- components/pro/pro-email-tab-body.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/pro/pro-email-tab-body.tsx b/components/pro/pro-email-tab-body.tsx index dc3d03cc..625a6982 100644 --- a/components/pro/pro-email-tab-body.tsx +++ b/components/pro/pro-email-tab-body.tsx @@ -171,7 +171,13 @@ export function ProEmailTabBody({ tabId, data }: ProEmailTabBodyProps) { attachments: [payload.attachment], }, sourceEmailId: email.id, - title: payload.subject, + // payload.subject is intentionally blank for a subject-less email (to + // match normal Forward's *composer* subject behavior - see + // buildForwardAsAttachmentPayload). The Pro tab *title* is a separate + // UI label that still needs a sensible fallback, same as handleForward + // above uses - reusing payload.subject here would give the tab an + // empty title instead of e.g. "Fwd: New message". + title: buildForwardSubject(email.subject || t('email_composer.new_message'), t('email_composer.prefix.forward')), }); }, [email, openComposeTab, t]);