Send text message (composer, Enter, status indicator) #9
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
posta/chat#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#2
What to build
A textarea composer pinned to the bottom of the thread. Enter sends; Shift+Enter inserts newline. Empty/whitespace input is a no-op. Submitting POSTs through chat.posta.no to posta-server's
POST /api/v1/messageswith aposta.text/v1payload. The new bubble renders inline from the response. Outbound bubble shows thependingstatus indicator (clock); later states (delivered,failed-*) will animate in once Slice 8's SSE arrives. Idempotency-Key header is generated per send to make retries safe.Acceptance criteria
/c/<peer>views, focused on page loadPOST /api/v1/messageswith{peer, payload:{kind:"posta.text/v1", body}}Idempotency-Keyheader generated client-side per send (UUID v4)pendingstatus indicatorpending/sending→ clock;delivered→ check;failed-permanent→ red triangle;failed-pending-user→ orange triangleinternal/postaclient implementsSendMessage(ctx, token, serverURL, peer, payload, idempotencyKey)Blocked by