Skip to content

🐛 Image upload button hidden on web platform #813

@theflysurfer

Description

@theflysurfer

Bug

The image upload button (📎 icon) is intentionally hidden on the web platform via a Platform.OS !== 'web' condition in AgentInput.tsx.

Root Cause

// happy/sources/components/AgentInput.tsx ~line 1195
{props.onImagePickerPress && Platform.OS !== 'web' && (
    <Pressable ...>
        <Ionicons name="image-outline" ... />
    </Pressable>
)}

The Platform.OS !== 'web' guard completely removes the image picker button on web.

Impact

  • Web: No image upload button visible → users cannot upload images at all
  • Android: Button should be visible (condition passes), but user reports it's also broken — needs separate investigation

Expected Behavior

  • Web should have an image upload button using <input type="file" accept="image/*">
  • The existing useImagePicker hook uses expo-image-picker which may not support web — need a web-specific implementation (HTML file input + FileReader for base64)

Fix Plan

  1. Remove the Platform.OS !== 'web' guard
  2. Create a web-specific image picker (using native HTML <input type="file"> + drag-and-drop)
  3. Add clipboard paste support (Ctrl+V) for web (as described in PRD)
  4. Investigate Android separately if still broken

Files

  • happy/sources/components/AgentInput.tsx — button visibility
  • happy/sources/components/ImageUpload/useImagePicker.ts — picker logic (expo-image-picker, may not work on web)
  • happy/sources/components/ImageUpload/ImagePreviewRow.tsx — preview UI
  • happy/sources/-session/SessionView.tsx — wiring
  • happy/docs/prd/PRD_image-upload.md — original PRD with web support plans

Labels

bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions