Differential currently has a metamta.differential.unified-comment-context mode which renders diff context above inline comments in mail. However:
- it does this poorly, creating an indistinct blob of text in both text and HTML mail modes that is ugly and difficult to parse visually;
- this has limited utility when a comment is a reply, rather than a top-level comment: the parent comment is a more relevant piece of context.
A primary use case for improving this is to allow users to follow a review that they don't necessarily want to participate in purely from their mail client. They are not making a "do I need to act on this?" or "do I need to act on this right now?" decision as an author or reviewer who is actively engaged in the revision, but a "does this impact me?" decision as a passive bystander. Without context, following inline threads from mail is unreasonably difficult.
A reasonable approach may be:
- make the rendering good;
- show diff context for top-level comments;
- show thread context for reply comments.
In particular, I'm concerned that adding large amounts of context to mail likely dilutes the value of that mail for active participants, to the benefit of passive participants. The author and engaged reviewers generally have less need for context, but are also the users this mail should serve most directly.
For example, if a reviewer leaves an inline like "This is a security issue", the author doesn't need more context to know they must act on it. If the thread develops, they will likely recognize the context of replies because they'll have actively participated in the thread. However, a passive bystander may care about only some small subset of security issues, and not have enough information to figure out whether they want to engage or not from the tone and content of the comment alone.
This "show immediate context" approach attempts to balance utility of mail for active and passive participants, and avoid adding large blocks of content which is not relevant for active participants. At some level, even passive participants would virtually never benefit from more context (e.g., 7 lines of diff context + 14 blocks of thread context + a new comment as the rendering of a 15-comment thread is almost certainly not good for anyone).
It would be desirable to make this rendering good enough that it can become the only rendering mode and we can remove the metamta.differential.unified-comment-context option, effectively turning it on in all cases.
See also T9790 for adjacent work.