Skip to content

Conversation

@kevkevinpal
Copy link
Contributor

@kevkevinpal kevkevinpal commented Jan 28, 2026

Summary

Right now we have no way of including images so that hive can give us results based on those

This PR lets a user add an image/attachment to their task (async) and then it is saved to s3 and that url is sent to Stakwork to process the image

kevkevinpal and others added 6 commits January 28, 2026 17:20
- Add drag-and-drop file upload with visual feedback overlay
- Add file picker button for image selection
- Display image previews above card with remove functionality
- Support paste from clipboard
- Validate file types (JPEG, PNG, GIF, WebP) and size (10MB limit)
- Pass image files to onStart callback for task creation
- Disable image upload in agent and workflow modes
- Complete implementation matching ChatInput functionality
- Update handleStart to accept images parameter from TaskStartInput
- Upload each image to S3 using presigned URLs after task creation
- Pass attachment metadata (s3Path, filename, mimeType, size) to sendMessage
- Handle upload errors gracefully with toast notifications
- Continue task creation even if image upload fails
- Add attachments to ChatMessage UI creation in sendMessage
- Convert attachment metadata to Attachment objects for display
- Add image grid display in ChatMessage component below message bubble
- Use presigned URL endpoint to fetch and display images
- Support multiple images in 2-column grid layout
- Images display for both USER and ASSISTANT messages
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
hive Ignored Ignored Jan 29, 2026 1:45pm

pitoi added 3 commits January 28, 2026 19:14
- Made image attachments clickable with cursor-pointer and hover effect
- Added Dialog modal for enlarged image view with dark backdrop
- Added close button (X) and backdrop click-to-close functionality
- Images display at full size (max 95vw/90vh) centered on screen
- Uses shadcn Dialog component for accessibility
…ame instead of fileName)

Fixed TypeScript error where attachment.s3Key was used instead of attachment.path
and attachment.fileName was used instead of attachment.filename to match the
Prisma schema definition.
- Reverted to commit 97be8c6 and rebuilt with fallback UI
- Added state tracking for failed images
- Show placeholder UI with filename and error message when image fails
- Placeholder displays: image icon, filename, and 'Failed to load image' text
- Non-clickable for failed images, maintains click-to-enlarge for working ones
- Re-applied fix to ensure attachments included in API response
- Graceful degradation: users see what failed instead of empty space
@pitoi pitoi force-pushed the bugfix/fix-image-display-405-error-1769627388 branch from 63c44ca to e31b215 Compare January 28, 2026 19:47
The attachment objects were being created with wrong field names:
- s3Key -> path (Prisma uses 'path')
- fileName -> filename
- fileType -> mimeType
- fileSize -> size

This caused attachments to have undefined 'path' values when rendered,
resulting in 'undefined' being passed to the presigned URL endpoint.

Now attachments are created with the correct Prisma schema fields:
id, messageId, path, filename, mimeType, size, createdAt, updatedAt
@kevkevinpal kevkevinpal changed the title Generated with Hive: Fix image display error by handling 405 status code Generated with Hive: Start tasks with images as an attachment Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants