From 8ccb387eecd5c58163cde1a5940652350425038c Mon Sep 17 00:00:00 2001 From: b-saikrishnakanth Date: Wed, 6 May 2026 19:12:42 +0530 Subject: [PATCH 1/2] fix: comment quick-actions menu hidden when no actions are available --- apps/web/core/components/comments/quick-actions.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/web/core/components/comments/quick-actions.tsx b/apps/web/core/components/comments/quick-actions.tsx index 8facbe0abfc..e7807aa1fad 100644 --- a/apps/web/core/components/comments/quick-actions.tsx +++ b/apps/web/core/components/comments/quick-actions.tsx @@ -78,11 +78,13 @@ export const CommentQuickActions = observer(function CommentQuickActions(props: icon: TrashIcon, shouldRender: canDelete, }, - ]; + ].filter((item) => item.shouldRender !== false); }, [t, setEditMode, canEdit, showCopyLinkOption, activityOperations, comment, showAccessSpecifier, canDelete] ); + if (MENU_ITEMS.length === 0) return null; + return ( } closeOnSelect> {MENU_ITEMS.map((item) => { From f4f3d9858fd5e657c3c08858ef59356d7a5e3c4b Mon Sep 17 00:00:00 2001 From: b-saikrishnakanth Date: Wed, 6 May 2026 19:39:32 +0530 Subject: [PATCH 2/2] refactor: remove dead code --- .../components/comments/quick-actions.tsx | 58 +++++++++---------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/apps/web/core/components/comments/quick-actions.tsx b/apps/web/core/components/comments/quick-actions.tsx index e7807aa1fad..eff40eab0b1 100644 --- a/apps/web/core/components/comments/quick-actions.tsx +++ b/apps/web/core/components/comments/quick-actions.tsx @@ -87,38 +87,34 @@ export const CommentQuickActions = observer(function CommentQuickActions(props: return ( } closeOnSelect> - {MENU_ITEMS.map((item) => { - if (item.shouldRender === false) return null; - - return ( - item.action()} - className={cn( - "flex items-center gap-2", - { - "text-placeholder": item.disabled, - }, - item.className + {MENU_ITEMS.map((item) => ( + item.action()} + className={cn( + "flex items-center gap-2", + { + "text-placeholder": item.disabled, + }, + item.className + )} + disabled={item.disabled} + > + {item.icon && } +
+
{item.title}
+ {item.description && ( +

+ {item.description} +

)} - disabled={item.disabled} - > - {item.icon && } -
-
{item.title}
- {item.description && ( -

- {item.description} -

- )} -
- - ); - })} +
+
+ ))}
); });