From d70ab81363f05226ca02e50b78d92b5979880ba4 Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:15:09 +0800 Subject: [PATCH] feat(issues): add context menu to all comments with copy support Own comments show Copy/Edit/Delete; others' comments show Copy only. Also adds icons to menu items for consistency with other dropdown menus. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../issues/components/comment-card.tsx | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/apps/web/features/issues/components/comment-card.tsx b/apps/web/features/issues/components/comment-card.tsx index eef902d4..b72baec2 100644 --- a/apps/web/features/issues/components/comment-card.tsx +++ b/apps/web/features/issues/components/comment-card.tsx @@ -1,7 +1,7 @@ "use client"; import { useState } from "react"; -import { MoreHorizontal } from "lucide-react"; +import { Copy, MoreHorizontal, Pencil, Trash2 } from "lucide-react"; import { toast } from "sonner"; import { Card } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; @@ -103,7 +103,7 @@ function CommentRow({ - {!isTemp && isOwn && ( + {!isTemp && ( - Edit - - onDelete(entry.id)} variant="destructive"> - Delete + { + navigator.clipboard.writeText(entry.content ?? ""); + toast.success("Copied"); + }}> + + Copy + {isOwn && ( + <> + + + + Edit + + + onDelete(entry.id)} variant="destructive"> + + Delete + + + )} )}