Start new conversation (URL input → actor-doc preview → implicit-on-send) #11

Open
opened 2026-05-14 23:17:16 +02:00 by arne · 0 comments
Owner

Parent

#2

What to build

A "+" affordance in the sidebar header opens an inline URL input. As the user types/blurs a well-formed URL, chat.posta.no fetches the peer's posta actor doc and previews their display name. Clicking "Start" navigates to /c/<url-encoded-peer> with an empty thread. The contact row is NOT created by chat.posta.no — it's created implicitly on posta-server when the user sends their first message (posta-server inserts the contact row on first send). After the first send, the SSE contact-changed trigger from Slice 8 surfaces the new peer in the sidebar.

Acceptance criteria

  • "+" button visible in the sidebar header
  • Clicking expands an inline form with a URL input
  • On blur of a well-formed URL, backend fetches the peer's actor doc and shows "Sending to ()"
  • Malformed URL shows "invalid URL" inline; unreachable peer shows "couldn't reach this peer"
  • "Start" navigates to /c/<peer>; thread is empty; composer is focused
  • No contact row is created on chat.posta.no or posta-server until the first message is sent
  • After the first send, the SSE contact-changed event fires and the peer appears in the contacts list
  • Discarding (back, refresh, no send) leaves no trace on either chat.posta.no or posta-server

Blocked by

## Parent #2 ## What to build A "+" affordance in the sidebar header opens an inline URL input. As the user types/blurs a well-formed URL, chat.posta.no fetches the peer's posta actor doc and previews their display name. Clicking "Start" navigates to `/c/<url-encoded-peer>` with an empty thread. The contact row is NOT created by chat.posta.no — it's created implicitly on posta-server when the user sends their first message (posta-server inserts the contact row on first send). After the first send, the SSE `contact-changed` trigger from Slice 8 surfaces the new peer in the sidebar. ## Acceptance criteria - [ ] "+" button visible in the sidebar header - [ ] Clicking expands an inline form with a URL input - [ ] On blur of a well-formed URL, backend fetches the peer's actor doc and shows "Sending to <name> (<host>)" - [ ] Malformed URL shows "invalid URL" inline; unreachable peer shows "couldn't reach this peer" - [ ] "Start" navigates to `/c/<peer>`; thread is empty; composer is focused - [ ] No contact row is created on chat.posta.no or posta-server until the first message is sent - [ ] After the first send, the SSE `contact-changed` event fires and the peer appears in the contacts list - [ ] Discarding (back, refresh, no send) leaves no trace on either chat.posta.no or posta-server ## Blocked by - #10
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
posta/chat#11
No description provided.