Problem
In a conversation thread, a reply currently renders as one big bubble that can include the quoted original underneath the new text (email clients append the quoted chain on send, and rich-HTML replies render their full body including the quote). This buries the actual new content and reads like classic email, not chat.
Plain-text replies are already partially handled — stripQuotedText hides the quoted tail in the chat view — but there is no visual link back to the message being replied to, and rich-HTML replies still show the whole quoted chain.
Proposed behaviour (WhatsApp-style)
When a message in the thread is a reply to an earlier message:
- Show only the new content in the bubble — for plain text and for rich HTML replies (strip/hide the quoted chain in both).
- Attach a compact quoted preview at the top of the bubble, WhatsApp-style:
- small colored accent bar + original sender's name + a 1–2 line snippet of the original message
- visually distinct (tinted background inside the bubble)
- Tap/click the quoted preview scrolls to the original message in the thread (with a brief highlight), when the original is present in the conversation.
- If the original message isn't in the loaded conversation (e.g. it was permanently deleted), show the preview without the jump affordance.
Implementation pointers
src/nonview/email/quotedText.ts — existing plain-text quote stripping (extend/reuse; needs an HTML equivalent, e.g. stripping blockquote/gmail_quote containers)
src/nonview/core/replyContext.ts — builds the outgoing quote; outgoing replies already carry In-Reply-To/References headers
- Linking reply → original: match
in_reply_to against the thread messages' message_id (both already exist in the Message DTO; ThreadMessage would need to carry them)
src/view/moles/MessageBubble.tsx — render the quoted-preview block and the scroll-to-original behaviour
Edge cases
- Replies composed in other clients (Gmail/Outlook) with different quoting formats — the quote parser should degrade gracefully (worst case: current behaviour)
- Forwarded messages should keep their quoted content visible (a forward's content is the quote)
- Nested replies: only preview the immediate parent, not the whole chain
Problem
In a conversation thread, a reply currently renders as one big bubble that can include the quoted original underneath the new text (email clients append the quoted chain on send, and rich-HTML replies render their full body including the quote). This buries the actual new content and reads like classic email, not chat.
Plain-text replies are already partially handled —
stripQuotedTexthides the quoted tail in the chat view — but there is no visual link back to the message being replied to, and rich-HTML replies still show the whole quoted chain.Proposed behaviour (WhatsApp-style)
When a message in the thread is a reply to an earlier message:
Implementation pointers
src/nonview/email/quotedText.ts— existing plain-text quote stripping (extend/reuse; needs an HTML equivalent, e.g. strippingblockquote/gmail_quotecontainers)src/nonview/core/replyContext.ts— builds the outgoing quote; outgoing replies already carryIn-Reply-To/Referencesheadersin_reply_toagainst the thread messages'message_id(both already exist in theMessageDTO;ThreadMessagewould need to carry them)src/view/moles/MessageBubble.tsx— render the quoted-preview block and the scroll-to-original behaviourEdge cases