As a participant, I want to answer a thread, or one particular reply in it, without leaving the conversation, so that my answer lands exactly where it belongs.
Situation
I am reading a thread and have an identity selected on this phone. I may have arrived from a document, from All comments, or from a notification in Activity.
What I do
Tap the field at the bottom, "Write a reply…", and type.
Tap the send button.
To answer one specific reply, tap "Reply" under it, then type and send.
To change my mind, tap the close button next to "Replying to Name".
What I should see
A reply field stays fixed at the bottom of the thread and rides above the keyboard.
The field grows as I type, up to a few lines.
The send button is dimmed while the field is empty and while a reply is being published.
Sending without choosing a reply answers the first comment of the thread.
After sending, the field empties, my reply appears in the thread, and the phone gives a short success tap. The keyboard stays up.
The count under the first comment goes up, for example from "No replies yet." to "1 reply".
Each reply has a "Reply" button under it. Tapping it puts the cursor in the field and shows "Replying to Name" above it.
A reply sent that way appears indented under the comment I chose and carries "Replying to Name".
The close button beside "Replying to Name" (read aloud as "Reply to the thread instead") returns to answering the first comment.
After a reply is published, the target returns to the first comment.
In a thread opened from Activity, my reply goes to my own server, the one the notification came from.
When something goes wrong
If publishing fails, a red line appears above the field and my text is kept so I can send again. I may see "The server refused the comment (409): …", "Couldn't reach the server.", or "The reply version is unavailable. Refresh the thread and try again." For the last one I pull down to reload and resend.
Not included
My reply appears only after the server accepts it; nothing is shown in the meantime except the dimmed send button (Current limits).
Replies are one plain paragraph: no formatting, pictures or quoted text.
Replies cannot be edited or deleted.
The unsent text is one draft for all threads, so it follows me into another thread.
With no identity there is no field; see the story below.
Trace
Story US-DISC-04, 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 with the pinned composer and per-reply "Reply" buttons | |
The pinned field, the "Replying to" line, the error line and Send | |
The new reply, indented, with "Replying to Name" | |
The growing textarea | |
Reply, Send and the close button | |
The send and close symbols | |
One pinned composer, two targets; keyboard handling | |
The thread composer next to the compose sheet and the agents composer | |
Success haptic; Send disabled while posting | |
What signals posting, success and refusal | |
Red error above the field, draft kept | |
Which server a reply goes to | |
Replying in a thread opened from Activity | |
A refused reply says why | |
Labels "Send" and "Reply to the thread instead" | |
Exact placeholder and error wording |
Implementation
Page | Part it plays |
|---|---|
postComment for replies: parent checks, reply versions, publish | |
DiscussThreadScreen send target and DiscussComposer | |
discussDraft, discussReplyTo, discussSetReply focus, discussAfterPost | |
replyVersions and how the new reply nests | |
The parent lookup and the listing dropped after a post | |
Comment blob with reply parent and thread root versions | |
Reply bytes match the original client | |
The signer for the current identity | |
POST /api/PublishBlobs | |
discussPosted refreshes discussions and discussThreads | |
readContextServer, including the Activity thread context | |
focus, haptic and interactive-widget built-ins | |
The reply steps of the write test; the Activity thread reply test | |
Reply refusals and reply version unit tests | |
The local server whose publish endpoint refuses with 409 | |
No optimistic insert; plain paragraph |
Code
File | What |
|---|---|
DiscussComposer | |
the reply target and the send action of DiscussThreadScreen | |
the per-reply "Reply" button and the pinned composer | |
discussEdit, discussSetReply, discussPost, discussAfterPost | |
discussPosted mutation and discussPostError | |
postComment (parent checks at 182-189) | |
replyVersions | |
createComment | |
signerFor |
Tests
File | What it checks |
|---|---|
discuss: post a comment and replies on dev.hyper.media with a throwaway key | |
Activity thread fetch and reply use the configured server, not the covered document origin | |
posting refuses a reply parent from another document before signing or publishing; reply to a nested parent without a root version is refused; posting a valid nested reply sends current document, parent and root versions | |
a reply targets the tapped comment, the root stays the thread root (RN bug fix); a reply to a reply signs replyParent = that reply, threadRoot = the root |
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime