Summary
Replying to or forwarding an email without a subject currently produces the literal subjects Re: undefined and Fwd: undefined.
Current implementation
apps/web/src/features/block-email/util/subjectText.ts interpolates replyingTo.subject directly for both paths. ApiMessage.subject is optional, so a subjectless message reaches the template literal as undefined.
Expected result
- Reply and Reply All use
Re: for a subjectless message.
- Forward uses
Fwd: for a subjectless message.
- Existing subjects and existing case-insensitive
Re: prefixes keep their current behavior.
Suggested direction
Normalize the optional source subject before adding the reply or forward prefix, and add focused tests in subjectText.test.ts.
Non-goals
- Changing how subjects are displayed outside the composer.
- Changing provider-specific or localized subject prefixes.
Summary
Replying to or forwarding an email without a subject currently produces the literal subjects
Re: undefinedandFwd: undefined.Current implementation
apps/web/src/features/block-email/util/subjectText.tsinterpolatesreplyingTo.subjectdirectly for both paths.ApiMessage.subjectis optional, so a subjectless message reaches the template literal asundefined.Expected result
Re:for a subjectless message.Fwd:for a subjectless message.Re:prefixes keep their current behavior.Suggested direction
Normalize the optional source subject before adding the reply or forward prefix, and add focused tests in
subjectText.test.ts.Non-goals