diff --git a/web/app/components/workflow/comment/thread.tsx b/web/app/components/workflow/comment/thread.tsx index 80aa02521d..cdc09c813a 100644 --- a/web/app/components/workflow/comment/thread.tsx +++ b/web/app/components/workflow/comment/thread.tsx @@ -179,6 +179,7 @@ export const CommentThread: FC = memo(({ appId ? state.mentionableUsersCache[appId] : undefined )) const mentionUsers = mentionUsersFromStore ?? [] + const setCommentPreviewHovering = useStore(state => state.setCommentPreviewHovering) // Extract all mentionable names for highlighting const mentionableNames = useMemo(() => { @@ -192,6 +193,10 @@ export const CommentThread: FC = memo(({ setReplyContent('') }, [comment.id]) + useEffect(() => () => { + setCommentPreviewHovering(false) + }, [setCommentPreviewHovering]) + // P0: Auto-focus reply input when thread opens or comment changes useEffect(() => { const timer = setTimeout(() => { @@ -344,6 +349,8 @@ export const CommentThread: FC = memo(({ top: canvasPosition.y, transform: 'translateY(-20%)', }} + onMouseEnter={() => setCommentPreviewHovering(true)} + onMouseLeave={() => setCommentPreviewHovering(false)} >