Behaviour SwRS-MDOKFSTUDIO-REVIEW-186
The host appends a valid reply inside the thread comment under the author
When the host receives a reply to an inline thread, the extension SHALL, if the named lines are still exactly one thread comment and the document has not changed meanwhile, add one message, a header with the author on one line and the local date and time as YYYY-MM-DD HH:MM and the reply text indented by two spaces, above the closing --> and change nothing else, and otherwise answer with the reason and leave the document unchanged; a previewThreadReply message is dropped unless it has an edit id, integer lines with 1 <= line <= endLine and a text of 1 to 10 000 characters that is not blank.
Step 3 of path 1 in StRS-MDOKFSTUDIO-REVIEW-015: from “The reply is sent with the lines of the thread” to “The reply is in the thread comment”.
Part of StRS-MDOKFSTUDIO-REVIEW-003, outside the paths drawn on its map.
Scenarios 8
The situations the tests check; open one to read it.
nominalReply above the closing marker
nominalLine break, indentation and text after the marker
nominalAuthor in the header
boundaryClosing marker position and marker in the text
| Input | Outcome |
|---|---|
| The lines "<!-- THREAD", "Ada (2026-10-16 10:47):", " hello -->" and a reply x | the last lines become " hello", the reply header, " x" and "-->": the text stays on its line and the marker moves below the reply |
| A closing marker alone on its line | no line is split |
| A reply "a --> b" | the line reads " a -- > b" and the comment stays open; no reply line contains --> |
| A reply without the marker | the text is written as typed |
refusalLines that are not exactly one thread
| Input | Outcome |
|---|---|
| Lines 5 to 8 that hold exactly one thread comment | the reply is applied |
| Lines that hold ordinary text | the answer is "The thread is no longer in the source. Refresh the preview." and the document is unchanged |
| Lines that hold a part of the thread | the answer is "The thread is no longer in the source. Refresh the preview." and the document is unchanged |
| Lines that hold the thread and more | the answer is "The thread is no longer in the source. Refresh the preview." and the document is unchanged |
refusalDocument changed while the author is resolved
| Input | Outcome |
|---|---|
| A reply whose author lookup is slow and an edit of the document in between | the answer is "The document changed meanwhile. Try again." and nothing is changed |
| No edit in between | the reply is planned and applied |
nominalValid reply message
refusalInvalid reply message
| Input | Outcome |
|---|---|
| A missing edit id | dropped |
| Line 0 | dropped |
| An end line before the line | dropped |
| A blank text in a previewThreadReply | dropped |
| A text of 10 001 characters in a previewThreadReply | dropped |