diff --git a/app/w/[id]/components/notifications/notifications.tsx b/app/w/[id]/components/notifications/notifications.tsx index 5896235c7d..5dec897bb4 100644 --- a/app/w/[id]/components/notifications/notifications.tsx +++ b/app/w/[id]/components/notifications/notifications.tsx @@ -1,5 +1,5 @@ -import { useEffect, useState } from 'react' -import { Copy, Rocket, Terminal, X } from 'lucide-react' +import { useEffect, useRef, useState } from 'react' +import { ChevronDown, ChevronUp, Copy, Rocket, Terminal, X } from 'lucide-react' import { ErrorIcon } from '@/components/icons' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { @@ -21,6 +21,7 @@ import { useWorkflowStore } from '@/stores/workflows/workflow/store' // Constants const NOTIFICATION_TIMEOUT = 4000 const FADE_DURATION = 300 +const MAX_MESSAGE_HEIGHT = 300 // Maximum height in pixels before truncation // Icon mapping for notification types const NotificationIcon = { @@ -356,19 +357,20 @@ function NotificationAlert({ -

{message}

+ {/* Message with auto-expanding and max height */} +

{message}

{/* Optional sections with copyable content */} {options?.sections?.map((section, index) => (
{section.label}
- {/* Copyable code block */} + {/* Copyable code block with max height */}
onCopy(id, index, section.content)} > -
+                      
                         {section.content}