Behaviour SwRS-MDOKFSTUDIO-REVIEW-167
An inline THREAD comment shows as a thread chip with its messages
When a document holds a `<!-- THREAD` comment as its own block, the renderer SHALL write a green chip with a speech bubble, labelled with the author of the first message and, with several messages, followed by their number in parentheses, whose box lists each message with its author, date and text, and write any other THREAD comment as an ordinary comment chip.
Step 1 of path 1 in StRS-MDOKFSTUDIO-REVIEW-015: from “A document holds an inline THREAD comment” to “The thread chip is open with its messages”.
Scenarios 6
The situations the tests check; open one to read it.
nominalChip label
| Thread | Chip |
|---|---|
| Two messages, the first by User 1 | The chip reads "User 1 (2)"; its wrapper has the kind thread and the count 2 |
| One message by Ada | The chip reads Ada |
nominalOpen thread lists one entry for each message
Givena thread of two messages
Whenthe chip is opened
Thena box titled Thread shows two entries with author, date and text, and the text keeps its line breaks; the same thread written with CRLF line ends and trailing spaces gives the same entries
nominalA message is a header line followed by indented text
Givena thread with the headers "User 1 (2026-10-16 10:47):" and "User 2 (2026-10-16 10:52):", the first text spanning two lines
Whenthe body is read
Thentwo messages are returned with author, date and text; each line after a header up to the next header loses one indentation of up to two spaces or a tab, and blank lines inside a message are kept
boundaryIndentation and blank lines
| Input | Outcome |
|---|---|
| A message indented with a tab and holding a blank line | The text is "first\n\nsecond" |
| A line that is not indented | The line is kept as text |
refusalA THREAD comment that is not a thread
| Input | Outcome |
|---|---|
| The comments "THREADS", "TODO THREAD", "THREAD" alone | None is a thread; THREADS and THREAD alone are ordinary comment chips, TODO THREAD is a TODO chip |
| "THREAD" with stray text before the first header | Not a thread |
| A header dated 2026-1-2 3:04 (another date format) | Not a thread |
| A THREAD comment inside a paragraph | A gray comment chip |
boundaryA thread inside a tab item keeps its own source lines
Givena tab item that holds an inline thread comment from line 7 to line 12
Whenthe document is rendered
Thenthe thread wrapper carries data-line 7 and data-end-line 12, so that the reply and the delete of the thread name those lines, and the tab panel stays one block