As a reader, I want to read one conversation from its first comment through every reply, so that I can follow who said what, in what order, and to whom.
Situation
I have found a thread I care about: under a document, in All comments, or from a notification. I may or may not have an identity; reading needs none.
What I do
Tap a thread under a document or in All comments.
Read the first comment, then the replies below it.
Tap a link inside a comment, or press and hold text to select it.
Tap the document's name at the top to go to the document.
Pull down to reload the thread.
What I should see
The Thread screen is titled "Thread" and has a back button.
A grey line at the top shows the title of the document under discussion; tapping it opens that document.
The first comment is in larger type than the replies.
Under the first comment is "No replies yet.", "1 reply" or "2 replies".
Replies read oldest first, each directly below the comment it answers.
A reply to a reply is indented and says "Replying to Name".
Every comment shows its author's picture and name. An author with no profile name is shown by a shortened ID.
Times are relative for a week: "now", "24 min. ago", "1 hr. ago", "1 day ago", "2 days ago". Older comments show a date such as "Feb 26, 2025".
Times move forward by themselves each minute, without reloading.
Formatting and links in a comment are kept; a comment with no text shows "(empty comment)".
Comments marked private are not shown.
Pulling down reloads the thread and shows the refresh spinner.
When something goes wrong
If the thread cannot be loaded, I see one sentence, for example "Couldn't reach the server." or "This comment is unavailable.", with a "Retry" button beside it. Tapping "Retry" loads it again. While the thread is failed there is no reply field.
If the document's title cannot be found, the line at the top reads "Document" and still opens it.
Not included
Tapping a name or picture does not open the author's profile (DiscussBubble).
Indentation stops growing after four levels; deeper replies stay at the same inset and rely on "Replying to Name" (Current limits).
An image in a comment appears as a link, not as a picture.
No reactions, no jumping to one particular reply, and no marker for comments that are new since my last visit.
Trace
Story US-DISC-02, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The screen where a thread is read | |
One of the places a thread is opened from | |
The other entry point, and where the document line leads | |
Every comment: face, name, time, "Replying to", Markdown text | |
The row that leads into the thread | |
The 28 point author faces | |
The failure sentence with Retry | |
The refreshable transcript | |
The document line | |
Markdown comment text that can be selected | |
The loading spinner | |
Loading and failure with Retry | |
The thread row of the state table | |
Pull to refresh | |
Names first, short ids as the fallback | |
A group transcript, all left-aligned | |
Body for the root, callout for replies, footnote for times | |
Reply counts and relative time wording | |
How a thread opened from Activity differs |
Implementation
Page | Part it plays |
|---|---|
DiscussThreadScreen, DiscussBubble and whenText | |
loadThread: the comment lookup, the listing, the document title, the fallback for a fresh comment | |
threadRows: nesting, order, depth cap, parent names; commentMarkdown | |
discussThreadIds, the discussThreads resource, the minute clock | |
Comment blocks become Markdown through the reader converter | |
Short ids, media URLs and document links | |
readTick and the discuss declarations | |
The thread route /c/:uid/:comment | |
discussRefresh and discussRetry | |
Avatar and StatusLine | |
Resource, ResourceMetadata and ListComments | |
The thread tests against live hyper.media | |
Threading and invalidation unit tests | |
Thread depth is capped at 4 |
Code
File | What |
|---|---|
DiscussThreadScreen | |
DiscussBubble | |
repliesText, commentsText and whenText | |
pkg:discuss declarations (discussThreadIds, discussThreads) | |
discussRefresh and discussRetry | |
pkg:discuss view (the thread, comments and compose screens) | |
fetchComment, docTitle, loadThread, loadThreads | |
threadRows and the depth cap | |
commentMarkdown, isPublic, rowOf | |
StatusLine |
Tests
File | What it checks |
|---|---|
discuss: a thread shows its root and replies | |
discuss: a thread row from the summary opens the thread | |
discuss: comment times are relative and follow the clock | |
thread: replies nest under the comment they answer, oldest first; ids and markdown | |
thread refresh invalidates removed comments and changed document titles |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime