It would be nice to be able to attach a discussion to a particular place or range in a revision. Aspects or implementation details of this feature idea have been discussed before (T147896, T116350), but there is apparently no previous overarching product description.
@Jdforrester-WMF suggests the product name DiscussThis.
UI concept:
* Discussions are always visible on the talk/flow page associated with the article being commented on. They should be displayed similarly to existing manual solutions, with quoted text followed by comments.
* Discussions are optionally visible in VE (including the new wikitext mode). There would be a button to mark the discussion "resolved" so as to dismiss it from the VE view, and a way to reverse such dismissal.
* Discussions can be created from the diff view.
** A discussion creation link on each wikitext line would provide a degraded non-JS fallback for comment creation.
** A discussion created in the diff view would remain publicly visible in the diff view.
** The revision author would be notified.
** A discussion on the diff view of the current revision would be visible in VE by default.
* A discussion could also be created from VE. Such discussions would not need to be shown in the diff view in the minimum viable product.
Implementation details:
* A discussion is canonically associated with a fixed rev_id and a byte offset into the wikitext.
* The source position can be mapped to a Parsoid DOM node using Parsoid's DSR feature.
* The source position would be carried forward from one revision to the next by considering a wikitext diff.
* There would be a table tracking inline discussions, with an autoincremented discussion ID.
* In the case of discussions hosted on non-Flow talk pages, a parser function would specify the discussion ID. On save, a hook would update a tracking table, enabling the diff and VE views to find the discussion even after archiving of the talk page.
Credit to @cscott and @ssastry who came up with most of the ideas here.
See also:
* {T89575}
* {T103081}
* {T116350}
* {T147896}
* {T149667}