From bd597497e7a3a7e6fef5c9f8b0aad462b63042aa Mon Sep 17 00:00:00 2001 From: hjlarry Date: Thu, 27 Nov 2025 15:37:46 +0800 Subject: [PATCH] prevent comment thread pinch --- web/app/components/workflow/comment/thread.tsx | 7 +++++++ 1 file changed, 7 insertions(+) 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)} >