diff --git a/.changeset/famous-brooms-mate.md b/.changeset/famous-brooms-mate.md new file mode 100644 index 00000000..fd167ff4 --- /dev/null +++ b/.changeset/famous-brooms-mate.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Corrected issue with 'See more' button in task header diff --git a/webview-ui/src/components/chat/TaskHeader.tsx b/webview-ui/src/components/chat/TaskHeader.tsx index 5aa67fbf..b21dc0ba 100644 --- a/webview-ui/src/components/chat/TaskHeader.tsx +++ b/webview-ui/src/components/chat/TaskHeader.tsx @@ -94,19 +94,20 @@ const TaskHeader: React.FC = ({ }, [isTextExpanded, windowHeight]) useEffect(() => { - if (textRef.current && textContainerRef.current) { + if (isTaskExpanded && textRef.current && textContainerRef.current) { let textContainerHeight = textContainerRef.current.clientHeight if (!textContainerHeight) { textContainerHeight = textContainerRef.current.getBoundingClientRect().height } const isOverflowing = textRef.current.scrollHeight > textContainerHeight + // necessary to show see more button again if user resizes window to expand and then back to collapse if (!isOverflowing) { setIsTextExpanded(false) } setShowSeeMore(isOverflowing) } - }, [task.text, windowWidth]) + }, [task.text, windowWidth, isTaskExpanded]) const isCostAvailable = useMemo(() => { const openAiCompatHasPricing =