Skip to content

Add quote-reply to messages - #27

Merged
emilhauk merged 3 commits into
masterfrom
quote-reply
Sep 6, 2026
Merged

emilhauk merged 3 commits into
masterfrom
quote-reply

Conversation

@emilhauk

@emilhauk emilhauk commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Quote-reply, not threads. Reply = normal message with reply_to field on the hash. Timeline stays flat.
  • hydrateReply() loads parent + author; deleted parent renders "Message deleted".
  • message.html: .message__quote anchor to #msg-<parent>, native scroll + :target highlight.
  • Reply button in hover toolbar (desktop) and action sheet (mobile). "Replying to" strip above composer; clears on send, cancel, Escape.
  • POST /rooms/{id}/messages validates reply_to: must exist, same room, non-system, else 400.
  • New template funcs: truncate.

Known limits

  • Quote text snapshot at render time; edited parent is stale on SSE-pushed copy until reload.
  • Anchor does nothing if parent is outside loaded history.

Test plan

  • go test ./... -race -short
  • go test ./internal/browser/...
  • npm run lint
  • New: TestHandlePost_Reply_BroadcastsQuote, TestHandlePost_Reply_OtherRoomRejected, TestHandleRoom_Reply_DeletedParentPlaceholder

🤖 Generated with Claude Code

emilhauk and others added 3 commits September 6, 2026 17:13
Replies are ordinary messages with a reply_to field; the timeline stays
flat. Parent author + text render as a quote block linking to the
original. Reply button in the hover toolbar and mobile action sheet;
"Replying to" strip above the composer.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@emilhauk
emilhauk merged commit 9b65393 into master Sep 6, 2026
4 checks passed
@emilhauk
emilhauk deleted the quote-reply branch September 6, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant