fix: resolve content area height issue in StandardizedToolWrapper

- 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 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2025-12-22 22:18:11 -05:00
parent 1bd509de08
commit 9f2cc9267e
3 changed files with 5 additions and 3 deletions

View File

@ -277,14 +277,13 @@ export const StandardizedToolWrapper: React.FC<StandardizedToolWrapperProps> = (
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 = {

View File

@ -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)

View File

@ -392,6 +392,7 @@ export class PromptShape extends BaseBoxShapeUtil<IPrompt> {
}
const handlePinToggle = () => {
console.log('📌 Pin toggle clicked, current state:', shape.props.pinnedToView, '-> new state:', !shape.props.pinnedToView)
this.editor.updateShape<IPrompt>({
id: shape.id,
type: shape.type,