add message replies in chat

Reply to a specific message in a conversation. Adds a Reply action to the
message context menu, a quoted preview in the composer, an inline quote in
the sent bubble, and tap-to-scroll back to the original (when loaded).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-06-13 17:17:13 +03:00
parent 02a47fb4a6
commit 60c9f9071c
8 changed files with 431 additions and 41 deletions
+4
View File
@@ -119,6 +119,7 @@ export class Convo {
optimisticEmbedView?:
| $Typed<AppBskyEmbedRecord.View>
| $Typed<ChatBskyEmbedJoinLink.View>
optimisticReplyTo?: $Typed<ChatBskyConvoDefs.MessageView>
}
> = new Map()
private deletedMessages: Set<string> = new Set()
@@ -999,6 +1000,7 @@ export class Convo {
optimisticEmbedView?:
| $Typed<AppBskyEmbedRecord.View>
| $Typed<ChatBskyEmbedJoinLink.View>,
optimisticReplyTo?: $Typed<ChatBskyConvoDefs.MessageView>,
) {
// Ignore empty messages for now since they have no other purpose atm
if (!message.text.trim() && !message.embed) return
@@ -1012,6 +1014,7 @@ export class Convo {
id: tempId,
message,
optimisticEmbedView,
optimisticReplyTo,
})
if (this.convo?.view.status === 'request') {
this.updateConvo({
@@ -1363,6 +1366,7 @@ export class Convo {
message: {
...m.message,
embed: m.optimisticEmbedView,
replyTo: m.optimisticReplyTo,
$type: 'chat.bsky.convo.defs#messageView',
id: nanoid(),
rev: '__fake__',