From f0c01481a36f6ea15bfe74062aa392c6258a8ddc Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 18 Jan 2026 23:11:23 +0000 Subject: [PATCH] feat: add context menu support for zap messages in chat - Wrap zap messages in ChatMessageContextMenu component - Add reply button that appears on hover (consistent with regular messages) - Add subtle hover transition to gradient border - Enable all context menu actions for zaps: * Reply to zap * React with emoji * Copy zap comment text * Open zap receipt event in detail view * Copy event ID (nevent) * View raw JSON This brings zap messages to feature parity with regular chat messages while maintaining their distinctive gradient border styling. --- src/components/ChatViewer.tsx | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/ChatViewer.tsx b/src/components/ChatViewer.tsx index f76f83c..45050a7 100644 --- a/src/components/ChatViewer.tsx +++ b/src/components/ChatViewer.tsx @@ -309,10 +309,10 @@ const MessageItem = memo(function MessageItem({ replyEvent && (CHAT_KINDS as readonly number[]).includes(replyEvent.kind); - return ( -
+ const zapMessageContent = ( +
{/* Reactions display - inline after timestamp */} + {canReply && onReply && ( + + )}
{shouldShowReplyPreview && (
); + + // Wrap in context menu if event exists + if (message.event) { + return ( + onReply(message.id) : undefined} + conversation={conversation} + adapter={adapter} + > + {zapMessageContent} + + ); + } + + return zapMessageContent; } // Regular user messages - wrap in context menu if event exists