Read a thread
A reader wants to follow one conversation from its first comment through every reply, knowing who said what and when.

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

Thread

The screen where a thread is read

All comments

One of the places a thread is opened from

Document and site home

The other entry point, and where the document line leads

DiscussBubble

Every comment: face, name, time, "Replying to", Markdown text

DiscussThreadRow

The row that leads into the thread

Avatar

The 28 point author faces

StatusLine

The failure sentence with Retry

list and section

The refreshable transcript

link

The document line

text

Markdown comment text that can be selected

progress

The loading spinner

Loading, failure and empty states

Loading and failure with Retry

States for every screen

The thread row of the state table

Refresh, haptics and progress

Pull to refresh

Names, not identifiers

Names first, short ids as the fallback

Reading first

A group transcript, all left-aligned

Typography

Body for the root, callout for replies, footnote for times

Representative strings

Reply counts and relative time wording

Moving between tabs and into the app

How a thread opened from Activity differs

Implementation

Page

Part it plays

Discuss: screens and components

DiscussThreadScreen, DiscussBubble and whenText

Discuss: loading and posting

loadThread: the comment lookup, the listing, the document title, the fallback for a fresh comment

Discuss: threading logic

threadRows: nesting, order, depth cap, parent names; commentMarkdown

Discuss: root contract wiring

discussThreadIds, the discussThreads resource, the minute clock

Read: blocks to rows and inline Markdown

Comment blocks become Markdown through the reader converter

Read: ids, refs and link targets

Short ids, media URLs and document links

Root declarations: Read and Discuss

readTick and the discuss declarations

Navigation and routes

The thread route /c/:uid/:comment

State, refresh and stale-reply patterns

discussRefresh and discussRetry

Shared components and visual design

Avatar and StatusLine

Seed site read API

Resource, ResourceMetadata and ListComments

Contract UI tests

The thread tests against live hyper.media

Bun unit tests

Threading and invalidation unit tests

Current limits and known gaps

Thread depth is capped at 4

Code

File

What

discuss.contract L186-240

DiscussThreadScreen

discuss.contract L49-67

DiscussBubble

discuss.contract L43-47

repliesText, commentsText and whenText

app.contract L107-120

pkg:discuss declarations (discussThreadIds, discussThreads)

app.contract L329-332

discussRefresh and discussRetry

app.contract L762-769

pkg:discuss view (the thread, comments and compose screens)

src/discuss/load.ts L106-156

fetchComment, docTitle, loadThread, loadThreads

src/discuss/logic.ts L197-230

threadRows and the depth cap

src/discuss/logic.ts L104-163

commentMarkdown, isPublic, rowOf

ui.contract L23-31

StatusLine

Tests

File

What it checks

discuss.test.contract

discuss: a thread shows its root and replies

discuss.test.contract

discuss: a thread row from the summary opens the thread

discuss.test.contract

discuss: comment times are relative and follow the clock

src/discuss/__tests__/logic.test.ts

thread: replies nest under the comment they answer, oldest first; ids and markdown

src/discuss/__tests__/load.test.ts

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

Connections0
Linked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkLinked document ยท Outgoing linkRead a threadRead a thread
Citations 0Children & links 40

Loading child documentsโ€ฆ

Connections show where other documents or comments link to this document.

Related documents

Loading connectionsโ€ฆ