Now that parser & modifier are available in PHP, the user should be able to post replies without ever fetching the full Parsoid DOM:
"GetApiDiscussionData":Tools, paction=**transcludedfrom**
* Fetches Parsoid doc (throws it in memcache), runs the parser
* Returns the JSON blob from the parser, allowing the client to work out which comments can be replied tolist of comments which can't be replied to due to transclusion
"PostReply":ApiDiscussionToolsEdit, paction=**addcomment**
* Receives the comment ID and reply HTML; fetches Parsoid doc (hopefully from memcache), runs the modifier, converts to wikitext and saves the edit
=== Testing details
- Test environment: **<https://en.wikipedia.beta.wmflabs.org/>**
- "Sequences" to test:
-- **Sequence 1**
--- Action: Post many comments to a talk page
--- Outcome: ensure they are all posted properly [i]
-- **Sequence 2**
--- Action: open and close the Reply Tool in many places on a single page
--- Outcome: ensure the tool opens and closes properly.
-- **Sequence 3**
--- Action: Cause an error when submitting a reply (e.g. abuse filter), then retry after fixing it (see T245333)
--- Outcome: ensure said comment was posted correctly and only once (it's not duplicated)
-- **Sequence 4**
--- Action: try using the Reply Tool to a comment that has been transcluded from another page;
--- Outcome: ensure the comment you posted with the Reply Tool is posts properly in both places: the page //from// which the comment you are responding was transcluded and the page //on// which the comment you are responding to appears.
-- **Sequence 5**
--- Action: try using the Reply Tool to respond to a comment that has since been deleted
--- Outcome: ensure the appropriate error message is shown
-- **Sequence 6**
--- Action: Try using the Reply Tool to post multiple replies to the same comment (nearly) simultaneously, while using two different accounts (using incognito mode, or two different browsers or devices)
--- Outcome: ensure all comments have been posted properly [i]
=== Done
- [ ] The "Testing details" section is accurate and exhaustive
- [ ] All "Sequences" in the "Testing details" section pass/work as expected
---
i. "Properly" means they are indented correctly, no extraneous syntax/content has been added to the comment, no syntax/content has been removed from the comment and no other parts of the page have been changed.//