From 9540c88d5aff8c3843a0febdb148fd2e551bf540 Mon Sep 17 00:00:00 2001 From: denis0001-dev Date: Mon, 6 Oct 2025 14:20:15 +0300 Subject: [PATCH] Clean up --- .cursor/commands/clean-up.md | 4 + .../app/ui/components/chat/ChatMessages.tsx | 4 +- .../ui/components/chat/MessageContextMenu.tsx | 1 - .../ui/components/chat/MessageReactions.tsx | 5 +- .../app/ui/components/chat/ReactionBar.tsx | 100 ------------------ 5 files changed, 7 insertions(+), 107 deletions(-) create mode 100644 .cursor/commands/clean-up.md delete mode 100644 frontend/src/pages/app/ui/components/chat/ReactionBar.tsx diff --git a/.cursor/commands/clean-up.md b/.cursor/commands/clean-up.md new file mode 100644 index 0000000..b18b60b --- /dev/null +++ b/.cursor/commands/clean-up.md @@ -0,0 +1,4 @@ +View git diff between the branch i specified and HEAD. If no branch is specified, +default to main. Identify code that needs to be cleaned up, like debug logs, +unused variables etc. Think twice before removing or adding code, because you +mustn't alter the behavior. \ No newline at end of file diff --git a/frontend/src/pages/app/ui/components/chat/ChatMessages.tsx b/frontend/src/pages/app/ui/components/chat/ChatMessages.tsx index 1fa5bfd..865dcff 100644 --- a/frontend/src/pages/app/ui/components/chat/ChatMessages.tsx +++ b/frontend/src/pages/app/ui/components/chat/ChatMessages.tsx @@ -131,7 +131,7 @@ export function ChatMessages({ messages = [], children, isDm = false, onReplySel const dmEnvelopeId = message?.runtimeData?.dmEnvelope?.id; if (dmEnvelopeId) { - await request({ + await request({ type: "addDmReaction", credentials: { scheme: "Bearer", credentials: user.authToken }, data: { @@ -142,7 +142,7 @@ export function ChatMessages({ messages = [], children, isDm = false, onReplySel } } else { // For regular chat messages - await request({ + await request({ type: "addReaction", credentials: { scheme: "Bearer", credentials: user.authToken }, data: { diff --git a/frontend/src/pages/app/ui/components/chat/MessageContextMenu.tsx b/frontend/src/pages/app/ui/components/chat/MessageContextMenu.tsx index 41ebb14..8b7750e 100644 --- a/frontend/src/pages/app/ui/components/chat/MessageContextMenu.tsx +++ b/frontend/src/pages/app/ui/components/chat/MessageContextMenu.tsx @@ -149,7 +149,6 @@ export function MessageContextMenu({ setIsClosing(false); setAnimationClass('entering'); // Reset for next opening }, 200); // Match the animation duration from _animations.scss - // TODO no hardcoded delays } interface Action { diff --git a/frontend/src/pages/app/ui/components/chat/MessageReactions.tsx b/frontend/src/pages/app/ui/components/chat/MessageReactions.tsx index 06d4246..f086ac4 100644 --- a/frontend/src/pages/app/ui/components/chat/MessageReactions.tsx +++ b/frontend/src/pages/app/ui/components/chat/MessageReactions.tsx @@ -88,12 +88,9 @@ export function MessageReactions({ reactions, onReactionClick, messageId }: Mess const hasUserReacted = reaction.users.some(u => u.id === user.currentUser?.id); const isAnimating = animatingReactions.has(reaction.emoji); - // Create a unique key that includes messageId, emoji, count, and index to prevent duplicates - const uniqueKey = `${messageId || 'unknown'}-${reaction.emoji}-${reaction.count}-${index}`; - return ( - ))} - - - - ); -}