From 9f2cc9267eac371fbb3127c4643f9299c1ed5f7c Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 22 Dec 2025 22:18:11 -0500 Subject: [PATCH] fix: resolve content area height issue in StandardizedToolWrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove conflicting height calc in contentStyle (was conflicting with flex:1) - Use minHeight:0 to allow proper flex shrinking - Add debug logging for pin toggle to diagnose pin button issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/components/StandardizedToolWrapper.tsx | 5 ++--- src/hooks/usePinnedToView.ts | 2 ++ src/shapes/PromptShapeUtil.tsx | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/StandardizedToolWrapper.tsx b/src/components/StandardizedToolWrapper.tsx index 8341c6e..94973ea 100644 --- a/src/components/StandardizedToolWrapper.tsx +++ b/src/components/StandardizedToolWrapper.tsx @@ -277,14 +277,13 @@ export const StandardizedToolWrapper: React.FC = ( const contentStyle: React.CSSProperties = { width: '100%', - height: isMinimized ? 0 : 'calc(100% - 40px)', + minHeight: 0, // Allow flex shrinking overflow: 'auto', position: 'relative', pointerEvents: 'auto', - transition: 'height 0.2s ease', display: 'flex', flexDirection: 'column', - flex: 1, + flex: 1, // Take remaining space after header and tags } const tagsContainerStyle: React.CSSProperties = { diff --git a/src/hooks/usePinnedToView.ts b/src/hooks/usePinnedToView.ts index 4c29449..e919638 100644 --- a/src/hooks/usePinnedToView.ts +++ b/src/hooks/usePinnedToView.ts @@ -79,6 +79,7 @@ export function usePinnedToView( // If just became pinned (transition from false to true) if (isPinned && !wasPinnedRef.current) { + console.log('📌 usePinnedToView: Shape became PINNED', shapeId) // Clear any leftover state from previous pin sessions clearPinState() @@ -151,6 +152,7 @@ export function usePinnedToView( // If just became unpinned, animate back to original coordinates if (!isPinned && wasPinnedRef.current) { + console.log('📌 usePinnedToView: Shape became UNPINNED', shapeId) // Cancel any ongoing animations if (driftAnimationRef.current) { cancelAnimationFrame(driftAnimationRef.current) diff --git a/src/shapes/PromptShapeUtil.tsx b/src/shapes/PromptShapeUtil.tsx index f950b45..6312629 100644 --- a/src/shapes/PromptShapeUtil.tsx +++ b/src/shapes/PromptShapeUtil.tsx @@ -392,6 +392,7 @@ export class PromptShape extends BaseBoxShapeUtil { } const handlePinToggle = () => { + console.log('📌 Pin toggle clicked, current state:', shape.props.pinnedToView, '-> new state:', !shape.props.pinnedToView) this.editor.updateShape({ id: shape.id, type: shape.type,