mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-12 09:13:23 +00:00
Concord threads chat messages with kind-1111 minichat comments, but Buzz relays reject kind-1111 — so Buzz replies fell back to inline 40002 and rendered as flat quotes, never opening a thread. Buzz already threads over 40002 NIP-10 markers (matching block/buzz): a reply-marked, non-`broadcast` 40002 is a thread reply; a `broadcast=1` one is an inline timeline sibling. Teach Amethyst's minichat to speak that dialect: - Add `isMinichatReply(event)`: kind-1111 CommentEvent, OR a Buzz 40002 thread reply (reply-marked, non-broadcast). Used by all three read sites so they agree. - `LocalCache.computeReplyTo`: link a 40002 thread reply into its parent's replies. - Timeline filter, minichat reply-count, and minichat feed now key on that predicate, so 40002 thread replies leave the timeline, get counted on the "N replies" chip, and render inside the minichat. - Send: an INLINE reply on Buzz sets `broadcast=1` (stays inline); MINICHAT omits it (threads). `sendMinichatReply` posts a 40002 thread reply on Buzz instead of kind-1111. Verified on device: a message shows an "N replies" chip, opens the Thread view with the root + replies + composer, replies post and increment the count, and thread replies no longer appear inline in the main chat. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>